Skip to content
Snippets Groups Projects
Commit f379d5b9 authored by Amir MOHAMMADI's avatar Amir MOHAMMADI
Browse files

Handle cases when none of the annotations are valid

parent 516c7eb1
No related branches found
No related tags found
1 merge request!64Add support for external annotations in replaymobile
Pipeline #
...@@ -21,9 +21,13 @@ import bob.ip.color ...@@ -21,9 +21,13 @@ import bob.ip.color
import bob.ip.facedetect import bob.ip.facedetect
import logging
#============================================================================== #==============================================================================
# Main body: # Main body:
logger = logging.getLogger(__name__)
class FrameDifference(Preprocessor): class FrameDifference(Preprocessor):
""" """
...@@ -414,6 +418,10 @@ class FrameDifference(Preprocessor): ...@@ -414,6 +418,10 @@ class FrameDifference(Preprocessor):
selected_frames, selected_annotations = self.check_face_size( selected_frames, selected_annotations = self.check_face_size(
frames, annotations, self.min_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( diff = self.comp_face_bg_diff(
frames=selected_frames, frames=selected_frames,
annotations=selected_annotations, annotations=selected_annotations,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment