o
    ¾e¦iÐ  ã                   @   s<   d dl mZ d dlmZ e e¡ZG dd„ deƒZdgZdS )é   )ÚPreTrainedConfig)Úloggingc                       sb   e Zd ZdZdZg d¢dddddddd	f	d
ee dededededededef‡ fdd„Z‡  Z	S )ÚSuperPointConfigaÙ  
    This is the configuration class to store the configuration of a [`SuperPointForKeypointDetection`]. It is used to instantiate a
    SuperPoint model according to the specified arguments, defining the model architecture. Instantiating a
    configuration with the defaults will yield a similar configuration to that of the SuperPoint
    [magic-leap-community/superpoint](https://huggingface.co/magic-leap-community/superpoint) architecture.

    Configuration objects inherit from [`PreTrainedConfig`] and can be used to control the model outputs. Read the
    documentation from [`PreTrainedConfig`] for more information.

    Args:
        encoder_hidden_sizes (`List`, *optional*, defaults to `[64, 64, 128, 128]`):
            The number of channels in each convolutional layer in the encoder.
        decoder_hidden_size (`int`, *optional*, defaults to 256): The hidden size of the decoder.
        keypoint_decoder_dim (`int`, *optional*, defaults to 65): The output dimension of the keypoint decoder.
        descriptor_decoder_dim (`int`, *optional*, defaults to 256): The output dimension of the descriptor decoder.
        keypoint_threshold (`float`, *optional*, defaults to 0.005):
            The threshold to use for extracting keypoints.
        max_keypoints (`int`, *optional*, defaults to -1):
            The maximum number of keypoints to extract. If `-1`, will extract all keypoints.
        nms_radius (`int`, *optional*, defaults to 4):
            The radius for non-maximum suppression.
        border_removal_distance (`int`, *optional*, defaults to 4):
            The distance from the border to remove keypoints.
        initializer_range (`float`, *optional*, defaults to 0.02):
            The standard deviation of the truncated_normal_initializer for initializing all weight matrices.

    Example:
    ```python
    >>> from transformers import SuperPointConfig, SuperPointForKeypointDetection

    >>> # Initializing a SuperPoint superpoint style configuration
    >>> configuration = SuperPointConfig()
    >>> # Initializing a model from the superpoint style configuration
    >>> model = SuperPointForKeypointDetection(configuration)
    >>> # Accessing the model configuration
    >>> configuration = model.config
    ```Ú
superpoint)é@   r   é€   r   é   éA   g{®Gázt?éÿÿÿÿé   g{®Gáz”?Úencoder_hidden_sizesÚdecoder_hidden_sizeÚkeypoint_decoder_dimÚdescriptor_decoder_dimÚkeypoint_thresholdÚmax_keypointsÚ
nms_radiusÚborder_removal_distancec
                    sL   || _ || _|| _|| _|| _|| _|| _|| _|	| _t	ƒ j
di |
¤Ž d S )N© )r   r   r   r   r   r   r   r   Úinitializer_rangeÚsuperÚ__init__)Úselfr   r   r   r   r   r   r   r   r   Úkwargs©Ú	__class__r   úu/home/ubuntu/transcripts/venv/lib/python3.10/site-packages/transformers/models/superpoint/configuration_superpoint.pyr   ?   s   zSuperPointConfig.__init__)
Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú
model_typeÚlistÚintÚfloatr   Ú__classcell__r   r   r   r   r      s:    &öþýüûúùø	÷r   N)	Úconfiguration_utilsr   Úutilsr   Ú
get_loggerr   Úloggerr   Ú__all__r   r   r   r   Ú<module>   s
   

C