+
     °³jø  ã                   ót   € ^ RI t ^ 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 ^RIHt  ! R R]4      tR# )	é    N)ÚPath)ÚAnyÚCallableÚOptionalÚUnion)ÚImage)Údownload_and_extract_archive)ÚVisionDatasetc                   óÐ   a a€ ] tR t^t oRtRtRR.tRtRtR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4       tV3R lR ltV3R lR ltRtVtV ;t# )ÚKittiu^  `KITTI <http://www.cvlibs.net/datasets/kitti/eval_object.php?obj_benchmark>`_ Dataset.

It corresponds to the "left color images of object" dataset, for object detection.

Args:
    root (str or ``pathlib.Path``): Root directory where images are downloaded to.
        Expects the following folder structure if download=False:

        .. code::

            <root>
                â””â”€â”€ Kitti
                    â””â”€ raw
                        â”œâ”€â”€ training
                        |   â”œâ”€â”€ image_2
                        |   â””â”€â”€ label_2
                        â””â”€â”€ testing
                            â””â”€â”€ image_2
    train (bool, optional): Use ``train`` split if true, else ``test`` split.
        Defaults to ``train``.
    transform (callable, optional): A function/transform that takes in a PIL image
        and returns a transformed version. E.g, ``transforms.PILToTensor``
    target_transform (callable, optional): A function/transform that takes in the
        target and transforms it.
    transforms (callable, optional): A function/transform that takes input sample
        and its target as entry and returns a transformed version.
    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.

z0https://s3.eu-central-1.amazonaws.com/avg-kitti/zdata_object_image_2.zipzdata_object_label_2.zipÚimage_2Úlabel_2c                ó„   <€ V ^8„  d   QhRS[ S[S[3,          RS[RS[S[,          RS[S[,          RS[S[,          RS[/# )é   ÚrootÚtrainÚ	transformÚtarget_transformÚ
transformsÚdownload)r   Ústrr   Úboolr   r   )ÚformatÚ__classdict__s   "€Ú[/home/luca/screen-checking/.venv/lib/python3.14/site-packages/torchvision/datasets/kitti.pyÚ__annotate__ÚKitti.__annotate__5   sg   ø€ ÷ _ñ _á‘C™�IÕð_ñ ð_ñ ™HÕ%ð	_ñ
 #¡8Õ,ð_ñ ™XÕ&ð_ñ ñ_ó    c           	     ó”  <€ \         S
V `  VVVVR 7       . V n        . V n        W n        V P                  '       d   RMRV n        V'       d   V P                  4        V P                  4       '       g   \        R4      h\        P                  P                  V P                  V P
                  V P                  4      pV P                  '       d@   \        P                  P                  V P                  V P
                  V P                  4      p\        P                  ! V4       F¡  p	V P                  P!                  \        P                  P                  Wy4      4       V P                  '       g   KO  V P                  P!                  \        P                  P                  XV	P#                  R4      ^ ,           R24      4       K£  	  R# ))r   r   r   ÚtrainingÚtestingz<Dataset not found. You may use download=True to download it.Ú.z.txtN)ÚsuperÚ__init__ÚimagesÚtargetsr   Ú	_locationr   Ú_check_existsÚRuntimeErrorÚosÚpathÚjoinÚ_raw_folderÚimage_dir_nameÚlabels_dir_nameÚlistdirÚappendÚsplit)Úselfr   r   r   r   r   r   Ú	image_dirÚ
labels_dirÚimg_fileÚ	__class__s   &&&&&&&   €r   r$   ÚKitti.__init__5   s9  ø€ ô 	‰ÑØØØ-Ø!ð	 	ô 	
ð ˆŒØˆŒØŒ
Ø'+§z§z z™°yˆŒçØ�M‰MŒOØ×!Ñ!×#Ò#ÜÐ]Ó^Ð^ä—G‘G—L‘L ×!1Ñ!1°4·>±>À4×CVÑCVÓWˆ	Ø�:�:ˆ:ÜŸ™Ÿ™ d×&6Ñ&6¸¿¹È×H\ÑH\Ó]ˆJÜŸ
š
 9Ö-ˆHØ�K‰K×ÑœrŸw™wŸ|™|¨IÓ@ÔAØ�z�zŠzØ—‘×#Ñ#¤B§G¡G§L¡L°ÀÇÁÈsÓ@SÐTUÕ@VÐ?WÐW[Ð=\Ó$]Ö^ó .r   c                ó<   <€ V ^8„  d   QhRS[ RS[S[S[3,          /# ©r   ÚindexÚreturn)ÚintÚtupler   )r   r   s   "€r   r   r   V   s#   ø€ ÷ ñ ¡ð ©©s±C¨x­ñ r   c                óê   € \         P                  ! V P                  V,          4      pV P                  '       d   V P	                  V4      MRpV P
                  '       d   V P                  W#4      w  r#W#3# )aT  Get item at a given index.

Args:
    index (int): Index
Returns:
    tuple: (image, target), where
    target is a list of dictionaries with the following keys:

    - type: str
    - truncated: float
    - occluded: int
    - alpha: float
    - bbox: float[4]
    - dimensions: float[3]
    - locations: float[3]
    - rotation_y: float

N)r   Úopenr%   r   Ú_parse_targetr   )r3   r;   ÚimageÚtargets   &&  r   Ú__getitem__ÚKitti.__getitem__V   sV   € ô& —
’
˜4Ÿ;™; uÕ-Ó.ˆØ.2¯j¯j¨j�×#Ñ# EÔ*¸dˆØ�?�?ˆ?Ø ŸO™O¨EÓ:‰MˆEØˆ}Ðr   c                ó&   <€ V ^8„  d   QhRS[ RS[/# r:   )r=   Úlist)r   r   s   "€r   r   r   o   s   ø€ ÷ ñ ¡3ð ©4ñ r   c                ó|  € . p\        V P                  V,          4      ;_uu_ 4       p\        P                  ! VR R7      pV FË  pTP	                  RV^ ,          R\        V^,          4      R\        V^,          4      R\        V^,          4      RVR,           Uu. uF  p\        V4      NK  	  upRVR	,           Uu. uF  p\        V4      NK  	  upR
VR,           Uu. uF  p\        V4      NK  	  upR\        V^,          4      /4       KÍ  	  RRR4       V# u upi u upi u upi   + '       g   i     T# ; i)Ú )Ú	delimiterÚtypeÚ	truncatedÚoccludedÚalphaÚbbox:é   é   NÚ
dimensions:rQ   é   NÚlocation:rS   é   NÚ
rotation_yN)r@   r&   ÚcsvÚreaderr1   Úfloatr=   )r3   r;   rC   ÚinpÚcontentÚlineÚxs   &&     r   rA   ÚKitti._parse_targeto   s   € ØˆÜ�$—,‘,˜uÕ%×&Ô&¨#Ü—j’j °Ô4ˆGÛ�Ø—‘à  Q¥Ø#¤U¨4°­7£^Ø"¤C¨¨Q­£LØ¤ t¨A¥w£Ø°4¸¶9Ó =±9¨a¤ q¦±9Ñ =Ø$¸¸d¾Ó&D¹°A¤u¨Q¦x¹Ñ&DØ"°t¸E¶{Ó$C±{°!¤U¨1¦X±{Ñ$CØ$¤e¨D°­H£oð	öñ  ÷ 'ð ˆùò !>ùÚ&DùÚ$C÷ 'Ö&ð ˆús6   §A4D*ÂD Â/D*Â=D $ÃD*ÃD%(Ã3D*ÄD*Ä*D;	c                ó    <€ V ^8„  d   QhRS[ /# ©r   r<   )r=   )r   r   s   "€r   r   r   ‚   s   ø€ ÷  ñ  ™ñ  r   c                ó,   € \        V P                  4      # ©N)Úlenr%   ©r3   s   &r   Ú__len__ÚKitti.__len__‚   s   € Ü�4—;‘;ÓÐr   c                ó    <€ V ^8„  d   QhRS[ /# r`   )r   )r   r   s   "€r   r   r   †   s   ø€ ÷ Gñ G™Sñ Gr   c                ó€   € \         P                  P                  V P                  V P                  P
                  R 4      # )Úraw)r*   r+   r,   r   r7   Ú__name__rd   s   &r   r-   ÚKitti._raw_folder…   s'   € ä�w‰w�|‰|˜DŸI™I t§~¡~×'>Ñ'>ÀÓFÐFr   c                ó    <€ V ^8„  d   QhRS[ /# r`   )r   )r   r   s   "€r   r   r   ‰   s   ø€ ÷ nñ n™tñ nr   c                óì   a € S P                   .pS P                  '       d   VP                  S P                  4       \        ;QJ d    V 3R lV 4       F  '       d   K   R# 	  R# ! V 3R lV 4       4      # )z#Check if the data directory exists.c              3   óÈ   <"  € T FW  p\         P                  P                  \         P                  P                  SP                  SP
                  V4      4      x € KY  	  R # 5irb   )r*   r+   Úisdirr,   r-   r'   )Ú.0Úfnamer3   s   & €r   Ú	<genexpr>Ú&Kitti._check_exists.<locals>.<genexpr>Ž   s@   øé € ÐmÑelÐ\a”2—7‘7—=‘=¤§¡§¡¨d×.>Ñ.>ÀÇÁÐPUÓ!V×WÐWÓelùs   ƒAA"FT)r.   r   r1   r/   Úall)r3   Úfolderss   f r   r(   ÚKitti._check_exists‰   sW   ø€ à×&Ñ&Ð'ˆØ�:�:ˆ:Ø�N‰N˜4×/Ñ/Ô0ß‹sÔmÑelÓm�sŒsÐmŠsÐmˆsÔmÑelÓmÓmÐmr   c                ó   <€ V ^8„  d   QhRR/# )r   r<   N© )r   r   s   "€r   r   r   �   s   ø€ ÷ ñ ˜$ñ r   c                óì   € V P                  4       '       d   R# \        P                  ! V P                  RR7       V P                   F)  p\        V P                   V 2V P                  VR7       K+  	  R# )z4Download the KITTI data if it doesn't exist already.NT)Úexist_ok)ÚurlÚdownload_rootÚfilename)r(   r*   Úmakedirsr-   Ú	resourcesr	   Údata_url)r3   rq   s   & r   r   ÚKitti.download�   s^   € ð ×Ñ×ÒÙä
�Š�D×$Ñ$¨tÕ4ð —^”^ˆEÜ(Ø—}‘}�o e WÐ-Ø"×.Ñ.Ø÷ó $r   )r'   r%   r&   r   )TNNNF)rj   Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r€   r   r.   r/   r$   rD   rA   re   Úpropertyr-   r(   r   Ú__static_attributes__Ú__classdictcell__Ú__classcell__)r7   r   s   @@r   r   r      sˆ   ù‡ € ñð@ B€Hà!Ø!ð€Ið €NØ€O÷_õ _÷Bð ÷2ð ÷& ð  ð ÷Gó ðG÷nð n÷÷ ð r   r   )rW   r*   Úpathlibr   Útypingr   r   r   r   ÚPILr   Úutilsr	   Úvisionr
   r   rx   r   r   Ú<module>r�      s+   ðÛ 
Û 	Ý ß 1Ó 1å å /Ý !ôRˆMö Rr   