Note
You are reading the documentation for MMClassification 0.x, which will soon be deprecated at the end of 2022. We recommend you upgrade to MMClassification 1.0 to enjoy fruitful new features and better performance brought by OpenMMLab 2.0. Check the installation tutorial, migration tutorial and changelog for more details.
mmcls.models¶
The models
package contains several sub-packages for addressing the different components of a model.
Classifier: The top-level module which defines the whole process of a classification model.
Backbones: Usually a feature extraction network, e.g., ResNet, MobileNet.
Necks: The component between backbones and heads, e.g., GlobalAveragePooling.
Heads: The component for specific tasks. In MMClassification, we provides heads for classification.
Losses: Loss functions.
Build backbone. |
|
Build neck. |
|
Build head. |
|
Build loss. |
Classifier¶
Base class for classifiers. |
|
Backbones¶
AlexNet backbone. |
|
CSP-Darknet backbone used in YOLOv4. |
|
The abstract CSP Network class. |
|
CSP-ResNeXt backbone. |
|
CSP-ResNet backbone. |
|
Conformer backbone. |
|
ConvMixer. |
|
ConvNeXt. |
|
DenseNet. |
|
Distilled Vision Transformer. |
|
EfficientNet backbone. |
|
HRNet backbone. |
|
LeNet5 backbone. |
|
Mlp-Mixer backbone. |
|
MobileNetV2 backbone. |
|
MobileNetV3 backbone. |
|
The backbone of Twins-PCPVT. |
|
PoolFormer. |
|
RegNet backbone. |
|
RepMLPNet backbone. |
|
RepVGG backbone. |
|
Res2Net backbone. |
|
ResNeSt backbone. |
|
ResNeXt backbone. |
|
ResNet backbone. |
|
ResNetV1c backbone. |
|
ResNetV1d backbone. |
|
ResNet backbone for CIFAR. |
|
SEResNeXt backbone. |
|
SEResNet backbone. |
|
The backbone of Twins-SVT. |
|
ShuffleNetV1 backbone. |
|
ShuffleNetV2 backbone. |
|
Swin Transformer. |
|
Tokens-to-Token Vision Transformer (T2T-ViT) |
|
Wrapper to use backbones from timm library. |
|
Transformer in Transformer. |
|
Visual Attention Network. |
|
VGG backbone. |
|
Vision Transformer. |
|
EfficientFormer. |
|
A PyTorch impl of : HorNet: Efficient High-Order Spatial Interactions with Recursive Gated Convolutions |
Necks¶
Global Average Pooling neck. |
|
Generalized Mean Pooling neck. |
|
Fuse feature map of multiple scales in HRNet. |
Heads¶
classification head. |
|
Linear classifier head. |
|
Classifier head with several hidden fc layer and a output fc layer. |
|
Classification head for multilabel task. |
|
Linear classification head for multilabel task. |
|
Vision Transformer classifier head. |
|
Distilled Vision Transformer classifier head. |
|
Linear classifier head. |
Losses¶
asymmetric loss. |
|
Cross entropy loss. |
|
Initializer for the label smoothed cross entropy loss. |
|
Focal loss. |
|
Implementation of seesaw loss. |