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