From 308c047f2f85a73a3698c10b2cb4c52988da8974 Mon Sep 17 00:00:00 2001 From: hzwer <598460606@163.com> Date: Wed, 18 Nov 2020 11:17:00 +0800 Subject: [PATCH] Fix typo --- inference_video.py | 2 +- inference_video_parallel.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/inference_video.py b/inference_video.py index 0b6ec15..7cd55cc 100644 --- a/inference_video.py +++ b/inference_video.py @@ -33,7 +33,7 @@ model.device() videoCapture = cv2.VideoCapture(args.video) fps = np.round(videoCapture.get(cv2.CAP_PROP_FPS)) if args.fps is None: - fps = args.fps * args.times + args.fps = fps * args.times success, frame = videoCapture.read() h, w, _ = frame.shape fourcc = cv2.VideoWriter_fourcc('m', 'p', '4', 'v') diff --git a/inference_video_parallel.py b/inference_video_parallel.py index ddb31b6..45d4036 100644 --- a/inference_video_parallel.py +++ b/inference_video_parallel.py @@ -34,7 +34,7 @@ fps = np.round(videoCapture.get(cv2.CAP_PROP_FPS)) success, frame = videoCapture.read() h, w, _ = frame.shape if args.fps is None: - fps = args.fps * args.times + args.fps = fps * args.times fourcc = cv2.VideoWriter_fourcc('m', 'p', '4', 'v') if args.png: if not os.path.exists('output'): @@ -110,7 +110,7 @@ while success: else: mid0, mid2 = None, None writeframe(I0, mid0, mid1, mid2, I1, p.mean(3).mean(2).mean(1)) - pbar.update(args.times) + pbar.update(4) img_list = img_list[-1:] pbar.close() output.release()