o
    WñhH  ã                   @   s\  d Z ddlmZmZmZmZmZmZmZm	Z	m
Z
mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z* ddl+m,Z,m-Z-m.Z.m/Z/m0Z0m1Z1m2Z2m3Z3m4Z4m5Z5m6Z6m7Z7m8Z8m9Z9 ddl:m;Z;m<Z<m=Z=m>Z>m?Z?m@Z@mAZAmBZBmCZCmDZDmEZE ddlFmGZGmHZHmIZImJZJmKZKmLZLmMZMmNZNmOZOmPZP dZQdS )a9  
Ultralytics modules.

This module provides access to various neural network components used in Ultralytics models, including convolution blocks,
attention mechanisms, transformer components, and detection/segmentation heads.

Examples:
    Visualize a module with Netron.
    >>> from ultralytics.nn.modules import *
    >>> import torch
    >>> import os
    >>> x = torch.ones(1, 128, 40, 40)
    >>> m = Conv(128, 128)
    >>> f = f"{m._get_name()}.onnx"
    >>> torch.onnx.export(m, x, f)
    >>> os.system(f"onnxslim {f} {f} && open {f}")  # pip install onnxslim
é   ))ÚC1ÚC2ÚC2PSAÚC3ÚC3TRÚCIBÚDFLÚELAN1ÚPSAÚSPPÚSPPELANÚSPPFÚA2C2fÚAConvÚADownÚ	AttentionÚBNContrastiveHeadÚ
BottleneckÚBottleneckCSPÚC2fÚC2fAttnÚC2fCIBÚC2fPSAÚC3GhostÚC3k2ÚC3xÚCBFuseÚCBLinearÚContrastiveHeadÚGhostBottleneckÚHGBlockÚHGStemÚImagePoolingAttnÚMaxSigmoidAttnBlockÚProtoÚRepC3ÚRepNCSPELAN4ÚRepVGGDWÚResNetLayerÚSCDownÚTorchVision)ÚCBAMÚChannelAttentionÚConcatÚConvÚConv2ÚConvTransposeÚDWConvÚDWConvTranspose2dÚFocusÚ	GhostConvÚIndexÚ	LightConvÚRepConvÚSpatialAttention)ÚOBBÚClassifyÚDetectÚLRPCHeadÚPoseÚRTDETRDecoderÚSegmentÚWorldDetectÚYOLOEDetectÚYOLOESegmentÚ	v10Detect)
ÚAIFIÚMLPÚDeformableTransformerDecoderÚ!DeformableTransformerDecoderLayerÚLayerNorm2dÚMLPBlockÚMSDeformAttnÚTransformerBlockÚTransformerEncoderLayerÚTransformerLayer)Lr.   r/   r6   r7   r1   r2   r0   r3   r4   r,   r8   r+   r-   rM   rK   rI   rH   r   r    r!   r   r   r   r   r   r   r   r)   r   r   r   r   r   r   r   r   r   r$   r;   r?   r=   r:   rL   r%   r>   rD   rF   rG   rJ   rE   r(   r9   r@   rA   rB   rC   r<   r"   r#   r   r   r&   r   r   r   r   r   r	   r'   r   r   r   r
   r*   r5   r   N)RÚ__doc__Úblockr   r   r   r   r   r   r   r	   r
   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   Úconvr+   r,   r-   r.   r/   r0   r1   r2   r3   r4   r5   r6   r7   r8   Úheadr9   r:   r;   r<   r=   r>   r?   r@   rA   rB   rC   ÚtransformerrD   rE   rF   rG   rH   rI   rJ   rK   rL   rM   Ú__all__© rT   rT   úS/var/www/vscode/kcb/lib/python3.10/site-packages/ultralytics/nn/modules/__init__.pyÚ<module>   s   ¬@+40