Shortcuts

mmcls.apis.inference_model

mmcls.apis.inference_model(model, img)[source]

Inference image(s) with the classifier.

Parameters
  • model (nn.Module) – The loaded classifier.

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

Returns

The classification results that contains

class_name, pred_label and pred_score.

Return type

result (dict)

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