Skip to content
This repository was archived by the owner on Nov 13, 2024. It is now read-only.

Commit 2ac860b

Browse files
committed
_
1 parent 521a23f commit 2ac860b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

mainscripts/Util.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,13 +175,13 @@ def export_faceset_mask(input_dir):
175175

176176
seg_ie_polys = dflimg.get_seg_ie_polys()
177177

178-
if seg_ie_polys.has_polys():
179-
mask = np.zeros ((H,W,1), dtype=np.float32)
180-
seg_ie_polys.overlay_mask(mask)
181-
elif dflimg.has_xseg_mask():
178+
if dflimg.has_xseg_mask():
182179
mask = dflimg.get_xseg_mask()
183180
mask[mask < 0.5] = 0.0
184181
mask[mask >= 0.5] = 1.0
182+
elif seg_ie_polys.has_polys():
183+
mask = np.zeros ((H,W,1), dtype=np.float32)
184+
seg_ie_polys.overlay_mask(mask)
185185
else:
186186
raise Exception(f'no mask in file {filepath}')
187187

0 commit comments

Comments
 (0)