
    fTh                         S r SSKJr  SSKJr  SSKJr  SSKJr  SSK	J
r
  \R                  " \5      r " S	 S
\5      rS
/rg)zVitPose model configuration    )Optional   )PretrainedConfig)logging) verify_backbone_config_arguments   )CONFIG_MAPPINGc                   z   ^  \ rS rSrSrSr        SS\\   S\\   S\	S\	S\\
   S	\S
\S\	4U 4S jjjrSrU =r$ )VitPoseConfig   af
  
This is the configuration class to store the configuration of a [`VitPoseForPoseEstimation`]. It is used to instantiate a
VitPose 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 VitPose
[usyd-community/vitpose-base-simple](https://huggingface.co/usyd-community/vitpose-base-simple) architecture.

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

Args:
    backbone_config (`PretrainedConfig` or `dict`, *optional*, defaults to `VitPoseBackboneConfig()`):
        The configuration of the backbone model. Currently, only `backbone_config` with `vitpose_backbone` as `model_type` is supported.
    backbone (`str`, *optional*):
        Name of backbone to use when `backbone_config` is `None`. If `use_pretrained_backbone` is `True`, this
        will load the corresponding pretrained weights from the timm or transformers library. If `use_pretrained_backbone`
        is `False`, this loads the backbone's config and uses that to initialize the backbone with random weights.
    use_pretrained_backbone (`bool`, *optional*, defaults to `False`):
        Whether to use pretrained weights for the backbone.
    use_timm_backbone (`bool`, *optional*, defaults to `False`):
        Whether to load `backbone` from the timm library. If `False`, the backbone is loaded from the transformers
        library.
    backbone_kwargs (`dict`, *optional*):
        Keyword arguments to be passed to AutoBackbone when loading from a checkpoint
        e.g. `{'out_indices': (0, 1, 2, 3)}`. Cannot be specified if `backbone_config` is set.
    initializer_range (`float`, *optional*, defaults to 0.02):
        The standard deviation of the truncated_normal_initializer for initializing all weight matrices.
    scale_factor (`int`, *optional*, defaults to 4):
        Factor to upscale the feature maps coming from the ViT backbone.
    use_simple_decoder (`bool`, *optional*, defaults to `True`):
        Whether to use a `VitPoseSimpleDecoder` to decode the feature maps from the backbone into heatmaps. Otherwise it uses `VitPoseClassicDecoder`.


Example:

```python
>>> from transformers import VitPoseConfig, VitPoseForPoseEstimation

>>> # Initializing a VitPose configuration
>>> configuration = VitPoseConfig()

>>> # Initializing a model (with random weights) from the configuration
>>> model = VitPoseForPoseEstimation(configuration)

>>> # Accessing the model configuration
>>> configuration = model.config
```vitposebackbone_configbackboneuse_pretrained_backboneuse_timm_backbonebackbone_kwargsinitializer_rangescale_factoruse_simple_decoderc	                   > [         TU ]  " S	0 U	D6  U(       a  [        R                  S5        U(       a  [	        S5      eUc'  Uc$  [        R                  S5        [
        S   " S/S9nO@[        U[        5      (       a+  UR                  S5      n
[
        U
   nUR                  U5      n[        UUUUUS9  Xl        X l        X0l        X@l        XPl        X`l        Xpl        Xl        g )
Nzl`use_pretrained_backbone` is `True`. For the pure inference purpose of VitPose weight do not set this value.z<use_timm_backbone set `True` is not supported at the moment.zY`backbone_config` is `None`. Initializing the config with the default `VitPose` backbone.vitpose_backbone   )out_indices
model_type)r   r   r   r   r    )super__init__loggerinfo
ValueErrorr	   
isinstancedictget	from_dictr   r   r   r   r   r   r   r   r   )selfr   r   r   r   r   r   r   r   kwargsbackbone_model_typeconfig_class	__class__s               i/var/www/auris/envauris/lib/python3.13/site-packages/transformers/models/vitpose/configuration_vitpose.pyr   VitPoseConfig.__init__N   s     	"6""KK~ [\\"x'7KKst,-?@aSQO.."1"5"5l"C)*=>L*44_EO(/$;++	
  / '>$!2.!2("4    )r   r   r   r   r   r   r   r   )NNFFNg{Gz?r   T)__name__
__module____qualname____firstlineno____doc__r   r   r   strboolr"   floatintr   __static_attributes____classcell__)r)   s   @r*   r   r      s    -^ J 7;"&(-"'*.#'#'-5!"23-5 3--5 "&	-5
  -5 "$-5 !-5 -5 !-5 -5r,   r   N)r1   typingr   configuration_utilsr   utilsr   utils.backbone_utilsr   auto.configuration_autor	   
get_loggerr-   r   r   __all__r   r,   r*   <module>r?      sE    "  3  D 4 
		H	%_5$ _5D 
r,   