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'):