mirror of
https://github.com/iperov/DeepFaceLab.git
synced 2025-07-30 03:29:59 -07:00
converter: fix seamless
This commit is contained in:
parent
18d5829015
commit
847622ee3a
1 changed files with 1 additions and 4 deletions
|
@ -271,11 +271,8 @@ class ConverterMasked(Converter):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
if self.mode == 'seamless' or self.mode == 'seamless-hist-match':
|
if self.mode == 'seamless' or self.mode == 'seamless-hist-match':
|
||||||
out_img = np.clip( img_bgr*(1-img_face_mask_aaa) + (out_img*img_face_mask_aaa) , 0, 1.0 )
|
|
||||||
if debug:
|
|
||||||
debugs += [out_img.copy()]
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
||||||
out_img = cv2.seamlessClone( (out_img*255).astype(np.uint8), (img_bgr*255).astype(np.uint8), (img_face_seamless_mask_aaa*255).astype(np.uint8), (maskx,masky) , cv2.NORMAL_CLONE )
|
out_img = cv2.seamlessClone( (out_img*255).astype(np.uint8), (img_bgr*255).astype(np.uint8), (img_face_seamless_mask_aaa*255).astype(np.uint8), (maskx,masky) , cv2.NORMAL_CLONE )
|
||||||
out_img = out_img.astype(dtype=np.float32) / 255.0
|
out_img = out_img.astype(dtype=np.float32) / 255.0
|
||||||
except:
|
except:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue