ó
    EñiI  ã                   ó^   • S SK Jr  S SKJrJrJrJr  SSKJrJ	r	  SSK
JrJr   " S S\	5      rg)	é    )ÚPath)ÚAnyÚCallableÚOptionalÚUnioné   )Údefault_loaderÚImageFolder)Údownload_and_extract_archiveÚverify_str_argc                   óœ   ^ • \ rS rSrSrSrSrSSSS\4S\\	\
4   S	\	S
\\   S\\   S\S\\	/\4   SS4U 4S jjjrS\4S jrSS jrSrU =r$ )Ú
Country211é   a  `The Country211 Data Set <https://github.com/openai/CLIP/blob/main/data/country211.md>`_ from OpenAI.

This dataset was built by filtering the images from the YFCC100m dataset
that have GPS coordinate corresponding to a ISO-3166 country code. The
dataset is balanced by sampling 150 train images, 50 validation images, and
100 test images for each country.

Args:
    root (str or ``pathlib.Path``): Root directory of the dataset.
    split (string, optional): The dataset split, supports ``"train"`` (default), ``"valid"`` and ``"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 the target and transforms it.
    download (bool, optional): If True, downloads the dataset from the internet and puts it into
        ``root/country211/``. 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.
z;https://openaipublic.azureedge.net/clip/data/country211.tgzÚ 84988d7644798601126c29e9877aab6aÚtrainNFÚrootÚsplitÚ	transformÚtarget_transformÚdownloadÚloaderÚreturnc                 ó~  >• [        USS5      U l        [        U5      R                  5       n[	        U5      U l        US-  U l        U(       a  U R                  5         U R                  5       (       d  [        S5      e[        TU ]-  [	        U R                  U R                  -  5      UUUS9  [	        U5      U l        g )Nr   )r   ÚvalidÚtestÚ
country211z;Dataset not found. You can use download=True to download it)r   r   r   )r   Ú_splitr   Ú
expanduserÚstrr   Ú_base_folderÚ	_downloadÚ_check_existsÚRuntimeErrorÚsuperÚ__init__)Úselfr   r   r   r   r   r   Ú	__class__s          €Ú\/home/mande/repo/quber/.venv/lib/python3.13/site-packages/torchvision/datasets/country211.pyr%   ÚCountry211.__init__    s§   ø€ ô % U¨GÐ5OÓPˆŒä�D‹z×$Ñ$Ó&ˆÜ˜“IˆŒ	Ø  <Ñ/ˆÔæØ�N‰NÔà×!Ñ!×#Ñ#ÜÐ\Ó]Ð]ä‰ÑÜ�×!Ñ! D§K¡KÑ/Ó0ØØ-Øð	 	ñ 	
ô ˜“Iˆ�	ó    c                 óx   • U R                   R                  5       =(       a    U R                   R                  5       $ )N)r    ÚexistsÚis_dir©r&   s    r(   r"   ÚCountry211._check_exists=   s+   € Ø× Ñ ×'Ñ'Ó)×H¨d×.?Ñ.?×.FÑ.FÓ.HÐHr*   c                 ó‚   • U R                  5       (       a  g [        U R                  U R                  U R                  S9  g )N)Údownload_rootÚmd5)r"   r   Ú_URLr   Ú_MD5r.   s    r(   r!   ÚCountry211._download@   s,   € Ø×Ñ×ÑØÜ$ T§Y¡Y¸d¿i¹iÈTÏYÉYÓWr*   )r    r   r   )r   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r3   r4   r	   r   r   r   r   r   Úboolr   r%   r"   r!   Ú__static_attributes__Ú__classcell__)r'   s   @r(   r   r      s¬   ø† ñð( I€DØ-€Dð
 Ø(,Ø/3ØØ'5ñà�C˜�IÑðð ðð ˜HÑ%ð	ð
 # 8Ñ,ðð ðð ˜#˜ ˜Ñ$ðð 
÷ð ð:I˜tô I÷Xò Xr*   r   N)Úpathlibr   Útypingr   r   r   r   Úfolderr	   r
   Úutilsr   r   r   © r*   r(   Ú<module>rC      s"   ðÝ ß 1Ó 1ç /ß ?ô;X�õ ;Xr*   