MergeMasked: added full mask type as white square

This commit is contained in:
iperov 2021-06-06 21:08:42 +04:00
parent 2a95699b1c
commit 24ba84d4a5
2 changed files with 5 additions and 2 deletions

View File

@ -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

View File

@ -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',