Shortcuts

mmedit.apis.inferencers.mmedit_inferencer

Module Contents

Classes

MMEditInferencer

Class to assign task to different inferencers.

class mmedit.apis.inferencers.mmedit_inferencer.MMEditInferencer(task: Optional[str] = None, config: Optional[Union[mmedit.utils.ConfigType, str]] = None, ckpt: Optional[str] = None, device: torch.device = None, extra_parameters: Optional[Dict] = None, seed: int = 2022)[source]

Class to assign task to different inferencers.

Parameters
  • task (str) – Inferencer task.

  • config (str or ConfigType) – Model config or the path to it.

  • ckpt (str, optional) – Path to the checkpoint.

  • device (str, optional) – Device to run inference. If None, the best device will be automatically used.

  • seed (int) – The random seed used in inference. Defaults to 2022.

__call__(**kwargs) Union[Dict, List[Dict]][source]

Call the inferencer.

Parameters

kwargs – Keyword arguments for the inferencer.

Returns

Results of inference pipeline.

Return type

Union[Dict, List[Dict]]

get_extra_parameters() List[str][source]

Each inferencer may has its own parameters. Call this function to get these parameters.

Returns

List of unique parameters.

Return type

List[str]

Read the Docs v: latest
Versions
master
latest
stable
zyh-re-docs
zyh-doc-notfound-extend
zyh-api-rendering
Downloads
pdf
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.