This commit is contained in:
Colombo 2020-07-08 18:16:29 +04:00
parent 5a40f537cc
commit c963703395

View File

@ -135,6 +135,7 @@ def MergeMaskedFace (predictor_func, predictor_input_shape,
wrk_face_mask_a = wrk_face_mask_a_0[...,None]
out_img = None
out_merging_mask_a = None
if cfg.mode == 'original':
return img_bgr, img_face_mask_a
@ -307,11 +308,11 @@ def MergeMaskedFace (predictor_func, predictor_input_shape,
else:
alpha = cfg.color_degrade_power / 100.0
out_img = (out_img*(1.0-alpha) + out_img_reduced*alpha)
else:
out_img = img_bgr.copy()
out_merging_mask_a = img_face_mask_a
if out_img is None:
out_img = img_bgr.copy()
return out_img, out_merging_mask_a