tweaked extractor to be compatible with my code that invokes it

.
This commit is contained in:
Ethan 2021-03-16 11:21:39 -04:00
commit 34f27f6fa1

View file

@ -69,8 +69,9 @@ class ExtractSubprocessor(Subprocessor):
self.log_info (f"Running on {client_dict['device_name'] }") self.log_info (f"Running on {client_dict['device_name'] }")
if self.type == 'all' or self.type == 'rects-s3fd' or 'landmarks' in self.type: # if self.type == 'all' or self.type == 'rects-s3fd' or 'landmarks' in self.type:
self.rects_extractor = facelib.S3FDExtractor(place_model_on_cpu=place_model_on_cpu) # self.rects_extractor = facelib.S3FDExtractor(place_model_on_cpu=place_model_on_cpu)
self.rects_extractor = facelib.S3FDExtractor()
if self.type == 'all' or 'landmarks' in self.type: if self.type == 'all' or 'landmarks' in self.type:
# for head type, extract "3D landmarks" # for head type, extract "3D landmarks"
@ -115,7 +116,7 @@ class ExtractSubprocessor(Subprocessor):
rects_extractor=self.rects_extractor, rects_extractor=self.rects_extractor,
) )
if self.type == 'final' or self.type == 'all': if 'final' in self.type or self.type == 'final' or self.type == 'all':
data = ExtractSubprocessor.Cli.final_stage(data=data, data = ExtractSubprocessor.Cli.final_stage(data=data,
image=image, image=image,
face_type=self.face_type, face_type=self.face_type,