From 2ac860b074fe630f9f98bc76de250216e8e20e61 Mon Sep 17 00:00:00 2001 From: iperov Date: Mon, 25 Jul 2022 09:15:53 +0400 Subject: [PATCH] _ --- mainscripts/Util.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mainscripts/Util.py b/mainscripts/Util.py index ec3dfea..66e751d 100644 --- a/mainscripts/Util.py +++ b/mainscripts/Util.py @@ -175,13 +175,13 @@ def export_faceset_mask(input_dir): seg_ie_polys = dflimg.get_seg_ie_polys() - if seg_ie_polys.has_polys(): - mask = np.zeros ((H,W,1), dtype=np.float32) - seg_ie_polys.overlay_mask(mask) - elif dflimg.has_xseg_mask(): + if dflimg.has_xseg_mask(): mask = dflimg.get_xseg_mask() mask[mask < 0.5] = 0.0 mask[mask >= 0.5] = 1.0 + elif seg_ie_polys.has_polys(): + mask = np.zeros ((H,W,1), dtype=np.float32) + seg_ie_polys.overlay_mask(mask) else: raise Exception(f'no mask in file {filepath}')