.. module:: mmcls.models
The models
package contains several sub-packages for addressing the different components of a model.
- :mod:`~mmcls.models.classifiers`: The top-level module which defines the whole process of a classification model.
- :mod:`~mmcls.models.backbones`: Usually a feature extraction network, e.g., ResNet, MobileNet.
- :mod:`~mmcls.models.necks`: The component between backbones and heads, e.g., GlobalAveragePooling.
- :mod:`~mmcls.models.heads`: The component for specific tasks. In MMClassification, we provides heads for classification.
- :mod:`~mmcls.models.losses`: Loss functions.
- :mod:`~mmcls.models.utils`: Some helper functions and common components used in various networks.
- :mod:`~mmcls.models.utils.data_preprocessor`: The component before model to preprocess the inputs, e.g., ClsDataPreprocessor.
- :ref:`components`: Common components used in various networks.
- :ref:`helpers`: Helper functions.
.. autosummary:: :toctree: generated :nosignatures: build_classifier build_backbone build_neck build_head build_loss
.. module:: mmcls.models.classifiers
.. autosummary:: :toctree: generated :nosignatures: BaseClassifier ImageClassifier TimmClassifier HuggingFaceClassifier
.. module:: mmcls.models.backbones
.. autosummary:: :toctree: generated :nosignatures: AlexNet BEiT CSPDarkNet CSPNet CSPResNeXt CSPResNet Conformer ConvMixer ConvNeXt DaViT DeiT3 DenseNet DistilledVisionTransformer EdgeNeXt EfficientFormer EfficientNet EfficientNetV2 HRNet HorNet InceptionV3 LeNet5 LeViT MViT MlpMixer MobileNetV2 MobileNetV3 MobileOne MobileViT PCPVT PoolFormer PyramidVig RegNet RepLKNet RepMLPNet RepVGG Res2Net ResNeSt ResNeXt ResNet ResNetV1c ResNetV1d ResNet_CIFAR RevVisionTransformer SEResNeXt SEResNet SVT ShuffleNetV1 ShuffleNetV2 SwinTransformer SwinTransformerV2 T2T_ViT TIMMBackbone TNT VAN VGG Vig VisionTransformer XCiT
.. module:: mmcls.models.necks
.. autosummary:: :toctree: generated :nosignatures: GlobalAveragePooling GeneralizedMeanPooling HRFuseScales
.. module:: mmcls.models.heads
.. autosummary:: :toctree: generated :nosignatures: ClsHead LinearClsHead StackedLinearClsHead VisionTransformerClsHead EfficientFormerClsHead DeiTClsHead ConformerHead ArcFaceClsHead MultiLabelClsHead MultiLabelLinearClsHead CSRAClsHead
.. module:: mmcls.models.losses
.. autosummary:: :toctree: generated :nosignatures: CrossEntropyLoss LabelSmoothLoss FocalLoss AsymmetricLoss SeesawLoss
.. module:: mmcls.models.utils
This package includes some helper functions and common components used in various networks.
.. autosummary:: :toctree: generated :nosignatures: InvertedResidual SELayer WindowMSA WindowMSAV2 ShiftWindowMSA MultiheadAttention ConditionalPositionEncoding PatchEmbed PatchMerging HybridEmbed LayerScale
.. autosummary:: :toctree: generated :nosignatures: channel_shuffle make_divisible resize_pos_embed resize_relative_position_bias_table to_ntuple is_tracing