fix
This commit is contained in:
@@ -135,6 +135,7 @@ def MergeMaskedFace (predictor_func, predictor_input_shape,
|
|||||||
|
|
||||||
wrk_face_mask_a = wrk_face_mask_a_0[...,None]
|
wrk_face_mask_a = wrk_face_mask_a_0[...,None]
|
||||||
|
|
||||||
|
out_img = None
|
||||||
out_merging_mask_a = None
|
out_merging_mask_a = None
|
||||||
if cfg.mode == 'original':
|
if cfg.mode == 'original':
|
||||||
return img_bgr, img_face_mask_a
|
return img_bgr, img_face_mask_a
|
||||||
@@ -307,11 +308,11 @@ def MergeMaskedFace (predictor_func, predictor_input_shape,
|
|||||||
else:
|
else:
|
||||||
alpha = cfg.color_degrade_power / 100.0
|
alpha = cfg.color_degrade_power / 100.0
|
||||||
out_img = (out_img*(1.0-alpha) + out_img_reduced*alpha)
|
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
|
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
|
return out_img, out_merging_mask_a
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user