From 4b6bf003b8a4a3e0ca01d4825736faf196f883bb Mon Sep 17 00:00:00 2001 From: iperov Date: Sat, 13 Nov 2021 13:33:01 +0400 Subject: [PATCH] Merger: fix rct color transfer --- merger/MergeMasked.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/merger/MergeMasked.py b/merger/MergeMasked.py index 01b4398..0a5c633 100644 --- a/merger/MergeMasked.py +++ b/merger/MergeMasked.py @@ -170,7 +170,7 @@ def MergeMaskedFace (predictor_func, predictor_input_shape, if 'seamless' not in cfg.mode and cfg.color_transfer_mode != 0: if cfg.color_transfer_mode == 1: #rct - prd_face_bgr = imagelib.reinhard_color_transfer ( prd_face_bgr*wrk_face_mask_area_a, dst_face_bgr*wrk_face_mask_area_a ) + prd_face_bgr = imagelib.reinhard_color_transfer (prd_face_bgr, dst_face_bgr, target_mask=wrk_face_mask_area_a, source_mask=wrk_face_mask_area_a) elif cfg.color_transfer_mode == 2: #lct prd_face_bgr = imagelib.linear_color_transfer (prd_face_bgr, dst_face_bgr) elif cfg.color_transfer_mode == 3: #mkl @@ -249,7 +249,7 @@ def MergeMaskedFace (predictor_func, predictor_input_shape, if 'seamless' in cfg.mode and cfg.color_transfer_mode != 0: if cfg.color_transfer_mode == 1: - out_face_bgr = imagelib.reinhard_color_transfer (out_face_bgr*wrk_face_mask_area_a, dst_face_bgr*wrk_face_mask_area_a) + out_face_bgr = imagelib.reinhard_color_transfer (out_face_bgr, dst_face_bgr, target_mask=wrk_face_mask_area_a, source_mask=wrk_face_mask_area_a) elif cfg.color_transfer_mode == 2: #lct out_face_bgr = imagelib.linear_color_transfer (out_face_bgr, dst_face_bgr) elif cfg.color_transfer_mode == 3: #mkl