mirror of
https://github.com/iperov/DeepFaceLab.git
synced 2025-07-06 04:52:13 -07:00
parent
65bc9273e6
commit
4ed320a86b
1 changed files with 4 additions and 0 deletions
|
@ -232,6 +232,10 @@ def MergeMaskedFace (predictor_func, predictor_input_shape,
|
||||||
|
|
||||||
cfg_mp = cfg.motion_blur_power / 100.0
|
cfg_mp = cfg.motion_blur_power / 100.0
|
||||||
|
|
||||||
|
# linux opencv can produce nan's so there will be errors in multiplying and glitches in videos
|
||||||
|
img_bgr = np.nan_to_num(img_bgr)
|
||||||
|
img_face_mask_a = np.nan_to_num(img_face_mask_a)
|
||||||
|
out_img = np.nan_to_num(out_img)
|
||||||
out_img = img_bgr*(1-img_face_mask_a) + (out_img*img_face_mask_a)
|
out_img = img_bgr*(1-img_face_mask_a) + (out_img*img_face_mask_a)
|
||||||
|
|
||||||
if ('seamless' in cfg.mode and cfg.color_transfer_mode != 0) or \
|
if ('seamless' in cfg.mode and cfg.color_transfer_mode != 0) or \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue