o
    þÏ¯iª	  ã                   @   sª   d dl mZmZmZmZmZ d dlZd dlmZ ddl	m
Z
m	Z	 	 ejjjddddfd	ed
edeejjj deeeeef geeef f  dededede
fdd„ZdS )é    )ÚAnyÚCallableÚDictÚOptionalÚTypeN)ÚClipSampleré   )ÚLabeledVideoDatasetÚlabeled_video_datasetÚ TÚpyavÚ	data_pathÚclip_samplerÚvideo_samplerÚ	transformÚvideo_path_prefixÚdecode_audioÚdecoderÚreturnc                 C   s    t j d¡ t| ||||||ƒS )aÌ  
    A helper function to create ``LabeledVideoDataset`` object for the Ucf101 dataset.

    Args:
        data_path (str): Path to the data. The path type defines how the data
            should be read:

            * For a file path, the file is read and each line is parsed into a
              video path and label.
            * For a directory, the directory structure defines the classes
              (i.e. each subdirectory is a class).

        clip_sampler (ClipSampler): Defines how clips should be sampled from each
                video. See the clip sampling documentation for more information.

        video_sampler (Type[torch.utils.data.Sampler]): Sampler for the internal
                video container. This defines the order videos are decoded and,
                if necessary, the distributed split.

        transform (Callable): This callable is evaluated on the clip output before
                the clip is returned. It can be used for user defined preprocessing and
                augmentations to the clips. See the ``LabeledVideoDataset`` class for clip
                output format.

        video_path_prefix (str): Path to root directory with the videos that are
                loaded in ``LabeledVideoDataset``. All the video paths before loading
                are prefixed with this path.

        decode_audio (bool): If True, also decode audio from video.

        decoder (str): Defines what type of decoder used to decode a video.

    zPYTORCHVIDEO.dataset.Ucf101)ÚtorchÚ_CÚ_log_api_usage_oncer
   )r   r   r   r   r   r   r   © r   úL/home/ubuntu/.local/lib/python3.10/site-packages/pytorchvideo/data/ucf101.pyÚUcf101   s   +ùr   )Útypingr   r   r   r   r   r   Úpytorchvideo.data.clip_samplingr   r
   r	   ÚutilsÚdataÚRandomSamplerÚstrÚSamplerÚboolr   r   r   r   r   Ú<module>   s6   	ùÿþý üûúùø