From 8ca20b589b6ac91adc6b201dd3746f6d8583b6cd Mon Sep 17 00:00:00 2001 From: Pulin Agrawal Date: Fri, 13 Dec 2019 16:12:40 -0800 Subject: [PATCH] fix chunking equal number of videos for each thread. --- tools/vid2img_sthv2.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/vid2img_sthv2.py b/tools/vid2img_sthv2.py index 461bca96..37f872d5 100755 --- a/tools/vid2img_sthv2.py +++ b/tools/vid2img_sthv2.py @@ -12,9 +12,9 @@ def split(l, n): - """Yield successive n-sized chunks from l.""" - for i in range(0, len(l), n): - yield l[i:i + n] + """Yield successive almost equal sized n chunks from l.""" + for i in range(n): + yield l[i::n] def extract(video, tmpl='%06d.jpg'):