mmagic.apis.inferencers.video_interpolation_inferencer
¶
Module Contents¶
Classes¶
inferencer that predicts with video interpolation models. |
- class mmagic.apis.inferencers.video_interpolation_inferencer.VideoInterpolationInferencer(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 interpolation models.
- preprocess(video: mmagic.apis.inferencers.base_mmagic_inferencer.InputsType) Dict [源代码]¶
Process the inputs into a model-feedable format.
- 参数
video (InputsType) – Video to be interpolated by models.
- 返回
Video to be interpolated by models.
- 返回类型
video(InputsType)
- forward(inputs: mmagic.apis.inferencers.base_mmagic_inferencer.InputsType, result_out_dir: mmagic.apis.inferencers.base_mmagic_inferencer.InputsType = '') mmagic.apis.inferencers.base_mmagic_inferencer.PredType [源代码]¶
Forward the inputs to the model.
- 参数
inputs (InputsType) – Input video directory.
result_out_dir (str) – Output directory of video. Defaults to ‘’.
- 返回
Result of forwarding
- 返回类型
PredType
- visualize(preds: mmagic.apis.inferencers.base_mmagic_inferencer.PredType, result_out_dir: str = '') List[numpy.ndarray] [源代码]¶
Visualize is not needed in this inferencer.
- 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.