Merge pull request #198 from ShowLo/patch-2

Fix the bug that causes an infinite loop when the total number of fra…
This commit is contained in:
czk32611
2024-09-23 13:28:35 +08:00
committed by GitHub

View File

@@ -135,7 +135,7 @@ class Dataset(object):
#随机选择某个video里
vidname = self.all_videos[idx].split('/')[-1]
video_imgs = self.all_img_names[idx]
if len(video_imgs) == 0:
if len(video_imgs) <= 11:
continue
img_name = random.choice(video_imgs)
img_idx = int(basename(img_name).split(".")[0])