mirror of
https://github.com/iperov/DeepFaceLab.git
synced 2025-08-20 13:33:24 -07:00
fix for mask types
This commit is contained in:
parent
cc3f232cf6
commit
4c7bb94944
1 changed files with 8 additions and 5 deletions
|
@ -148,10 +148,13 @@ class SampleProcessor(object):
|
||||||
elif face_mask_type == SPFMT.FULL_FACE_EYES:
|
elif face_mask_type == SPFMT.FULL_FACE_EYES:
|
||||||
# sets both eyes and mouth mask parts
|
# sets both eyes and mouth mask parts
|
||||||
img = get_full_face_mask()
|
img = get_full_face_mask()
|
||||||
eye_mask = get_eyes_mask()
|
mask = img.copy()
|
||||||
img = np.where(eye_mask > 1 and img > 0, eye_mask, img)
|
mask[mask != 0.0] = 1.0
|
||||||
mouth_mask = get_mouth_mask()
|
eye_mask = get_eyes_mask() * mask
|
||||||
img = np.where(mouth_mask > 2 and img > 0, mouth_mask, img)
|
img = np.where(eye_mask > 1, eye_mask, img)
|
||||||
|
|
||||||
|
mouth_mask = get_mouth_mask() * mask
|
||||||
|
img = np.where(mouth_mask > 2, mouth_mask, img)
|
||||||
else:
|
else:
|
||||||
img = np.zeros ( sample_bgr.shape[0:2]+(1,), dtype=np.float32)
|
img = np.zeros ( sample_bgr.shape[0:2]+(1,), dtype=np.float32)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue