Skip to content
This repository has been archived by the owner on Nov 9, 2023. It is now read-only.

Commit

Permalink
fix faceset enhancer for frames that contain edited mask
Browse files Browse the repository at this point in the history
  • Loading branch information
iperov committed Dec 29, 2019
1 parent 28549dc commit 540650c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
6 changes: 5 additions & 1 deletion DFLIMG/DFLJPG.py
Expand Up @@ -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,
Expand Down
8 changes: 6 additions & 2 deletions DFLIMG/DFLPNG.py
Expand Up @@ -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,
Expand Down

0 comments on commit 540650c

Please sign in to comment.