From 08ee7fe10212f3e89ada54b92db69c915b646adb Mon Sep 17 00:00:00 2001 From: NNNNAI <844294823@qq.com> Date: Fri, 2 Jul 2021 21:58:48 +0800 Subject: [PATCH] Script for image face swapping(You can choose to add or not add a watermark) --- test_wholeimage_swapsingle.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test_wholeimage_swapsingle.py b/test_wholeimage_swapsingle.py index 0e3fb02..d5c28e3 100644 --- a/test_wholeimage_swapsingle.py +++ b/test_wholeimage_swapsingle.py @@ -37,7 +37,7 @@ if __name__ == '__main__': app = Face_detect_crop(name='antelope', root='./insightface_func/models') - app.prepare(ctx_id= 0, det_thresh=0.8, det_size=(640,640)) + app.prepare(ctx_id= 0, det_thresh=0.6, det_size=(640,640)) pic_a = opt.pic_a_path @@ -72,7 +72,7 @@ if __name__ == '__main__': swap_result = model(None, b_align_crop_tenor, latend_id, None, True)[0] swap_result_list.append(swap_result) - reverse2wholeimage(swap_result_list, b_mat_list, crop_size, img_b_whole, logoclass, os.path.join(opt.output_path, 'result_whole_swapsingle.jpg'),opt.no_simswaplogo) + reverse2wholeimage(swap_result_list, b_mat_list, crop_size, img_b_whole, logoclass, os.path.join(opt.output_path, 'result_whole_swapsingle.jpg'), opt.no_simswaplogo) print(' ')