Extractor: 2nd pass now faster on frames where faces are not found
This commit is contained in:
@@ -110,8 +110,11 @@ class ExtractSubprocessor(Subprocessor):
|
|||||||
#override
|
#override
|
||||||
def process_data(self, data):
|
def process_data(self, data):
|
||||||
filename_path = Path( data.filename )
|
filename_path = Path( data.filename )
|
||||||
|
|
||||||
filename_path_str = str(filename_path)
|
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:
|
if self.cached_image[0] == filename_path_str:
|
||||||
image = self.cached_image[1] #cached image for manual extractor
|
image = self.cached_image[1] #cached image for manual extractor
|
||||||
else:
|
else:
|
||||||
@@ -164,7 +167,6 @@ class ExtractSubprocessor(Subprocessor):
|
|||||||
return data
|
return data
|
||||||
|
|
||||||
elif self.type == 'landmarks':
|
elif self.type == 'landmarks':
|
||||||
|
|
||||||
if data.rects_rotation == 0:
|
if data.rects_rotation == 0:
|
||||||
rotated_image = image
|
rotated_image = image
|
||||||
elif data.rects_rotation == 90:
|
elif data.rects_rotation == 90:
|
||||||
|
|||||||
Reference in New Issue
Block a user