瀏覽代碼

Script for image face swapping(You can choose to add or not add a watermark)

NNNNAI 4 年之前
父節點
當前提交
08ee7fe102
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      test_wholeimage_swapsingle.py

+ 2 - 2
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(' ')