From e475a439f8794b8a125c50eba1aeba949f5f3590 Mon Sep 17 00:00:00 2001 From: julie wang Date: Fri, 11 Oct 2024 13:34:43 +0200 Subject: [PATCH] feat(ml): debug vid for frame limit --- data/self_supervised_vid_mask_online_dataset.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/data/self_supervised_vid_mask_online_dataset.py b/data/self_supervised_vid_mask_online_dataset.py index 7064339a..f1223006 100644 --- a/data/self_supervised_vid_mask_online_dataset.py +++ b/data/self_supervised_vid_mask_online_dataset.py @@ -68,7 +68,7 @@ def __init__(self, opt, phase, name=""): ) # Initialize a dictionary to count how many available paths belong to each directory self.frames_counts = { - vid_serie: -self.num_frames * self.frame_step + vid_serie: (-self.num_frames + 1) * self.frame_step for vid_serie in self.vid_series_paths } # Loop through self.A_img_paths and count the occurrences of each directory @@ -112,7 +112,10 @@ def get_img( ): # all params are unused if len(self.frames_counts) == 1: # single video mario - index_A = random.randint(0, self.range_A - 1) + if self.range_A == 0: + index_A = 0 + else: + index_A = random.randint(0, self.range_A - 1) else: # video series range_A = self.cumulative_sums[ -1