Commit f379d5b9 authored by Amir MOHAMMADI's avatar Amir MOHAMMADI
Browse files

Handle cases when none of the annotations are valid

parent 516c7eb1
Pipeline #19446 canceled with stage
......@@ -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,
......
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