Shortcuts

mmagic.apis.inferencers.video_restoration_inferencer

Module Contents

Classes

VideoRestorationInferencer

inferencer that predicts with video restoration models.

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

Bases: mmagic.apis.inferencers.base_mmagic_inferencer.BaseMMagicInferencer

inferencer that predicts with video restoration models.

func_kwargs[源代码]
extra_parameters[源代码]
preprocess(video: mmagic.apis.inferencers.base_mmagic_inferencer.InputsType) Dict[源代码]

Process the inputs into a model-feedable format.

参数

video (InputsType) – Video to be restored by models.

返回

Results of preprocess.

返回类型

results(InputsType)

forward(inputs: mmagic.apis.inferencers.base_mmagic_inferencer.InputsType) mmagic.apis.inferencers.base_mmagic_inferencer.PredType[源代码]

Forward the inputs to the model.

参数

inputs (InputsType) – Images array of input video.

返回

Results of forwarding

返回类型

PredType

visualize(preds: mmagic.apis.inferencers.base_mmagic_inferencer.PredType, result_out_dir: str = '') 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]

postprocess(preds: mmagic.apis.inferencers.base_mmagic_inferencer.PredType, imgs: Optional[List[numpy.ndarray]] = None) Union[mmagic.apis.inferencers.base_mmagic_inferencer.ResType, Tuple[mmagic.apis.inferencers.base_mmagic_inferencer.ResType, numpy.ndarray]][源代码]

Postprocess is not needed in this inferencer.

Read the Docs v: latest
Versions
latest
stable
0.x
Downloads
pdf
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.