Skip to content
This repository has been archived by the owner. It is now read-only.
Browse files
fix(preprocessor): add logging in helper module
  • Loading branch information
felix committed Jul 26, 2019
1 parent f9500c1 commit a20672d3be6306fc339f9a4523047e4491ebf1b8
Showing with 5 additions and 3 deletions.
  1. +5 −3 gnes/preprocessor/
@@ -23,6 +23,9 @@
import numpy as np
from PIL import Image

from ..helper import set_logger

logger = set_logger(__name__, True)

def get_video_frames(buffer_data: bytes, image_format: str = 'cv2',
**kwargs) -> List['np.ndarray']:
@@ -72,10 +75,9 @@ def get_video_frames(buffer_data: bytes, image_format: str = 'cv2',
cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
except Exception as e:
# raise e

logger.warning("The decoded cv2 image from keyframe buffer is not in BGR format")
logger.error("The image format [%s] is not supported so far!" % image_format)
raise NotImplementedError

return frames

0 comments on commit a20672d

Please sign in to comment.