mmcls.apis.inference_model¶
- mmcls.apis.inference_model(model, img, device=None)[源代码]¶
Inference an image with the classifier.
- 参数
- 返回
The classification results that contains:
pred_scores: The classification scores of all categories.pred_class: The predicted category.pred_label: The predicted index of the category.pred_score: The score of the predicted category.
- 返回类型
result (dict)
备注
This function is reserved for compatibility and demo on a single image. We suggest to use
ImageClassificationInferencer, which is more powerful and configurable.