From eab4633c551ec8343087ec4acb1f2c9d0d14e0dd Mon Sep 17 00:00:00 2001 From: yqtl <46035875+yqtl@users.noreply.github.com> Date: Thu, 8 Dec 2022 15:06:24 +0000 Subject: [PATCH] fix --step argument --- scripts/preprocess/extract_video.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/preprocess/extract_video.py b/scripts/preprocess/extract_video.py index 4cb912d..115f4ec 100644 --- a/scripts/preprocess/extract_video.py +++ b/scripts/preprocess/extract_video.py @@ -32,7 +32,8 @@ def extract_video(videoname, path, start, end, step): if cnt < start:continue if cnt >= end:break if not ret:continue - cv2.imwrite(join(outpath, '{:06d}.jpg'.format(cnt)), frame) + if (cnt % step ==0): + cv2.imwrite(join(outpath, '{:06d}.jpg'.format(cnt)), frame) video.release() return base