Shortcuts

mmagic.models.editors.flavr.flavr

Module Contents

Classes

FLAVR

FLAVR model for video interpolation.

class mmagic.models.editors.flavr.flavr.FLAVR(generator: dict, pixel_loss: dict, train_cfg: Optional[dict] = None, test_cfg: Optional[dict] = None, required_frames: int = 2, step_frames: int = 1, init_cfg: Optional[dict] = None, data_preprocessor: Optional[dict] = None)[source]

Bases: mmagic.models.base_models.BasicInterpolator

FLAVR model for video interpolation.

Paper:

FLAVR: Flow-Agnostic Video Representations for Fast Frame Interpolation

Ref repo: https://github.com/tarun005/FLAVR

Parameters
  • generator (dict) – Config for the generator structure.

  • pixel_loss (dict) – Config for pixel-wise loss.

  • train_cfg (dict) – Config for training. Default: None.

  • test_cfg (dict) – Config for testing. Default: None.

  • required_frames (int) – Required frames in each process. Default: 2

  • step_frames (int) – Step size of video frame interpolation. Default: 1

  • init_cfg (dict, optional) – The weight initialized config for BaseModule.

  • data_preprocessor (dict, optional) – The pre-process config of BaseDataPreprocessor.

init_cfg

Initialization config dict.

Type

dict, optional

data_preprocessor

Used for pre-processing data sampled by dataloader to the format accepted by forward().

Type

BaseDataPreprocessor

static merge_frames(input_tensors, output_tensors)[source]

merge input frames and output frames.

Interpolate a frame between the given two frames.

Merged from

[[in1, in2, in3, in4], [in2, in3, in4, in5], …] [[out1], [out2], [out3], …]

to

[in1, in2, out1, in3, out2, …, in(-3), out(-1), in(-2), in(-1)]

Parameters
  • input_tensors (Tensor) – The input frames with shape [n, 4, c, h, w]

  • output_tensors (Tensor) – The output frames with shape [n, 1, c, h, w].

Returns

The final frames.

Return type

list[np.array]

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.