From 9312a3c33453c2b25739e48a3c2fd94ae3e3e915 Mon Sep 17 00:00:00 2001 From: Colombo Date: Sun, 22 Dec 2019 10:46:44 +0400 Subject: [PATCH] Extractor: 2nd pass now faster on frames where faces are not found --- mainscripts/Extractor.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/mainscripts/Extractor.py b/mainscripts/Extractor.py index c66e372..cb0c9b2 100644 --- a/mainscripts/Extractor.py +++ b/mainscripts/Extractor.py @@ -110,8 +110,11 @@ class ExtractSubprocessor(Subprocessor): #override def process_data(self, data): filename_path = Path( data.filename ) - filename_path_str = str(filename_path) + + if self.type == 'landmarks' and len(data.rects) == 0: + return data + if self.cached_image[0] == filename_path_str: image = self.cached_image[1] #cached image for manual extractor else: @@ -163,8 +166,7 @@ class ExtractSubprocessor(Subprocessor): return data - elif self.type == 'landmarks': - + elif self.type == 'landmarks': if data.rects_rotation == 0: rotated_image = image elif data.rects_rotation == 90: