Shortcuts

mmcls.apis.inference_model

mmcls.apis.inference_model(model, img)[源代码]

使用分类器推理图像

参数
  • model (BaseClassifier) – The loaded classifier.

  • img (str/ndarray) – The image filename or loaded image.

返回

The classification results that contains

class_name, pred_label and pred_score.

返回类型

result (dict)