Commit 238158bb authored by Amir MOHAMMADI's avatar Amir MOHAMMADI

Improve logging in case of failures in preprocessing

parent a04c202c
......@@ -4,9 +4,12 @@
import bob.bio.base
import bob.io.base
import six
import logging
from .. import utils
logger = logging.getLogger("bob.bio.video")
class Wrapper(bob.bio.base.preprocessor.Preprocessor):
"""Wrapper class to run image preprocessing algorithms on video data.
......@@ -116,7 +119,6 @@ class Wrapper(bob.bio.base.preprocessor.Preprocessor):
preprocessed : :py:class:`bob.bio.video.FrameContainer`
A frame container that contains the preprocessed frames.
"""
fc = utils.FrameContainer()
for index, frame, _ in frames:
......@@ -136,6 +138,8 @@ class Wrapper(bob.bio.base.preprocessor.Preprocessor):
quality = None
# add image to frame container
fc.add(index, preprocessed, quality)
else:
logger.warning('Processing of frame %s failed.', index)
if not len(fc):
return None
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment