mirror of
https://github.com/iperov/DeepFaceLab.git
synced 2025-07-05 20:42:11 -07:00
_
This commit is contained in:
parent
521a23f557
commit
2ac860b074
1 changed files with 4 additions and 4 deletions
|
@ -175,13 +175,13 @@ def export_faceset_mask(input_dir):
|
||||||
|
|
||||||
seg_ie_polys = dflimg.get_seg_ie_polys()
|
seg_ie_polys = dflimg.get_seg_ie_polys()
|
||||||
|
|
||||||
if seg_ie_polys.has_polys():
|
if dflimg.has_xseg_mask():
|
||||||
mask = np.zeros ((H,W,1), dtype=np.float32)
|
|
||||||
seg_ie_polys.overlay_mask(mask)
|
|
||||||
elif dflimg.has_xseg_mask():
|
|
||||||
mask = dflimg.get_xseg_mask()
|
mask = dflimg.get_xseg_mask()
|
||||||
mask[mask < 0.5] = 0.0
|
mask[mask < 0.5] = 0.0
|
||||||
mask[mask >= 0.5] = 1.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:
|
else:
|
||||||
raise Exception(f'no mask in file {filepath}')
|
raise Exception(f'no mask in file {filepath}')
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue