备注
您正在阅读 MMClassification 0.x 版本的文档。MMClassification 0.x 会在 2022 年末被切换为次要分支。建议您升级到 MMClassification 1.0 版本,体验更多新特性和新功能。请查阅 MMClassification 1.0 的安装教程、迁移教程以及更新日志。
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. |