diff --git a/bob/pad/face/preprocessor/FrameDifference.py b/bob/pad/face/preprocessor/FrameDifference.py index 05037679862ba0579f537f78dfc06c6c2bf286e9..62c4ae9b1133ac20586f69c3469b02b7d4529de1 100644 --- a/bob/pad/face/preprocessor/FrameDifference.py +++ b/bob/pad/face/preprocessor/FrameDifference.py @@ -21,9 +21,13 @@ import bob.ip.color import bob.ip.facedetect +import logging + #============================================================================== # Main body: +logger = logging.getLogger(__name__) + class FrameDifference(Preprocessor): """ @@ -414,6 +418,10 @@ class FrameDifference(Preprocessor): selected_frames, selected_annotations = self.check_face_size( frames, annotations, self.min_face_size) + if not len(selected_annotations): + logger.warn("None of the annotations are valid.") + return None + diff = self.comp_face_bg_diff( frames=selected_frames, annotations=selected_annotations,