classy_vision/dataset/classy_hmdb51.py [29:83]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    def __init__(
        self,
        split: str,
        batchsize_per_replica: int,
        shuffle: bool,
        transform: Callable,
        num_samples: Optional[int],
        frames_per_clip: int,
        video_width: int,
        video_height: int,
        video_min_dimension: int,
        audio_samples: int,
        step_between_clips: int,
        frame_rate: Optional[int],
        clips_per_video: int,
        video_dir: str,
        splits_dir: str,
        fold: int,
        metadata_filepath: str,
    ):
        """The constructor of HMDB51Dataset.

        Args:
            split: dataset split which can be either "train" or "test"
            batchsize_per_replica: batch size per model replica
            shuffle: If true, shuffle the dataset
            transform: a dict where transforms video and audio data
            num_samples: if not None, it will subsample dataset
            frames_per_clip: the number of frames in a video clip
            video_width: rescaled video width. If 0, keep original width
            video_height: rescaled video height. If 0, keep original height
            video_min_dimension: rescale video so that min(height, width) =
                ``video_min_dimension``. If 0, keep original video resolution.
                Note only one of (``video_width``, ``video_height``) and
                (``video_min_dimension``) can be set
            audio_samples: desired audio sample rate. If 0, keep original
                audio sample rate.
            step_between_clips: Number of frames between each clip.
            frame_rate: desired video frame rate. If None, keep
                orignal video frame rate.
            clips_per_video: Number of clips to sample from each video
            video_dir: path to video folder
            splits_dir: path to dataset splitting file folder
            fold: HMDB51 dataset has 3 folds. Valid values are 1, 2 and 3.
            metadata_filepath: path to the dataset meta data

        """
        # dataset metadata includes the path of video file, the pts of frames in
        # the video and other meta info such as video fps, duration, audio sample rate.
        # Users do not need to know the details of metadata. The computing, loading
        # and saving logic of metata are all handled inside of the dataset.
        # Given the "metadata_file" path, if such file exists, we load it as meta data.
        # Otherwise, we compute the meta data, and save it at "metadata_file" path.
        metadata = None
        if os.path.exists(metadata_filepath):
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



classy_vision/dataset/classy_ucf101.py [28:82]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    def __init__(
        self,
        split: str,
        batchsize_per_replica: int,
        shuffle: bool,
        transform: Callable,
        num_samples: Optional[int],
        frames_per_clip: int,
        video_width: int,
        video_height: int,
        video_min_dimension: int,
        audio_samples: int,
        step_between_clips: int,
        frame_rate: Optional[int],
        clips_per_video: int,
        video_dir: str,
        splits_dir: str,
        fold: int,
        metadata_filepath: str,
    ):
        """The constructor of UCF101Dataset.

        Args:
            split: dataset split which can be either "train" or "test"
            batchsize_per_replica: batch size per model replica
            shuffle: If true, shuffle the dataset
            transform: a dict where transforms video and audio data
            num_samples: if not None, it will subsample dataset
            frames_per_clip: the No. of frames in a video clip
            video_width: rescaled video width. If 0, keep original width
            video_height: rescaled video height. If 0, keep original height
            video_min_dimension: rescale video so that min(height, width) =
                ``video_min_dimension``. If 0, keep original video resolution.
                Note only one of (``video_width``, ``video_height``)
                and (``video_min_dimension``) can be set
            audio_samples: desired audio sample rate. If 0, keep original
                audio sample rate.
            step_between_clips: Number of frames between each clip.
            frame_rate: desired video frame rate. If None, keep original video
                frame rate.
            clips_per_video: Number of clips to sample from each video
            video_dir: path to video folder
            splits_dir: path to dataset splitting file folder
            fold: UCF101 dataset has 3 folds. Valid values are 1, 2 and 3.
            metadata_filepath: path to the dataset meta data

        """
        # dataset metadata includes the path of video file, the pts of frames in
        # the video and other meta info such as video fps, duration, audio sample rate.
        # Users do not need to know the details of metadata. The computing, loading
        # and saving logic of metata are all handled inside of the dataset.
        # Given the "metadata_file" path, if such file exists, we load it as meta data.
        # Otherwise, we compute the meta data, and save it at "metadata_file" path.
        metadata = None
        if os.path.exists(metadata_filepath):
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



