Skip to content
This repository has been archived by the owner on Feb 22, 2020. It is now read-only.

Commit

Permalink
fix(preprocessor): add logging in helper module
Browse files Browse the repository at this point in the history
  • Loading branch information
felix committed Jul 26, 2019
1 parent f9500c1 commit a20672d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions gnes/preprocessor/helper.py
Expand Up @@ -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']:
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit a20672d

Please sign in to comment.