Skip to content
Browse files

extractior: fix extract from already extracted dflimg

  • Loading branch information...
iperov committed May 11, 2019
1 parent 53c4f8a commit 8294feca247c084b5aa1fbb2226ef2c706f6c440
Showing with 6 additions and 2 deletions.
  1. +6 −2 mainscripts/
@@ -214,6 +214,10 @@ def process_data(self, data):
face_idx = 0
for rect, image_landmarks in zip( rects, landmarks ):
if src_dflimg is not None and face_idx > 1:
#cannot extract more than 1 face from dflimg

if image_landmarks is None:

@@ -238,8 +242,8 @@ def process_data(self, data):
if self.debug_dir is not None:
LandmarksProcessor.draw_rect_landmarks (debug_image, rect, image_landmarks, self.image_size, self.face_type, transparent_mask=True)

if src_dflimg is not None:
#if extracting from dflimg copy it in order not to lose quality
if src_dflimg is not None and filename_path.suffix == '.jpg':
#if extracting from dflimg and jpg copy it in order not to lose quality
output_file = str(self.final_output_path /
if str(filename_path) != str(output_file):
shutil.copy ( str(filename_path), str(output_file) )

0 comments on commit 8294fec

Please sign in to comment.
You can’t perform that action at this time.