Shortcuts

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.core

This package includes some runtime components. These components are useful in classification tasks but not supported by MMCV yet.

Note

Some components may be moved to MMCV in the future.

Evaluation

Evaluation metrics calculation functions

precision

Calculate precision according to the prediction and target.

recall

Calculate recall according to the prediction and target.

f1_score

Calculate F1 score according to the prediction and target.

precision_recall_f1

Calculate precision, recall and f1 score according to the prediction and target.

average_precision

Calculate the average precision for a single class.

mAP

Calculate the mean average precision with respect of classes.

support

Calculate the total number of occurrences of each label according to the prediction and target.

average_performance

Calculate CP, CR, CF1, OP, OR, OF1, where C stands for per-class average, O stands for overall average, P stands for precision, R stands for recall and F1 stands for F1-score.

calculate_confusion_matrix

Calculate confusion matrix according to the prediction and target.

Hook

ClassNumCheckHook

PreciseBNHook

Precise BN hook.

CosineAnnealingCooldownLrUpdaterHook

Cosine annealing learning rate scheduler with cooldown.

MMClsWandbHook

Enhanced Wandb logger hook for classification.

Optimizers

Lamb

A pure pytorch variant of FuseLAMB (NvLamb variant) optimizer.

Read the Docs v: master
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.