Skip to content
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions torchvision/datasets/video_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,15 @@ class VideoClips(object):
frame_rate (int, optional): if specified, it will resample the video
so that it has `frame_rate`, and then the clips will be defined
on the resampled video
num_workers (int): how many subprocesses to use for data loading.
0 means that the data will be loaded in the main process. (default: 0)
"""
def __init__(self, video_paths, clip_length_in_frames=16, frames_between_clips=1,
frame_rate=None, _precomputed_metadata=None, num_workers=1,
_backend="pyav"):
frame_rate=None, _precomputed_metadata=None, num_workers=0, _backend="pyav"):
self.video_paths = video_paths
self.num_workers = num_workers
self._backend = _backend

if _precomputed_metadata is None:
self._compute_frame_pts()
else:
Expand Down