§
    ‚ŠtjXZ  ã                   óª  — d dl Z d dlZd dlZd dlmZmZ d dlZd dlm	Z	 ddl
mZ ddlmZ ddlmZmZ ddlmZmZmZmZmZmZ dd	lmZmZ  ed
d¬¦  «        Z ej        e¦  «        Z G d„ de¦  «        Z G d„ de¦  «        Z  ee j!        ¦  «        e _!        e j!        j"        �.e j!        j"         #                    ddd¬¦  «        e j!        _"        dS dS )é    N)ÚAnyÚTypeVar)Úis_offline_modeé   )Úcustom_object_save)ÚBatchFeature)Úis_valid_imageÚ
load_image)ÚIMAGE_PROCESSOR_NAMEÚPROCESSOR_NAMEÚPushToHubMixinÚ	copy_funcÚloggingÚsafe_load_json_file)Úcached_fileÚhf_apiÚImageProcessorTypeÚImageProcessingMixin)Úboundc                   ó   — e Zd ZdZdS )r   aó  
    Holds the output of the image processor specific `__call__` methods.

    This class is derived from a python dictionary and can be used as a dictionary.

    Args:
        data (`dict`):
            Dictionary of lists/arrays/tensors returned by the __call__ method ('pixel_values', etc.).
        tensor_type (`Union[None, str, TensorType]`, *optional*):
            You can give a tensor_type here to convert the lists of integers in PyTorch/Numpy Tensors at
            initialization.
    N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__© ó    ú`/var/www/html/CA-Chatbot/venv/lib/python3.11/site-packages/transformers/image_processing_base.pyr   r   -   s   € € € € € ðð ð ð r   r   c                   ó  — e Zd ZdZdZd„ Ze	 	 	 	 	 d dee         de	e
j        z  de	e
j        z  dz  d	ed
ede	ez  dz  de	defd„¦   «         Zd!de	e
j        z  defd„Zede	e
j        z  deee	ef         ee	ef         f         fd„¦   «         Zedee	ef         fd„¦   «         Zdee	ef         fd„Zede	e
j        z  fd„¦   «         Zde	fd„Zde	e
j        z  fd„Zd„ Zed"d„¦   «         Zde	ee	         z  eee	                  z  fd„ZdS )#r   zˆ
    This is an image processor mixin used to provide saving/loading functionality for sequential and image feature
    extractors.
    Nc           
      ó$  — |                      dd¦  «         |                      dd¦  «         |                     ¦   «         D ]N\  }}	 t          | ||¦  «         Œ# t          $ r*}t                               d|› d|› d| › �¦  «         |‚d}~ww xY wdS )z'Set elements of `kwargs` as attributes.Úfeature_extractor_typeNÚprocessor_classz
Can't set z with value z for )ÚpopÚitemsÚsetattrÚAttributeErrorÚloggerÚerror)ÚselfÚkwargsÚkeyÚvalueÚerrs        r   Ú__init__zImageProcessingMixin.__init__E   s¼   € ð 	�
Š
Ð+¨TÑ2Ô2Ð2à�
Š
Ð$ dÑ+Ô+Ð+à Ÿ,š,™.œ.ð 	ð 	‰JˆC�ðÝ˜˜c 5Ñ)Ô)Ð)Ð)øÝ!ð ð ð Ý—’ÐM¨#ÐMÐM¸5ÐMÐMÀtÐMÐMÑNÔNÐNØ�	øøøøðøøøð	ð 	s   ÁAÁ
BÁ#%BÂBFÚmainÚclsÚpretrained_model_name_or_pathÚ	cache_dirÚforce_downloadÚlocal_files_onlyÚtokenÚrevisionÚreturnc                 óv   — ||d<   ||d<   ||d<   ||d<   |�||d<    | j         |fi |¤Ž\  }} | j        |fi |¤ŽS )aê  
        Instantiate a type of [`~image_processing_utils.ImageProcessingMixin`] from an image processor.

        Args:
            pretrained_model_name_or_path (`str` or `os.PathLike`):
                This can be either:

                - a string, the *model id* of a pretrained image_processor hosted inside a model repo on
                  huggingface.co.
                - a path to a *directory* containing a image processor file saved using the
                  [`~image_processing_utils.ImageProcessingMixin.save_pretrained`] method, e.g.,
                  `./my_model_directory/`.
                - a path to a saved image processor JSON *file*, e.g.,
                  `./my_model_directory/preprocessor_config.json`.
            cache_dir (`str` or `os.PathLike`, *optional*):
                Path to a directory in which a downloaded pretrained model image processor should be cached if the
                standard cache should not be used.
            force_download (`bool`, *optional*, defaults to `False`):
                Whether or not to force to (re-)download the image processor files and override the cached versions if
                they exist.
            proxies (`dict[str, str]`, *optional*):
                A dictionary of proxy servers to use by protocol or endpoint, e.g., `{'http': 'foo.bar:3128',
                'http://hostname': 'foo.bar:4012'}.` The proxies are used on each request.
            token (`str` or `bool`, *optional*):
                The token to use as HTTP bearer authorization for remote files. If `True`, or not specified, will use
                the token generated when running `hf auth login` (stored in `~/.huggingface`).
            revision (`str`, *optional*, defaults to `"main"`):
                The specific model version to use. It can be a branch name, a tag name, or a commit id, since we use a
                git-based system for storing models and other artifacts on huggingface.co, so `revision` can be any
                identifier allowed by git.


                <Tip>

                To test a pull request you made on the Hub, you can pass `revision="refs/pr/<pr_number>"`.

                </Tip>

            return_unused_kwargs (`bool`, *optional*, defaults to `False`):
                If `False`, then this function returns just the final image processor object. If `True`, then this
                functions returns a `Tuple(image_processor, unused_kwargs)` where *unused_kwargs* is a dictionary
                consisting of the key/value pairs whose keys are not image processor attributes: i.e., the part of
                `kwargs` which has not been used to update `image_processor` and is otherwise ignored.
            subfolder (`str`, *optional*, defaults to `""`):
                In case the relevant files are located inside a subfolder of the model repo on huggingface.co, you can
                specify the folder name here.
            kwargs (`dict[str, Any]`, *optional*):
                The values in kwargs of any keys which are image processor attributes will be used to override the
                loaded values. Behavior concerning key/value pairs whose keys are *not* image processor attributes is
                controlled by the `return_unused_kwargs` keyword parameter.

        Returns:
            A image processor of type [`~image_processing_utils.ImageProcessingMixin`].

        Examples:

        ```python
        # We can't instantiate directly the base class *ImageProcessingMixin* so let's show the examples on a
        # derived class: *CLIPImageProcessor*
        image_processor = CLIPImageProcessor.from_pretrained(
            "openai/clip-vit-base-patch32"
        )  # Download image_processing_config from huggingface.co and cache.
        image_processor = CLIPImageProcessor.from_pretrained(
            "./test/saved_model/"
        )  # E.g. image processor (or model) was saved using *save_pretrained('./test/saved_model/')*
        image_processor = CLIPImageProcessor.from_pretrained("./test/saved_model/preprocessor_config.json")
        image_processor = CLIPImageProcessor.from_pretrained(
            "openai/clip-vit-base-patch32", do_normalize=False, foo=False
        )
        assert image_processor.do_normalize is False
        image_processor, unused_kwargs = CLIPImageProcessor.from_pretrained(
            "openai/clip-vit-base-patch32", do_normalize=False, foo=False, return_unused_kwargs=True
        )
        assert image_processor.do_normalize is False
        assert unused_kwargs == {"foo": False}
        ```r1   r2   r3   r5   Nr4   )Úget_image_processor_dictÚ	from_dict)	r/   r0   r1   r2   r3   r4   r5   r)   Úimage_processor_dicts	            r   Úfrom_pretrainedz$ImageProcessingMixin.from_pretrainedT   s{   € ðn (ˆˆ{ÑØ#1ˆÐÑ Ø%5ˆÐ!Ñ"Ø%ˆˆzÑàÐØ#ˆF�7‰Oà'C sÔ'CÐDaÐ'lÐ'lÐekÐ'lÐ'lÑ$Ð˜fàˆsŒ}Ð1Ð<Ð<°VÐ<Ð<Ð<r   Úsave_directoryÚpush_to_hubc           	      óî  — t           j                             |¦  «        rt          d|› d�¦  «        ‚t          j        |d¬¦  «         |rŠ|                     dd¦  «        }|                     d|                     t           j        j        ¦  «        d         ¦  «        } t          ¦   «         j	        |fd	di|¤Žj
        }|                      |¦  «        }| j        �t          | || ¬
¦  «         t           j                             |t          ¦  «        }|                      |¦  «         t"                               d|› �¦  «         |r-|                      |||||                     d¦  «        ¬¦  «         |gS )as  
        Save an image processor object to the directory `save_directory`, so that it can be re-loaded using the
        [`~image_processing_utils.ImageProcessingMixin.from_pretrained`] class method.

        Args:
            save_directory (`str` or `os.PathLike`):
                Directory where the image processor JSON file will be saved (will be created if it does not exist).
            push_to_hub (`bool`, *optional*, defaults to `False`):
                Whether or not to push your model to the Hugging Face model hub after saving it. You can specify the
                repository you want to push to with `repo_id` (will default to the name of `save_directory` in your
                namespace).
            kwargs (`dict[str, Any]`, *optional*):
                Additional key word arguments passed along to the [`~utils.PushToHubMixin.push_to_hub`] method.
        zProvided path (z#) should be a directory, not a fileT)Úexist_okÚcommit_messageNÚrepo_idéÿÿÿÿr?   )ÚconfigzImage processor saved in r4   )r@   r4   )ÚosÚpathÚisfileÚAssertionErrorÚmakedirsr"   ÚsplitÚsepr   Úcreate_reporA   Ú_get_files_timestampsÚ_auto_classr   Újoinr   Úto_json_filer&   ÚinfoÚ_upload_modified_filesÚget)r(   r<   r=   r)   r@   rA   Úfiles_timestampsÚoutput_image_processor_files           r   Úsave_pretrainedz$ImageProcessingMixin.save_pretrained·   s€  € õ Œ7�>Š>˜.Ñ)Ô)ð 	hÝ Ð!f°>Ð!fÐ!fÐ!fÑgÔgÐgå
Œ�N¨TÐ2Ñ2Ô2Ð2àð 	JØ#ŸZšZÐ(8¸$Ñ?Ô?ˆNØ—j’j ¨N×,@Ò,@ÅÄÄÑ,MÔ,MÈbÔ,QÑRÔRˆGØ*•f‘h”hÔ*¨7ÐLÐL¸TÐLÀVÐLÐLÔTˆGØ#×9Ò9¸.ÑIÔIÐð ÔÐ'Ý˜t ^¸DÐAÑAÔAÐAõ ')¤g§l¢l°>ÕCWÑ&XÔ&XÐ#à×ÒÐ5Ñ6Ô6Ð6Ý�ŠÐMÐ0KÐMÐMÑNÔNÐNàð 	Ø×'Ò'ØØØ Ø-Ø—j’j Ñ)Ô)ð (ñ ô ð ð ,Ð,Ð,r   c                 óX  — |                      dd¦  «        }|                      dd¦  «        }|                      dd¦  «        }|                      dd¦  «        }|                      dd¦  «        }|                      dd¦  «        }|                      d	d
¦  «        }	|                      dt          ¦  «        }
|                      dd¦  «        }|                      dd¦  «        }d|dœ}|�||d<   t          ¦   «         r|st                               d¦  «         d}t          |¦  «        }t          j                             |¦  «        }t          j                             |¦  «        r t          j         	                    ||
¦  «        }t          j         
                    |¦  «        r|}d}d}nn|
}	 t          |t          ||||||||	d¬¦  «        }t          ||||||||||	d¬¦  «        }n1# t          $ r ‚ t          $ r t          d|› d|› d|
› d�¦  «        ‚w xY wd}|�t          |¦  «        }d|v r|d         }|�|€t          |¦  «        }|€t          d|› d|› d|
› d�¦  «        ‚|rt                               d|› �¦  «         n t                               d|› d|› �¦  «         ||fS )aÉ  
        From a `pretrained_model_name_or_path`, resolve to a dictionary of parameters, to be used for instantiating a
        image processor of type [`~image_processor_utils.ImageProcessingMixin`] using `from_dict`.

        Parameters:
            pretrained_model_name_or_path (`str` or `os.PathLike`):
                The identifier of the pre-trained checkpoint from which we want the dictionary of parameters.
            subfolder (`str`, *optional*, defaults to `""`):
                In case the relevant files are located inside a subfolder of the model repo on huggingface.co, you can
                specify the folder name here.
            image_processor_filename (`str`, *optional*, defaults to `"config.json"`):
                The name of the file in the model directory to use for the image processor config.

        Returns:
            `tuple[Dict, Dict]`: The dictionary(ies) that will be used to instantiate the image processor object.
        r1   Nr2   FÚproxiesr4   r3   r5   Ú	subfolderÚ Úimage_processor_filenameÚ_from_pipelineÚ
_from_autoúimage processor)Ú	file_typeÚfrom_auto_classÚusing_pipelinez+Offline mode: forcing local_files_only=TrueT)
Úfilenamer1   r2   rW   r3   r4   Ú
user_agentr5   rX   Ú%_raise_exceptions_for_missing_entriesz Can't load image processor for 'zœ'. If you were trying to load it from 'https://huggingface.co/models', make sure you don't have a local directory with the same name. Otherwise, make sure 'z2' is the correct path to a directory containing a z fileÚimage_processorzloading configuration file z from cache at )r"   r   r   r&   rP   ÚstrrD   rE   ÚisdirrN   rF   r   r   ÚOSErrorÚ	Exceptionr   )r/   r0   r)   r1   r2   rW   r4   r3   r5   rX   rZ   Úfrom_pipeliner_   rb   Úis_localÚimage_processor_fileÚresolved_image_processor_fileÚresolved_processor_filer:   Úprocessor_dicts                       r   r8   z-ImageProcessingMixin.get_image_processor_dictç   s”  € ð( —J’J˜{¨DÑ1Ô1ˆ	ØŸšÐ$4°eÑ<Ô<ˆØ—*’*˜Y¨Ñ-Ô-ˆØ—
’
˜7 DÑ)Ô)ˆØ!Ÿ:š:Ð&8¸%Ñ@Ô@ÐØ—:’:˜j¨$Ñ/Ô/ˆØ—J’J˜{¨BÑ/Ô/ˆ	Ø#)§:¢:Ð.HÕJ^Ñ#_Ô#_Ð àŸ
š
Ð#3°TÑ:Ô:ˆØ Ÿ*š* \°5Ñ9Ô9ˆà#4ÈÐYÐYˆ
ØÐ$Ø+8ˆJÐ'Ñ(åÑÔð 	$Ð%5ð 	$Ý�KŠKÐEÑFÔFÐFØ#Ðå(+Ð,IÑ(JÔ(JÐ%Ý”7—=’=Ð!>Ñ?Ô?ˆÝŒ7�=Š=Ð6Ñ7Ô7ð 	iÝ#%¤7§<¢<Ð0MÐOgÑ#hÔ#hÐ ÝŒ7�>Š>Ð7Ñ8Ô8ð ,	Ø,IÐ)Ø&*Ð#ØˆHˆHà#;Ð ð&Ý*5Ø1Ý+Ø'Ø#1Ø#Ø%5ØØ)Ø%Ø'Ø:?ð+ñ +ô +Ð'õ 1<Ø1Ø1Ø'Ø#1Ø#Ø%5ØØ)Ø%Ø'Ø:?ð1ñ 1ô 1Ð-Ð-øõ ð ð ð ð Ýð ð ð åðOÐ7Tð Oð Oà9VðOð Oð 0HðOð Oð Oñô ð ðøøøð  $ÐØ"Ð.Ý0Ð1HÑIÔIˆNØ  NÐ2Ð2Ø'5Ð6GÔ'HÐ$à(Ð4Ð9MÐ9UÝ#6Ð7TÑ#UÔ#UÐ àÐ'ÝðKÐ3Pð Kð Kà5RðKð Kð ,DðKð Kð Kñô ð ð ð 	Ý�KŠKÐUÐ6SÐUÐUÑVÔVÐVÐVå�KŠKØrÐ.BÐrÐrÐSpÐrÐrñô ð ð $ VÐ+Ð+s   Æ09G* Ç*.Hr:   c           	      ó~  ‡ — |                      ¦   «         }|                     dd¦  «        }|                     ˆ fd„|                     ¦   «         D ¦   «         ¦  «          ‰ di |¤Ž}g }t	          t          |                     ¦   «         ¦  «        ¦  «        D ]Z}t          ||¦  «        rH|‰ j        j	        vr:t          |||                     |d¦  «        ¦  «         |                     |¦  «         Œ[|r&t                               d‰ j        › d|› d�¦  «         t                               d|› �¦  «         |r||fS |S )	aí  
        Instantiates a type of [`~image_processing_utils.ImageProcessingMixin`] from a Python dictionary of parameters.

        Args:
            image_processor_dict (`dict[str, Any]`):
                Dictionary that will be used to instantiate the image processor object. Such a dictionary can be
                retrieved from a pretrained checkpoint by leveraging the
                [`~image_processing_utils.ImageProcessingMixin.to_dict`] method.
            kwargs (`dict[str, Any]`):
                Additional parameters from which to initialize the image processor object.

        Returns:
            [`~image_processing_utils.ImageProcessingMixin`]: The image processor object instantiated from those
            parameters.
        Úreturn_unused_kwargsFc                 ó8   •— i | ]\  }}|‰j         j        v ¯||“ŒS r   )Úvalid_kwargsÚ__annotations__)Ú.0ÚkÚvr/   s      €r   ú
<dictcomp>z2ImageProcessingMixin.from_dict.<locals>.<dictcomp>q  s/   ø€ Ð$nÐ$nÐ$n©d¨a°ÈÈSÔM]ÔMmÐHmÐHm Q¨ÐHmÐHmÐHmr   NzImage processor z	: kwargs zÍ were applied for backward compatibility. To avoid this warning, add them to valid_kwargs: create a custom TypedDict extending ImagesKwargs with these keys and set it as the `valid_kwargs` class attribute.r   )Úcopyr"   Úupdater#   ÚreversedÚlistÚkeysÚhasattrrr   rs   r$   Úappendr&   Úwarning_oncer   rP   )r/   r:   r)   rp   rd   Ú
extra_keysr*   s   `      r   r9   zImageProcessingMixin.from_dict^  sx  ø€ ð"  4×8Ò8Ñ:Ô:ÐØ%ŸzšzÐ*@À%ÑHÔHÐØ×#Ò#Ð$nÐ$nÐ$nÐ$n°f·l²l±n´nÐ$nÑ$nÔ$nÑoÔoÐoØ˜#Ð5Ð5Ð 4Ð5Ð5ˆð ˆ
Ý�D §¢¡¤Ñ/Ô/Ñ0Ô0ð 	'ð 	'ˆCÝ�¨Ñ,Ô,ð '°¸CÔ<LÔ<\Ð1\Ð1\Ý˜¨¨f¯jªj¸¸dÑ.CÔ.CÑDÔDÐDØ×!Ò! #Ñ&Ô&Ð&øØð 	Ý×Òðb 3¤<ð bð b¸*ð bð bð bñô ð õ 	�ŠÐ8 Ð8Ð8Ñ9Ô9Ð9Øð 	#Ø" FÐ*Ð*à"Ð"r   c                 óV   — t          j        | j        ¦  «        }| j        j        |d<   |S )z¿
        Serializes this instance to a Python dictionary.

        Returns:
            `dict[str, Any]`: Dictionary of all the attributes that make up this image processor instance.
        Úimage_processor_type)rx   ÚdeepcopyÚ__dict__Ú	__class__r   )r(   Úoutputs     r   Úto_dictzImageProcessingMixin.to_dict‡  s*   € õ ”˜tœ}Ñ-Ô-ˆØ)-¬Ô)@ˆÐ%Ñ&àˆr   Ú	json_filec                 ó´   — t          |d¬¦  «        5 }|                     ¦   «         }ddd¦  «         n# 1 swxY w Y   t          j        |¦  «        } | di |¤ŽS )aÐ  
        Instantiates a image processor of type [`~image_processing_utils.ImageProcessingMixin`] from the path to a JSON
        file of parameters.

        Args:
            json_file (`str` or `os.PathLike`):
                Path to the JSON file containing the parameters.

        Returns:
            A image processor of type [`~image_processing_utils.ImageProcessingMixin`]: The image_processor object
            instantiated from that JSON file.
        úutf-8©ÚencodingNr   )ÚopenÚreadÚjsonÚloads)r/   rˆ   ÚreaderÚtextr:   s        r   Úfrom_json_filez#ImageProcessingMixin.from_json_file“  s�   € õ �) gÐ.Ñ.Ô.ð 	!°&Ø—;’;‘=”=ˆDð	!ð 	!ð 	!ñ 	!ô 	!ð 	!ð 	!ð 	!ð 	!ð 	!ð 	!øøøð 	!ð 	!ð 	!ð 	!å#œz¨$Ñ/Ô/ÐØˆsÐ*Ð*Ð)Ð*Ð*Ð*s   ’3³7º7c                 óô   — |                       ¦   «         }|                     ¦   «         D ]6\  }}t          |t          j        ¦  «        r|                     ¦   «         ||<   Œ7t          j        |dd¬¦  «        dz   S )zÃ
        Serializes this instance to a JSON string.

        Returns:
            `str`: String containing all the attributes that make up this feature_extractor instance in JSON format.
        é   T)ÚindentÚ	sort_keysú
)r‡   r#   Ú
isinstanceÚnpÚndarrayÚtolistr�   Údumps)r(   Ú
dictionaryr*   r+   s       r   Úto_json_stringz#ImageProcessingMixin.to_json_string¦  sr   € ð —\’\‘^”^ˆ
à$×*Ò*Ñ,Ô,ð 	1ð 	1‰JˆC�Ý˜%¥¤Ñ,Ô,ð 1Ø"'§,¢,¡.¤.�
˜3‘øåŒz˜*¨Q¸$Ð?Ñ?Ô?À$ÑFÐFr   Újson_file_pathc                 óª   — t          |dd¬¦  «        5 }|                     |                      ¦   «         ¦  «         ddd¦  «         dS # 1 swxY w Y   dS )zá
        Save this instance to a JSON file.

        Args:
            json_file_path (`str` or `os.PathLike`):
                Path to the JSON file in which this image_processor instance's parameters will be saved.
        ÚwrŠ   r‹   N)r�   ÚwriterŸ   )r(   r    Úwriters      r   rO   z!ImageProcessingMixin.to_json_fileµ  s˜   € õ �. #°Ð8Ñ8Ô8ð 	0¸FØ�LŠL˜×,Ò,Ñ.Ô.Ñ/Ô/Ð/ð	0ð 	0ð 	0ñ 	0ô 	0ð 	0ð 	0ð 	0ð 	0ð 	0ð 	0ð 	0øøøð 	0ð 	0ð 	0ð 	0ð 	0ð 	0s   “(AÁAÁAc                 óH   — | j         j        › d|                      ¦   «         › �S )Nú )r…   r   rŸ   )r(   s    r   Ú__repr__zImageProcessingMixin.__repr__À  s'   € Ø”.Ô)ÐCÐC¨D×,?Ò,?Ñ,AÔ,AÐCÐCÐCr   ÚAutoImageProcessorc                 ó¢   — t          |t          ¦  «        s|j        }ddlmc m} t          ||¦  «        st          |› d�¦  «        ‚|| _        dS )a{  
        Register this class with a given auto class. This should only be used for custom image processors as the ones
        in the library are already mapped with `AutoImageProcessor `.



        Args:
            auto_class (`str` or `type`, *optional*, defaults to `"AutoImageProcessor "`):
                The auto class to register this new image processor with.
        r   Nz is not a valid auto class.)	r™   re   r   Útransformers.models.autoÚmodelsÚautor}   Ú
ValueErrorrM   )r/   Ú
auto_classÚauto_modules      r   Úregister_for_auto_classz,ImageProcessingMixin.register_for_auto_classÃ  sn   € õ ˜*¥cÑ*Ô*ð 	-Ø#Ô,ˆJà6Ð6Ð6Ð6Ð6Ð6Ð6Ð6Ð6å�{ JÑ/Ô/ð 	IÝ 
ÐGÐGÐGÑHÔHÐHà$ˆŒˆˆr   Úimage_url_or_urlsc                 ó   ‡ — t          |t          t          f¦  «        rˆ fd„|D ¦   «         S t          |t          ¦  «        rt	          |¦  «        S t          |¦  «        r|S t          dt          |¦  «        › �¦  «        ‚)zé
        Convert a single or a list of urls into the corresponding `PIL.Image` objects.

        If a single url is passed, the return value will be a single object. If a list is passed a list of objects is
        returned.
        c                 ó:   •— g | ]}‰                      |¦  «        ‘ŒS r   )Úfetch_images)rt   Úxr(   s     €r   ú
<listcomp>z5ImageProcessingMixin.fetch_images.<locals>.<listcomp>á  s'   ø€ ÐDÐDÐD¨Q�D×%Ò% aÑ(Ô(ÐDÐDÐDr   z=only a single or a list of entries is supported but got type=)r™   r{   Útuplere   r
   r	   Ú	TypeErrorÚtype)r(   r±   s   ` r   r´   z!ImageProcessingMixin.fetch_imagesÙ  s”   ø€ õ Ð'­$µ¨Ñ7Ô7ð 	wØDÐDÐDÐDÐ2CÐDÑDÔDÐDÝÐ)­3Ñ/Ô/ð 	wÝÐ/Ñ0Ô0Ð0ÝÐ-Ñ.Ô.ð 	wØ$Ð$åÐuÕ\`ÐarÑ\sÔ\sÐuÐuÑvÔvÐvr   )NFFNr.   )F)r¨   )r   r   r   r   rM   r-   Úclassmethodr¹   r   re   rD   ÚPathLikeÚboolr;   rU   r·   Údictr   r8   r9   r‡   r“   rŸ   rO   r§   r°   r{   r´   r   r   r   r   r   =   s™  € € € € € ðð ð
 €Kðð ð ð ð /3Ø$Ø!&Ø#'Øð`=ð `=ØÐ$Ô%ð`=à'*¨R¬[Ñ'8ð`=ð ˜œÑ$ tÑ+ð`=ð ð	`=ð
 ð`=ð �T‰z˜DÑ ð`=ð ð`=ð 
ð`=ð `=ð `=ñ „[ð`=ðD.-ð .-¨c°B´KÑ.?ð .-Èdð .-ð .-ð .-ð .-ð` ðt,Ø,/°"´+Ñ,=ðt,à	ˆt�C˜�HŒ~˜t C¨ Hœ~Ð-Ô	.ðt,ð t,ð t,ñ „[ðt,ðl ð&#¨T°#°s°(¬^ð &#ð &#ð &#ñ „[ð&#ðP
˜˜c 3˜hœð 
ð 
ð 
ð 
ð ð+ s¨R¬[Ñ'8ð +ð +ð +ñ „[ð+ð$G ð Gð Gð Gð Gð	0¨3°´Ñ+<ð 	0ð 	0ð 	0ð 	0ðDð Dð Dð ð%ð %ð %ñ „[ð%ð*w¨c°D¸´I©oÀÀTÈ#ÄYÄÑ.Oð wð wð wð wð wð wr   r]   r¨   zimage processor file)ÚobjectÚobject_classÚobject_files)$rx   r�   rD   Útypingr   r   Únumpyrš   Úhuggingface_hubr   Údynamic_module_utilsr   Úfeature_extraction_utilsr   ÚBaseBatchFeatureÚimage_utilsr	   r
   Úutilsr   r   r   r   r   r   Ú	utils.hubr   r   r   Ú
get_loggerr   r&   r   r=   r   Úformatr   r   r   ú<module>rÌ      sõ  ðð €€€Ø €€€Ø 	€	€	€	Ø Ð Ð Ð Ð Ð Ð Ð à Ð Ð Ð Ø +Ð +Ð +Ð +Ð +Ð +à 4Ð 4Ð 4Ð 4Ð 4Ð 4Ø FÐ FÐ FÐ FÐ FÐ FØ 3Ð 3Ð 3Ð 3Ð 3Ð 3Ð 3Ð 3ðð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð +Ð *Ð *Ð *Ð *Ð *Ð *Ð *ð �WÐ1Ð9OÐPÑPÔPÐ ð 
ˆÔ	˜HÑ	%Ô	%€ð
ð ð ð ð Ð#ñ ô ð ð jwð jwð jwð jwð jw˜>ñ jwô jwð jwðZ $- 9Ð-AÔ-MÑ#NÔ#NÐ Ô  ØÔ#Ô+Ð7Ø/CÔ/OÔ/W×/^Ò/^Ø Ð/CÐRhð 0_ñ 0ô 0ÐÔ$Ô,Ð,Ð,ð 8Ð7r   