OpenGVLab / UniFormerV2

[ICCV2023] UniFormerV2: Spatiotemporal Learning by Arming Image ViTs with Video UniFormer
https://arxiv.org/abs/2211.09552
Apache License 2.0
294 stars 19 forks source link

Assertion error / error with split() in mit.py #23

Closed anjugopinath closed 1 year ago

anjugopinath commented 1 year ago

In slowfast/datasets/mit.py, inside the function def _construct_loader(self):, there is a for loop for clip_idx, path_label in enumerate(f.read().splitlines()): I faced an error with this since it also read the blank line after the last line in the csv file and threw an error.

So, to fix it, inside the for loop, I added this:

                if not path_label:
                 continue

And this fixed the error.