Skip to content
This repository was archived by the owner on Dec 14, 2023. It is now read-only.

Commit 499dd21

Browse files
Update dataset.py
1 parent fb30834 commit 499dd21

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

utils/dataset.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def get_sample_idx(self, idx, vr):
107107

108108
def get_vid_idx(self, vr, vid_data=None):
109109

110-
if self.use_random_start_idx:
110+
if self.use_random_start_idx and self.n_sample_frames == 1:
111111

112112
# Randomize the frame rate at different speeds
113113
self.sample_frame_rate = random.randint(1, self.sample_frame_rate_init)
@@ -119,7 +119,6 @@ def get_vid_idx(self, vr, vid_data=None):
119119
idx = random.randint(1, max_frame)
120120

121121
else:
122-
123122
if vid_data is not None:
124123
idx = vid_data['frame_index']
125124
else:

0 commit comments

Comments
 (0)