Shortcuts

mmedit.apis.inferencers.colorization_inferencer

Module Contents

Classes

ColorizationInferencer

inferencer that predicts with colorization models.

class mmedit.apis.inferencers.colorization_inferencer.ColorizationInferencer(config: Union[mmedit.utils.ConfigType, str], ckpt: Optional[str], device: Optional[str] = None, extra_parameters: Optional[Dict] = None, seed: int = 2022, **kwargs)[源代码]

Bases: mmedit.apis.inferencers.base_mmedit_inferencer.BaseMMEditInferencer

inferencer that predicts with colorization models.

func_kwargs[源代码]
preprocess(img: mmedit.apis.inferencers.base_mmedit_inferencer.InputsType) Dict[源代码]

Process the inputs into a model-feedable format.

参数

img (InputsType) – Image to be translated by models.

返回

Results of preprocess.

返回类型

results(Dict)

forward(inputs: mmedit.apis.inferencers.base_mmedit_inferencer.InputsType) mmedit.apis.inferencers.base_mmedit_inferencer.PredType[源代码]

Forward the inputs to the model.

visualize(preds: mmedit.apis.inferencers.base_mmedit_inferencer.PredType, result_out_dir: str = None) List[numpy.ndarray][源代码]

Visualize predictions.

参数
  • preds (List[Union[str, np.ndarray]]) – Forward results by the inferencer.

  • data (List[Dict]) – Not needed by this kind of inferencer.

  • result_out_dir (str) – Output directory of image. Defaults to ‘’.

返回

Result of visualize

返回类型

List[np.ndarray]

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.