This commit is contained in:
sayakpaul
2024-11-18 15:30:23 +05:30
parent a40ccd2237
commit 4c05ea6669
-2
View File
@@ -342,8 +342,6 @@ class VideoDatasetWithResizeAndRectangleCrop(VideoDataset):
nearest_frame_bucket = min( nearest_frame_bucket = min(
self.frame_buckets, key=lambda x: abs(x - min(video_num_frames, self.max_num_frames)) self.frame_buckets, key=lambda x: abs(x - min(video_num_frames, self.max_num_frames))
) )
if video_num_frames < nearest_frame_bucket:
return None, None, None
frame_indices = list(range(0, video_num_frames, video_num_frames // nearest_frame_bucket)) frame_indices = list(range(0, video_num_frames, video_num_frames // nearest_frame_bucket))