+
     °³j  ã                   óx   € ^ RI t ^ RIt^ RIHtHtHtHt ^ RIHt ^RI	H
t
 ^RIHtHt ^RIHt  ! R R]4      tR# )	é    N)ÚAnyÚCallableÚOptionalÚUnion)Úurlparse)Údefault_loader)Údownload_and_extract_archiveÚverify_str_arg)ÚVisionDatasetc                   ó²   a a€ ] tR t^t oRtRtRtRRRR]3V3R lV 3R llltV3R	 lR
 lt	V3R lR l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# )ÚCLEVRClassificationax  `CLEVR <https://cs.stanford.edu/people/jcjohns/clevr/>`_  classification dataset.

The number of objects in a scene are used as label.

Args:
    root (str or ``pathlib.Path``): Root directory of dataset where directory ``root/clevr`` exists or will be saved to if download is
        set to True.
    split (string, optional): The dataset split, supports ``"train"`` (default), ``"val"``, or ``"test"``.
    transform (callable, optional): A function/transform that takes in a PIL image or torch.Tensor, depends on the given loader,
        and returns a transformed version. E.g, ``transforms.RandomCrop``
    target_transform (callable, optional): A function/transform that takes in them target and transforms it.
    download (bool, optional): If true, downloads the dataset from the internet and puts it in root directory. If
        dataset is already downloaded, it is not downloaded again.
    loader (callable, optional): A function to load an image given its path.
        By default, it uses PIL as its image loader, but users could also pass in
        ``torchvision.io.decode_image`` for decoding image data into tensors directly.
z3https://dl.fbaipublicfiles.com/clevr/CLEVR_v1.0.zipÚ b11922020e72d0cd9154779b2d3d07d2ÚtrainNFc                óÎ   <€ V ^8„  d   QhRS[ S[S[P                  3,          RS[RS[S[,          RS[S[,          RS[RS[S[ S[S[P                  3,          .S[3,          RR/# )	é   ÚrootÚsplitÚ	transformÚtarget_transformÚdownloadÚloaderÚreturnN)r   ÚstrÚpathlibÚPathr   r   Úboolr   )ÚformatÚ__classdict__s   "€Ú[/home/luca/screen-checking/.venv/lib/python3.14/site-packages/torchvision/datasets/clevr.pyÚ__annotate__Ú CLEVRClassification.__annotate__"   s„   ø€ ÷ ;ñ ;á‘C™Ÿ™Ð%Õ&ð;ñ ð;ñ ™HÕ%ð	;ñ
 #¡8Õ,ð;ñ ð;ñ ™%¡¡W§\¡\Ð 1Õ2Ð3±SÐ8Õ9ð;ð 
ñ;ó    c                óh  <€ \        VR R4      V n        \        SV `  WVR7       W`n        \
        P                  ! V P                  4      R,          V n        V P                  \
        P                  ! \        V P                  4      P                  4      P                  ,          V n        V'       d   V P                  4        V P                  4       '       g   \!        R4      h\#        V P                  P%                  RV P                  4      P'                  R4      4      V n        V  V P                  R8w  d»   \+        V P                  R,          RV P                   R	2,          4      ;_uu_ 4       p\,        P.                  ! V4      pR
R
R
4       XR,           U	u/ uF  q™R,          \1        V	R,          4      bK  	  p
p	V P(                   Uu. uF  qºVP2                  ,          NK  	  upV n        R
# R
.\1        V P(                  4      ,          V n        R
#   + '       g   i     L–; iu up	i u upi )r   Útest)r   r   ÚclevrzHDataset not found or corrupted. You can use download=True to download itÚimagesÚ*ÚscenesÚCLEVR_z_scenes.jsonNÚimage_filenameÚobjects)r   Úvalr$   )r
   Ú_splitÚsuperÚ__init__r   r   r   r   Ú_base_folderr   Ú_URLÚpathÚstemÚ_data_folderÚ	_downloadÚ_check_existsÚRuntimeErrorÚsortedÚjoinpathÚglobÚ_image_filesÚopenÚjsonÚloadÚlenÚnameÚ_labels)Úselfr   r   r   r   r   r   ÚfileÚcontentÚsceneÚnum_objectsÚ
image_fileÚ	__class__s   &&&&&&&     €r   r/   ÚCLEVRClassification.__init__"   s�  ø€ ô % U¨GÐ5MÓNˆŒÜ‰Ñ˜ÐEUÐÔVØŒÜ#ŸLšL¨¯©Ó3°gÕ=ˆÔØ ×-Ñ-´·²¼XÀdÇiÁiÓ=P×=UÑ=UÓ0V×0[Ñ0[Õ[ˆÔçØ�N‰NÔà×!Ñ!×#Ò#ÜÐiÓjÐjä" 4×#4Ñ#4×#=Ñ#=¸hÈÏÉÓ#T×#YÑ#YÐZ]Ó#^Ó_ˆÔáØ�;‰;˜&Ô Ü�d×'Ñ'¨(Õ2°v¸d¿k¹k¸]È,Ð5WÕW×XÔXÐ\`ÜŸ)š) D›/�÷ YàW^Ð_gÖWhÓiÑWhÈeÐ!1Õ2´C¸¸iÕ8HÓ4IÒIÑWhˆKÐiØKO×K\ÒK\Ó]ÑK\¸Z¨
¯©×8Ð8ÑK\Ñ]ˆDŽLà ˜6¤C¨×(9Ñ(9Ó$:Õ:ˆDŽL÷ Y×XüâiùÚ]s   Å2HÆ"H*ÇH/ÈH'	c                ó    <€ V ^8„  d   QhRS[ /# ©r   r   )Úint)r   r   s   "€r   r    r!   B   s   ø€ ÷ &ñ &™ñ &r"   c                ó,   € \        V P                  4      # ©N)r?   r;   ©rB   s   &r   Ú__len__ÚCLEVRClassification.__len__B   s   € Ü�4×$Ñ$Ó%Ð%r"   c                ó<   <€ V ^8„  d   QhRS[ RS[S[S[3,          /# )r   Úidxr   )rL   Útupler   )r   r   s   "€r   r    r!   E   s#   ø€ ÷ ñ ™sð ¡u©S±#¨X¥ñ r"   c                ó  € V P                   V,          pV P                  V,          pV P                  V4      pV P                  '       d   V P                  V4      pV P                  '       d   V P	                  V4      pWC3# rN   )r;   rA   r   r   r   )rB   rS   rG   ÚlabelÚimages   &&   r   Ú__getitem__ÚCLEVRClassification.__getitem__E   si   € Ø×&Ñ& sÕ+ˆ
Ø—‘˜SÕ!ˆà—‘˜JÓ'ˆà�>�>ˆ>Ø—N‘N 5Ó)ˆEà× × Ð Ø×)Ñ)¨%Ó0ˆEàˆ|Ðr"   c                ó    <€ V ^8„  d   QhRS[ /# rK   )r   )r   r   s   "€r   r    r!   S   s   ø€ ÷ Iñ I™tñ Ir"   c                óz   € V P                   P                  4       ;'       d    V P                   P                  4       # rN   )r4   ÚexistsÚis_dirrO   s   &r   r6   Ú!CLEVRClassification._check_existsS   s.   € Ø× Ñ ×'Ñ'Ó)×HÐH¨d×.?Ñ.?×.FÑ.FÓ.HÐHr"   c                ó   <€ V ^8„  d   QhRR/# )r   r   N© )r   r   s   "€r   r    r!   V   s   ø€ ÷ Wñ W˜4ñ Wr"   c                ó    € V P                  4       '       d   R # \        V P                  \        V P                  4      V P
                  R7       R # )N)Úmd5)r6   r	   r1   r   r0   Ú_MD5rO   s   &r   r5   ÚCLEVRClassification._downloadV   s3   € Ø×Ñ×ÒÙä$ T§Y¡Y´°D×4EÑ4EÓ0FÈDÏIÉI×Vr"   c                ó    <€ V ^8„  d   QhRS[ /# rK   )r   )r   r   s   "€r   r    r!   \   s   ø€ ÷ &ñ &™Cñ &r"   c                ó    € R V P                    2# )zsplit=)r-   rO   s   &r   Ú
extra_reprÚCLEVRClassification.extra_repr\   s   € Ø˜Ÿ™�}Ð%Ð%r"   )r0   r4   r;   rA   r-   r   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r1   rc   r   r/   rP   rX   r6   r5   rg   Ú__static_attributes__Ú__classdictcell__Ú__classcell__)rH   r   s   @@r   r   r      sn   ù‡ € ñð$ A€DØ-€Dð
 Ø(,Ø/3ØØ<J÷;õ ;÷@&ð &÷ð ÷Ið I÷Wð W÷&÷ &ð &r"   r   )r=   r   Útypingr   r   r   r   Úurllib.parser   Úfolderr   Úutilsr	   r
   Úvisionr   r   r`   r"   r   Ú<module>rv      s+   ðÛ Û ß 1Ó 1Ý !å "ç ?Ý !ôQ&˜-ö Q&r"   