From 1016eef489cb9dc4dd0c6778f6da5e0934d82260 Mon Sep 17 00:00:00 2001 From: NNNNAI <844294823@qq.com> Date: Fri, 2 Jul 2021 20:37:22 +0800 Subject: [PATCH] Update videoswap.py --- util/videoswap.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/util/videoswap.py b/util/videoswap.py index acc4aca..82cd814 100644 --- a/util/videoswap.py +++ b/util/videoswap.py @@ -76,7 +76,9 @@ def video_swap(video_path, id_vetor, swap_model, detect_model, save_path, temp_r else: if not os.path.exists(temp_results_dir): os.mkdir(temp_results_dir) - frame = logoclass.apply_frames(frame.astype(np.uint8)) + frame = frame.astype(np.uint8) + if not no_simswaplogo: + frame = logoclass.apply_frames(frame) cv2.imwrite(os.path.join(temp_results_dir, 'frame_{:0>7d}.jpg'.format(frame_index)), frame) else: break