mirror of
https://github.com/iperov/DeepFaceLab.git
synced 2024-03-22 13:10:55 +08:00
MergeMasked: added full mask type as white square
This commit is contained in:
parent
2a95699b1c
commit
24ba84d4a5
|
@ -57,7 +57,9 @@ def MergeMaskedFace (predictor_func, predictor_input_shape,
|
|||
prd_face_mask_a_0 = cv2.resize (prd_face_mask_a_0, (output_size, output_size), interpolation=cv2.INTER_CUBIC)
|
||||
prd_face_dst_mask_a_0 = cv2.resize (prd_face_dst_mask_a_0, (output_size, output_size), interpolation=cv2.INTER_CUBIC)
|
||||
|
||||
if cfg.mask_mode == 1: #dst
|
||||
if cfg.mask_mode == 0: #full
|
||||
wrk_face_mask_a_0 = np.ones_like(dst_face_mask_a_0)
|
||||
elif cfg.mask_mode == 1: #dst
|
||||
wrk_face_mask_a_0 = cv2.resize (dst_face_mask_a_0, (output_size,output_size), interpolation=cv2.INTER_CUBIC)
|
||||
elif cfg.mask_mode == 2: #learned-prd
|
||||
wrk_face_mask_a_0 = prd_face_mask_a_0
|
||||
|
|
|
@ -81,7 +81,8 @@ mode_dict = {0:'original',
|
|||
|
||||
mode_str_dict = { mode_dict[key] : key for key in mode_dict.keys() }
|
||||
|
||||
mask_mode_dict = {1:'dst',
|
||||
mask_mode_dict = {0:'full',
|
||||
1:'dst',
|
||||
2:'learned-prd',
|
||||
3:'learned-dst',
|
||||
4:'learned-prd*learned-dst',
|
||||
|
|
Loading…
Reference in New Issue
Block a user