Skip to content
Permalink
Browse files

fix faceset enhancer for frames that contain edited mask

  • Loading branch information
iperov committed Dec 29, 2019
1 parent 28549dc commit 540650c610ea4979a23c7ed9662f0461d18185cf
Showing with 11 additions and 3 deletions.
  1. +5 −1 DFLIMG/DFLJPG.py
  2. +6 −2 DFLIMG/DFLPNG.py
@@ -196,10 +196,14 @@ def embed_data(filename, face_type=None,
else:
io.log_err("Unable to encode fanseg_mask for %s" % (filename) )
fanseg_mask = None

if ie_polys is not None:
if not isinstance(ie_polys, list):
ie_polys = ie_polys.dump()

DFLJPG.embed_dfldict (filename, {'face_type': face_type,
'landmarks': landmarks,
'ie_polys' : ie_polys.dump() if ie_polys is not None else None,
'ie_polys' : ie_polys,
'source_filename': source_filename,
'source_rect': source_rect,
'source_landmarks': source_landmarks,
@@ -312,10 +312,14 @@ def embed_data(filename, face_type=None,
else:
io.log_err("Unable to encode fanseg_mask for %s" % (filename) )
fanseg_mask = None


if ie_polys is not None:
if not isinstance(ie_polys, list):
ie_polys = ie_polys.dump()

DFLPNG.embed_dfldict (filename, {'face_type': face_type,
'landmarks': landmarks,
'ie_polys' : ie_polys.dump() if ie_polys is not None else None,
'ie_polys' : ie_polys,
'source_filename': source_filename,
'source_rect': source_rect,
'source_landmarks': source_landmarks,

0 comments on commit 540650c

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