mirror of
https://github.com/iperov/DeepFaceLab.git
synced 2024-03-22 13:10:55 +08:00
_
This commit is contained in:
parent
521a23f557
commit
2ac860b074
|
@ -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}')
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user