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.
mmcls.core
Evaluation¶
Evaluation metrics calculation functions
Calculate precision according to the prediction and target. |
|
Calculate recall according to the prediction and target. |
|
Calculate F1 score according to the prediction and target. |
|
Calculate precision, recall and f1 score according to the prediction and target. |
|
Calculate the average precision for a single class. |
|
Calculate the mean average precision with respect of classes. |
|
Calculate the total number of occurrences of each label according to the prediction and target. |
|
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 according to the prediction and target. |
Hook¶
Precise BN hook. |
|
Cosine annealing learning rate scheduler with cooldown. |
|
Enhanced Wandb logger hook for classification. |
Optimizers¶
A pure pytorch variant of FuseLAMB (NvLamb variant) optimizer. |