§
    ‚Štj‰  ã                   óœ   — 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
  ed¬	¦  «        e G d
„ de¦  «        ¦   «         ¦   «         ZdgZdS )é    )Ústricté   )ÚPreTrainedConfig)Úauto_docstringé   )ÚCONFIG_MAPPINGÚ
AutoConfig)ÚSuperPointConfigzETH-CVG/lightglue_superpoint)Ú
checkpointc                   óö   ‡ — e Zd ZU dZdZdeiZdZee	z  dz  e
d<   dZee
d<   dZee
d<   d	Zee
d
<   dZedz  e
d<   dZee
d<   dZee
d<   dZee
d<   dZee
d<   dZee
d<   dZeez  e
d<   dZee
d<   ˆ fd„Zd„ Zˆ xZS )ÚLightGlueConfigaG  
    keypoint_detector_config (`Union[AutoConfig, dict]`,  *optional*, defaults to `SuperPointConfig`):
        The config object or dictionary of the keypoint detector.
    descriptor_dim (`int`, *optional*, defaults to 256):
        The dimension of the descriptors.
    depth_confidence (`float`, *optional*, defaults to 0.95):
        The confidence threshold used to perform early stopping
    width_confidence (`float`, *optional*, defaults to 0.99):
        The confidence threshold used to prune points
    filter_threshold (`float`, *optional*, defaults to 0.1):
        The confidence threshold used to filter matches

    Examples:
        ```python
        >>> from transformers import LightGlueConfig, LightGlueForKeypointMatching

        >>> # Initializing a LightGlue style configuration
        >>> configuration = LightGlueConfig()

        >>> # Initializing a model from the LightGlue style configuration
        >>> model = LightGlueForKeypointMatching(configuration)

        >>> # Accessing the model configuration
        >>> configuration = model.config
        ```
    Ú	lightglueÚkeypoint_detector_configNé   Údescriptor_dimé	   Únum_hidden_layersé   Únum_attention_headsÚnum_key_value_headsgffffffî?Údepth_confidenceg®Gáz®ï?Úwidth_confidencegš™™™™™¹?Úfilter_thresholdg{®Gáz”?Úinitializer_rangeÚgeluÚ
hidden_actg        Úattention_dropoutTÚattention_biasc                 ó¬  •— | j         €| j        | _         t          | j        t          ¦  «        rO| j                             dd¦  «        | j        d<   t          | j        d                  di | j        ¤ddi¤Ž| _        n"| j        €t          d         d¬¦  «        | _        | j        dz  | _        | j        | _	         t          ¦   «         j        di |¤Ž d S )NÚ
model_typeÚ
superpointÚattn_implementationÚeager)r"   r   © )r   r   Ú
isinstancer   ÚdictÚgetr   r   Úintermediate_sizeÚhidden_sizeÚsuperÚ__post_init__)ÚselfÚkwargsÚ	__class__s     €ús/var/www/html/CA-Chatbot/venv/lib/python3.11/site-packages/transformers/models/lightglue/configuration_lightglue.pyr+   zLightGlueConfig.__post_init__K   sø   ø€ ØÔ#Ð+Ø'+Ô'?ˆDÔ$õ �dÔ3µTÑ:Ô:ð 	fØ:>Ô:W×:[Ò:[Ð\hÐjvÑ:wÔ:wˆDÔ)¨,Ñ7Ý,:¸4Ô;XÐYeÔ;fÔ,gð -ð -ØÔ/ð-ð -ØELð-ð -ð -ˆDÔ)Ð)ð Ô*Ð2Ý,:¸<Ô,HÐ]dÐ,eÑ,eÔ,eˆDÔ)à!%Ô!4°qÑ!8ˆÔØÔ.ˆÔØ�‰ŒÔÐ'Ð' Ð'Ð'Ð'Ð'Ð'ó    c                 óJ   — | j         | j        z  dk    rt          d¦  «        ‚dS )zOPart of `@strict`-powered validation. Validates the architecture of the config.r   z1descriptor_dim % num_heads is different from zeroN)r   r   Ú
ValueError)r,   s    r/   Úvalidate_architecturez%LightGlueConfig.validate_architecture]   s/   € àÔ Ô!9Ñ9¸QÒ>Ð>ÝÐPÑQÔQÐQð ?Ð>r0   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r    r	   Úsub_configsr   r&   r
   Ú__annotations__r   Úintr   r   r   r   Úfloatr   r   r   r   Ústrr   r   Úboolr+   r3   Ú__classcell__)r.   s   @r/   r   r      sG  ø€ € € € € € ðð ð6 €JØ-¨zÐ:€Kà?CÐ˜dÐ%5Ñ5¸Ñ<ÐCÐCÑCØ€N�CÐÐÑØÐ�sÐÐÑØ Ð˜Ð Ð Ñ Ø&*Ð˜˜t™Ð*Ð*Ñ*Ø"Ð�eÐ"Ð"Ñ"Ø"Ð�eÐ"Ð"Ñ"Ø!Ð�eÐ!Ð!Ñ!Ø#Ð�uÐ#Ð#Ñ#Ø€J�ÐÐÑØ%(Ð�u˜s‘{Ð(Ð(Ñ(Ø€N�DÐÐÑð(ð (ð (ð (ð (ð$Rð Rð Rð Rð Rð Rð Rr0   r   N)Úhuggingface_hub.dataclassesr   Úconfiguration_utilsr   Úutilsr   Úautor   r	   r!   r
   r   Ú__all__r$   r0   r/   ú<module>rD      sÖ   ðð* /Ð .Ð .Ð .Ð .Ð .à 3Ð 3Ð 3Ð 3Ð 3Ð 3Ø #Ð #Ð #Ð #Ð #Ð #Ø -Ð -Ð -Ð -Ð -Ð -Ð -Ð -Ø )Ð )Ð )Ð )Ð )Ð )ð €Ð9Ð:Ñ:Ô:ØðARð ARð ARð ARð ARÐ&ñ ARô ARñ „ñ ;Ô:ðARðH Ð
€€€r0   