From a0bbe9e8b80efd6fa140c5655f0f448473692b6f Mon Sep 17 00:00:00 2001 From: Amir MOHAMMADI Date: Fri, 9 Feb 2018 13:58:08 +0100 Subject: [PATCH 1/2] Account for failed extractor --- bob/bio/video/extractor/Wrapper.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bob/bio/video/extractor/Wrapper.py b/bob/bio/video/extractor/Wrapper.py index 6229438..8252379 100644 --- a/bob/bio/video/extractor/Wrapper.py +++ b/bob/bio/video/extractor/Wrapper.py @@ -83,8 +83,9 @@ class Wrapper (bob.bio.base.extractor.Extractor): for index, frame, quality in self.frame_selector(frames): # extract features extracted = self.extractor(frame) - # add features to new frame container - fc.add(index, extracted, quality) + if extracted is not None: + # add features to new frame container + fc.add(index, extracted, quality) return fc -- GitLab From de475ee1804c337ce6243ed4e0661bf9173649de Mon Sep 17 00:00:00 2001 From: Amir MOHAMMADI Date: Wed, 14 Mar 2018 17:06:27 +0100 Subject: [PATCH 2/2] Account for empty frame containers too --- bob/bio/video/extractor/Wrapper.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bob/bio/video/extractor/Wrapper.py b/bob/bio/video/extractor/Wrapper.py index 8252379..4af0c2d 100644 --- a/bob/bio/video/extractor/Wrapper.py +++ b/bob/bio/video/extractor/Wrapper.py @@ -86,6 +86,10 @@ class Wrapper (bob.bio.base.extractor.Extractor): if extracted is not None: # add features to new frame container fc.add(index, extracted, quality) + + if not len(fc): + return None + return fc -- GitLab