+
     °³jŠ  ã                   ó|   € ^ RI t ^ RIHt ^ RIHtHtHtHt ^ RIH	t	 ^RI
HtHt ^RIHt ^RIHt  ! R R	]4      tR# )
é    N)ÚPath)ÚAnyÚCallableÚOptionalÚUnion)ÚTensor)Úfind_classesÚmake_dataset)Ú
VideoClips)ÚVisionDatasetc                   ó˜   a a€ ] tR t^t oRtRV3R lV 3R lllt]V3R lR l4       tV3R lR ltV3R lR	 lt	V3R
 lR lt
RtVtV ;t# )ÚUCF101aU  
`UCF101 <https://www.crcv.ucf.edu/data/UCF101.php>`_ dataset.

UCF101 is an action recognition video dataset.
This dataset consider every video as a collection of video clips of fixed size, specified
by ``frames_per_clip``, where the step in frames between each clip is given by
``step_between_clips``. The dataset itself can be downloaded from the dataset website;
annotations that ``annotation_path`` should be pointing to can be downloaded from `here
<https://www.crcv.ucf.edu/data/UCF101/UCF101TrainTestSplits-RecognitionTask.zip>`_.

To give an example, for 2 videos with 10 and 15 frames respectively, if ``frames_per_clip=5``
and ``step_between_clips=5``, the dataset size will be (2 + 3) = 5, where the first two
elements will come from video 1, and the next three elements from video 2.
Note that we drop clips which do not have exactly ``frames_per_clip`` elements, so not all
frames in a video might be present.

Internally, it uses a VideoClips object to handle clip creation.

Args:
    root (str or ``pathlib.Path``): Root directory of the UCF101 Dataset.
    annotation_path (str): path to the folder containing the split files;
        see docstring above for download instructions of these files
    frames_per_clip (int): number of frames in a clip.
    step_between_clips (int, optional): number of frames between each clip.
    fold (int, optional): which fold to use. Should be between 1 and 3.
    train (bool, optional): if ``True``, creates a dataset from the train split,
        otherwise from the ``test`` split.
    transform (callable, optional): A function/transform that takes in a TxHxWxC video
        and returns a transformed version.
    output_format (str, optional): The format of the output video tensors (before transforms).
        Can be either "THWC" (default) or "TCHW".

Returns:
    tuple: A 3-tuple with the following entries:

        - video (Tensor[T, H, W, C] or Tensor[T, C, H, W]): The `T` video frames
        -  audio(Tensor[K, L]): the audio frames, where `K` is the number of channels
           and `L` is the number of points
        - label (int): class of the video clip
c                 óÔ   <€ V ^8„  d   QhRS[ S[S[3,          RS[RS[RS[RS[S[,          RS[RS[RS[S[,          R	S[S[S[S[3,          ,          R
S[RS[RS[RS[RS[RS[RR/# )é   ÚrootÚannotation_pathÚframes_per_clipÚstep_between_clipsÚ
frame_rateÚfoldÚtrainÚ	transformÚ_precomputed_metadataÚnum_workersÚ_video_widthÚ_video_heightÚ_video_min_dimensionÚ_audio_samplesÚoutput_formatÚreturnN)	r   Ústrr   Úintr   Úboolr   Údictr   )ÚformatÚ__classdict__s   "€Ú\/home/luca/screen-checking/.venv/lib/python3.14/site-packages/torchvision/datasets/ucf101.pyÚ__annotate__ÚUCF101.__annotate__6   sÊ   ø€ ÷ 0#ñ 0#á‘C™�IÕð0#ñ ð0#ñ ð	0#ñ
  ð0#ñ ™S•Mð0#ñ ð0#ñ ð0#ñ ™HÕ%ð0#ñ  (©©S±#¨X­Õ7ð0#ñ ð0#ñ ð0#ñ ð0#ñ "ð0#ñ ð0#ñ  ð!0#ð" 
ñ#0#ó    c                óú  <€ \         SV `  V4       ^Tu;8:  d   ^8:  g   M \        RV 24      hRpW`n        Wpn        \        V P                  4      w  V n        p\        V P                  VVRR7      V n	        V P                   Uu. uF  pV^ ,          NK  	  pp\        VVVVV	V
VVVVVR7      pVV n        V P                  VW&V4      V n        VP                  V P                  4      V n        W€n        R# u upi )é   z$fold should be between 1 and 3, got N)Úis_valid_file)r   r   r   r   r   r   )Úavi)ÚsuperÚ__init__Ú
ValueErrorr   r   r	   r   Úclassesr
   Úsamplesr   Úfull_video_clipsÚ_select_foldÚindicesÚsubsetÚvideo_clipsr   )Úselfr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   Ú
extensionsÚclass_to_idxÚxÚ
video_listr8   Ú	__class__s   &&&&&&&&&&&&&&&&     €r'   r0   ÚUCF101.__init__6   sõ   ø€ ô$ 	‰Ñ˜ÔØ�DŽ~˜AŽ~ÜÐCÀDÀ6ÐJÓKÐKàˆ
ØŒ	ØŒ
ä%1°$·)±)Ó%<Ñ"ˆŒ�lÜ# D§I¡I¨|¸ZÐW[Ô\ˆŒØ$(§L¢LÓ1¡L˜q�a˜—d�d¡Lˆ
Ð1Ü ØØØØØ!Ø#Ø%Ø'Ø!5Ø)Ø'ô
ˆð  !,ˆÔØ×(Ñ(¨°_ÈEÓRˆŒØ&×-Ñ-¨d¯l©lÓ;ˆÔØ"Žùò) 2s   ÂC8c                ó6   <€ V ^8„  d   QhRS[ S[S[3,          /# ©r   r    )r$   r!   r   )r%   r&   s   "€r'   r(   r)   i   s   ø€ ÷ .ñ .™$™s¡C˜x�.ñ .r*   c                ó.   € V P                   P                  # ©N)r4   Úmetadata©r9   s   &r'   rD   ÚUCF101.metadatah   s   € à×$Ñ$×-Ñ-Ð-r*   c                óX   <€ V ^8„  d   QhRS[ S[,          RS[RS[RS[RS[ S[,          /# )r   r=   r   r   r   r    )Úlistr!   r"   r#   )r%   r&   s   "€r'   r(   r)   l   s<   ø€ ÷ ñ ¡t©C¥yð Á3ð Écð ÑZ^ð ÑcgÑhkÕclñ r*   c                ó   € V'       d   R MRpV RVR R2p\         P                  P                  W%4      p\        4       p\	        V4      ;_uu_ 4       pVP                  4       p	V	 U
u. uF(  qªP                  4       P                  R4      ^ ,          NK*  	  p	p
V	 U
u. uF>  p
\         P                  P                  ! V P                  .V
P                  R4      O5!  NK@  	  p	p
VP                  V	4       RRR4       \        \        V4      4       Uu. uF  q±V,          V9   g   K  VNK  	  ppV# u up
i u up
i   + '       g   i     LN; iu upi )r   ÚtestrH   Ú02dz.txtÚ Ú/N)ÚosÚpathÚjoinÚsetÚopenÚ	readlinesÚstripÚsplitr   ÚupdateÚrangeÚlen)r9   r=   r   r   r   ÚnameÚfÚselected_filesÚfidÚdatar<   Úir6   s   &&&&&        r'   r5   ÚUCF101._select_foldl   s  € ß‰w VˆØ��t˜D ˜: TÐ*ˆÜ�G‰G�L‰L˜Ó/ˆÜ›ˆÜ�!�WŒW˜Ø—=‘=“?ˆDÙ59Ó:±T°—G‘G“I—O‘O CÓ(¨×+Ð+±TˆDÐ:ÙDHÓIÁD¸q”B—G‘G—L’L §¡Ð:¨Q¯W©W°S«\Ö:ÁDˆDÐIØ×!Ñ! $Ô'÷	 ô
 $¤C¨
£OÔ4ÓXÑ4˜À1½ÈÑ8W—1�1Ñ4ˆÐXØˆùò	 ;ùÚI÷ �Wüò
 Ys7   ÁD8Á'.D.ÂD8ÂAD3ÃD8ÄEÄ$EÄ.
D8Ä8E	c                ó    <€ V ^8„  d   QhRS[ /# rA   )r"   )r%   r&   s   "€r'   r(   r)   y   s   ø€ ÷ ,ñ ,™ñ ,r*   c                ó6   € V P                   P                  4       # rC   )r8   Ú	num_clipsrE   s   &r'   Ú__len__ÚUCF101.__len__y   s   € Ø×Ñ×)Ñ)Ó+Ð+r*   c                ó@   <€ V ^8„  d   QhRS[ RS[S[S[S[ 3,          /# )r   Úidxr    )r"   Útupler   )r%   r&   s   "€r'   r(   r)   |   s'   ø€ ÷ #ñ #™sð #¡u©V±V¹SÐ-@Õ'Añ #r*   c                óÚ   € V P                   P                  V4      w  r#rEV P                  V P                  V,          ,          ^,          pV P                  e   V P	                  V4      pW#V3# )r,   )r8   Úget_clipr3   r6   r   )r9   rf   ÚvideoÚaudioÚinfoÚ	video_idxÚlabels   &&     r'   Ú__getitem__ÚUCF101.__getitem__|   s\   € Ø(,×(8Ñ(8×(AÑ(AÀ#Ó(FÑ%ˆ�dØ—‘˜TŸ\™\¨)Õ4Õ5°aÕ8ˆà�>‰>Ò%Ø—N‘N 5Ó)ˆEà˜UÐ"Ð"r*   )r2   r   r4   r6   r3   r   r   r8   )r,   Nr,   TNNr,   r   r   r   r   ÚTHWC)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r0   ÚpropertyrD   r5   rc   ro   Ú__static_attributes__Ú__classdictcell__Ú__classcell__)r>   r&   s   @@r'   r   r      sM   ù‡ € ñ'÷R0#õ 0#ðd ÷.ó ð.÷ð ÷,ð ,÷#÷ #ð #r*   r   )rN   Úpathlibr   Útypingr   r   r   r   Útorchr   Úfolderr	   r
   Úvideo_utilsr   Úvisionr   r   © r*   r'   Ú<module>r‚      s+   ðÛ 	Ý ß 1Ó 1å ç .Ý #Ý !ôw#ˆ]ö w#r*   