备注
您正在阅读 MMClassification 0.x 版本的文档。MMClassification 0.x 会在 2022 年末被切换为次要分支。建议您升级到 MMClassification 1.0 版本,体验更多新特性和新功能。请查阅 MMClassification 1.0 的安装教程、迁移教程以及更新日志。
mmcls.core¶
This package includes some runtime components. These components are useful in classification tasks but not supported by MMCV yet.
备注
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. |