Skip to content
Permalink
Browse files

fix(preprocessor): add logging in helper module

  • Loading branch information...
numb3r3 committed Jul 26, 2019
1 parent f9500c1 commit a20672d3be6306fc339f9a4523047e4491ebf1b8
Showing with 5 additions and 3 deletions.
  1. +5 −3 gnes/preprocessor/helper.py
@@ -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)
frames.append(image)
except Exception as e:
# raise e
pass

logger.warning("The decoded cv2 image from keyframe buffer is not in BGR format")
else:
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.
You can’t perform that action at this time.