+
    œ°³jº  ã                   ó¨   € ^ RI HtHt ^RIHtHt ^RIHtHtH	t	 ]! 4       '       d   ^ RI
Ht ^RIHt ]! ]	! RR7      R4       ! R	 R
]4      4       tR# )é    )ÚAnyÚUnion)Úadd_end_docstringsÚis_vision_available)ÚGenericTensorÚPipelineÚbuild_pipeline_init_args)ÚImage)Ú
load_imageT)Úhas_image_processora  
        image_processor_kwargs (`dict`, *optional*):
                Additional dictionary of keyword arguments passed along to the image processor e.g.
                {"size": {"height": 100, "width": 100}}
        pool (`bool`, *optional*, defaults to `False`):
            Whether or not to return the pooled output. If `False`, the model will return the raw hidden states.
    c                   ó‚   a a€ ] tR t^t oRtRtRtRtRtRR lt	RV3R lR llt
R tRR ltV3R	 lV 3R
 lltRtVtV ;t# )ÚImageFeatureExtractionPipelineaì  
Image feature extraction pipeline uses no model head. This pipeline extracts the hidden states from the base
transformer, which can be used as features in downstream tasks.

Example:

```python
>>> from transformers import pipeline

>>> extractor = pipeline(model="google/vit-base-patch16-224", task="image-feature-extraction")
>>> result = extractor("https://huggingface.co/datasets/Narsil/image_dummy/raw/main/parrots.png", return_tensors=True)
>>> result.shape  # This is a tensor of shape [1, sequence_length, hidden_dimension] representing the input image.
torch.Size([1, 197, 768])
```

Learn more about the basics of using a pipeline in the [pipeline tutorial](../pipeline_tutorial)

This image feature extraction pipeline can currently be loaded from [`pipeline`] using the task identifier:
`"image-feature-extraction"`.

All vision models may be used for this pipeline. See a list of all models, including community-contributed models on
[huggingface.co/models](https://huggingface.co/models).
FTc                óf   € Vf   / MTp/ pVe   W6R&   Ve   W&R&   RV9   d   VR,          VR&   V/ V3# )NÚpoolÚreturn_tensorsÚtimeout© )ÚselfÚimage_processor_kwargsr   r   ÚkwargsÚpreprocess_paramsÚpostprocess_paramss   &&&&,  Úp/home/luca/screen-checking/.venv/lib/python3.14/site-packages/transformers/pipelines/image_feature_extraction.pyÚ_sanitize_parametersÚ3ImageFeatureExtractionPipeline._sanitize_parameters5   sY   € Ø"8Ò"@™BÐF\ÐàÐØÒØ)-˜vÑ&ØÒ%Ø3AÐ/Ñ0à˜ÔØ+1°)Õ+<Ð˜iÑ(à  "Ð&8Ð8Ð8ó    c                ó6   <€ V ^8„  d   QhRS[ S[S[3,          /# )é   Úreturn)ÚdictÚstrr   )ÚformatÚ__classdict__s   "€r   Ú__annotate__Ú+ImageFeatureExtractionPipeline.__annotate__C   s    ø€ ÷ ñ É4ÑPSÑUbÐPbÕKcñ r   c                ó~   € \        WR 7      pV P                  ! V3RR/VB pVP                  V P                  4      pV# ))r   r   Úpt)r   Úimage_processorÚtoÚdtype)r   Úimager   r   Úmodel_inputss   &&&, r   Ú
preprocessÚ)ImageFeatureExtractionPipeline.preprocessC   s?   € Ü˜5Ô2ˆØ×+Ò+¨EÑaÀ$ÐaÐJ`ÑaˆØ#—‘ t§z¡zÓ2ˆØÐr   c                ó*   € V P                   ! R/ VB pV# )Nr   )Úmodel)r   r,   Úmodel_outputss   && r   Ú_forwardÚ'ImageFeatureExtractionPipeline._forwardI   s   € ØŸ
š
Ñ2 \Ñ2ˆØÐr   c                ó    € Ve   TMRpV'       d   RV9  d   \        R4      hVR,          pM	V^ ,          pV'       d   V# VP                  4       # )NFÚpooler_outputzeNo pooled output was returned. Make sure the model has a `pooler` layer when using the `pool` option.)Ú
ValueErrorÚtolist)r   r1   r   r   Úoutputss   &&&& r   ÚpostprocessÚ*ImageFeatureExtractionPipeline.postprocessM   sV   € ØÒ'‰t¨UˆçØ mÔ3Ü Ø{óð ð $ OÕ4‰Gð $ AÕ&ˆGçØˆNØ�~‰~ÓÐr   c                óv   <€ V ^8„  d   QhRS[ S[RS[R,          S[S[,          3,          RS[RS[S[,          /# )r   ÚargszImage.Imager   r   )r   r!   Úlistr   )r"   r#   s   "€r   r$   r%   ^   sB   ø€ ÷ 1ñ 1™e¡C¨¹¸]Õ8KÉTÑRUÍYÐ$VÕWð 1Ñcfð 1ÑkoÑpsÕktñ 1r   c                ó$   <€ \         SV `  ! V/ VB # )aG  
Extract the features of the input(s).

Args:
    images (`str`, `list[str]`, `PIL.Image` or `list[PIL.Image]`):
        The pipeline handles three types of images:

        - A string containing a http link pointing to an image
        - A string containing a local path to an image
        - An image loaded in PIL directly

        The pipeline accepts either a single image or a batch of images, which must then be passed as a string.
        Images in a batch must all be in the same format: all as http links, all as local paths, or all as PIL
        images.
    timeout (`float`, *optional*, defaults to None):
        The maximum time in seconds to wait for fetching images from the web. If None, no timeout is used and
        the call may block forever.
Return:
    A nested list of `float`: The features computed by the model.
)ÚsuperÚ__call__)r   r<   r   Ú	__class__s   &*,€r   r@   Ú'ImageFeatureExtractionPipeline.__call__^   s   ø€ ô* ‰wÒ Ð0¨Ñ0Ð0r   r   )NNN)N)NF)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú_load_processorÚ_load_image_processorÚ_load_feature_extractorÚ_load_tokenizerr   r-   r2   r9   r@   Ú__static_attributes__Ú__classdictcell__Ú__classcell__)rA   r#   s   @@r   r   r      sJ   ù‡ € ñð0 €OØ ÐØ#ÐØ€Oô9÷ò òô ÷"1÷ 1ó 1r   r   N)Útypingr   r   Úutilsr   r   Úbaser   r   r	   ÚPILr
   Úimage_utilsr   r   r   r   r   Ú<module>rT      sR   ðß ç ;ß CÑ Cñ ×ÒÝå(ñ Ù°Ô6ðó	ô\1 Xó \1ó	ò\1r   