Skip to content

Commit

Permalink
fix:multi-fps bug. For multi-fps training, when extracting frames acc…
Browse files Browse the repository at this point in the history
…ording to a certain frame_interval, the fps of the extracted frames actually changes. (#444)

Co-authored-by: Jianshu Guo <[email protected]>
  • Loading branch information
shu-le and shu-l authored Jun 18, 2024
1 parent 7b5791a commit 1295446
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions opensora/datasets/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@ def getitem(self, index):
# Sampling video frames
video = temporal_random_crop(vframes, num_frames, self.frame_interval)

video_fps = video_fps // self.frame_interval

# transform
transform = get_transforms_video(self.transform_name, (height, width))
video = transform(video) # T C H W
Expand Down

0 comments on commit 1295446

Please sign in to comment.