Shortcuts

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_classifier

build_backbone

Build backbone.

build_neck

Build neck.

build_head

Build head.

build_loss

Build loss.

Classifier

BaseClassifier

Base class for classifiers.

ImageClassifier

Backbones

AlexNet

AlexNet backbone.

CSPDarkNet

CSP-Darknet backbone used in YOLOv4.

CSPNet

The abstract CSP Network class.

CSPResNeXt

CSP-ResNeXt backbone.

CSPResNet

CSP-ResNet backbone.

Conformer

Conformer backbone.

ConvMixer

ConvMixer.

ConvNeXt

ConvNeXt.

DenseNet

DenseNet.

DistilledVisionTransformer

Distilled Vision Transformer.

EfficientNet

EfficientNet backbone.

HRNet

HRNet backbone.

LeNet5

LeNet5 backbone.

MlpMixer

Mlp-Mixer backbone.

MobileNetV2

MobileNetV2 backbone.

MobileNetV3

MobileNetV3 backbone.

PCPVT

The backbone of Twins-PCPVT.

PoolFormer

PoolFormer.

RegNet

RegNet backbone.

RepMLPNet

RepMLPNet backbone.

RepVGG

RepVGG backbone.

Res2Net

Res2Net backbone.

ResNeSt

ResNeSt backbone.

ResNeXt

ResNeXt backbone.

ResNet

ResNet backbone.

ResNetV1c

ResNetV1c backbone.

ResNetV1d

ResNetV1d backbone.

ResNet_CIFAR

ResNet backbone for CIFAR.

SEResNeXt

SEResNeXt backbone.

SEResNet

SEResNet backbone.

SVT

The backbone of Twins-SVT.

ShuffleNetV1

ShuffleNetV1 backbone.

ShuffleNetV2

ShuffleNetV2 backbone.

SwinTransformer

Swin Transformer.

T2T_ViT

Tokens-to-Token Vision Transformer (T2T-ViT)

TIMMBackbone

Wrapper to use backbones from timm library.

TNT

Transformer in Transformer.

VAN

Visual Attention Network.

VGG

VGG backbone.

VisionTransformer

Vision Transformer.

EfficientFormer

EfficientFormer.

HorNet

A PyTorch impl of : HorNet: Efficient High-Order Spatial Interactions with Recursive Gated Convolutions

Necks

GlobalAveragePooling

Global Average Pooling neck.

GeneralizedMeanPooling

Generalized Mean Pooling neck.

HRFuseScales

Fuse feature map of multiple scales in HRNet.

Heads

ClsHead

classification head.

LinearClsHead

Linear classifier head.

StackedLinearClsHead

Classifier head with several hidden fc layer and a output fc layer.

MultiLabelClsHead

Classification head for multilabel task.

MultiLabelLinearClsHead

Linear classification head for multilabel task.

VisionTransformerClsHead

Vision Transformer classifier head.

DeiTClsHead

Distilled Vision Transformer classifier head.

ConformerHead

Linear classifier head.

Losses

Accuracy

AsymmetricLoss

asymmetric loss.

CrossEntropyLoss

Cross entropy loss.

LabelSmoothLoss

Initializer for the label smoothed cross entropy loss.

FocalLoss

Focal loss.

SeesawLoss

Implementation of seesaw loss.

Read the Docs v: latest
Versions
master
latest
1.x
dev-1.x
Downloads
html
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.