Explorar o código

Update videoswap.py

NNNNAI %!s(int64=4) %!d(string=hai) anos
pai
achega
1016eef489
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      util/videoswap.py

+ 3 - 1
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