
    g                     f    d dl mZ ddlmZ ddlmZ  ej        e          Z G d de          Z	dS )    )List   )PretrainedConfig)loggingc                   l     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Z x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{Gzt?   g{Gz?encoder_hidden_sizesdecoder_hidden_sizekeypoint_decoder_dimdescriptor_decoder_dimkeypoint_thresholdmax_keypoints
nms_radiusborder_removal_distancec
                     || _         || _        || _        || _        || _        || _        || _        || _        |	| _         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__s              s/var/www/html/ai-engine/env/lib/python3.11/site-packages/transformers/models/superpoint/configuration_superpoint.pyr   zSuperPointConfig.__init__@   so     %9!#6 $8!&<#"4*$'>$!2""6"""""    )
__name__
__module____qualname____doc__
model_typer   intfloatr   __classcell__)r   s   @r    r   r      s        $ $L J +=*<*<#&$&&)$)'(# #"3i# !# "	#
 !$# "# # # "%# # # # # # # # # #r!   r   N)
typingr   configuration_utilsr   utilsr   
get_loggerr"   loggerr   r   r!   r    <module>r/      s          3 3 3 3 3 3       
	H	%	%@# @# @# @# @#' @# @# @# @# @#r!   