Shortcuts

mmpretrain.apis.inference_model

mmpretrain.apis.inference_model(model, *args, **kwargs)[source]

Inference an image with the inferencer.

Automatically select inferencer to inference according to the type of model. It’s a shortcut for a quick start, and for advanced usage, please use the correspondding inferencer class.

Here is the mapping from task to inferencer:

Parameters:
  • model (BaseModel | str | Config) – The loaded model, the model name or the config of the model.

  • *args – Positional arguments to call the inferencer.

  • **kwargs – Other keyword arguments to initialize and call the correspondding inferencer.

Returns:

The inference results.

Return type:

result (dict)

Read the Docs v: latest
Versions
latest
stable
mmcls-1.x
mmcls-0.x
dev
Downloads
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.