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)[源代码]

Class to assign task to different inferencers.

参数
  • 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]][源代码]

Call the inferencer.

参数

kwargs – Keyword arguments for the inferencer.

返回

Results of inference pipeline.

返回类型

Union[Dict, List[Dict]]

get_extra_parameters() List[str][源代码]

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

返回

List of unique parameters.

返回类型

List[str]

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

Free document hosting provided by Read the Docs.