ImplicitQuadraticMotion<T>

Models & Types · AiDotNet.Video.FrameInterpolation

IQ-VFI’s implicit quadratic motion model (Hu, Jiang, Zhong, Wang and Zheng, CVPR 2024): modulates linear intermediate flows into quadratic ones using a latent acceleration prior.

For Beginners

Halfway between two video frames, an object moving in a curve is not halfway along the straight line between its start and end. This works out how much to bend that straight-line guess.

How It Works

Linear VFI approximates the intermediate flow as a straight-line interpolation of the frame-to-frame flow, which cannot follow curvilinear motion. IQ-VFI adds the acceleration term of a quadratic motion model:

The acceleration weight (t^2 - t) / 2 has two properties that make the decomposition well-formed, and both are asserted in the tests rather than assumed:

With a = 0 the model degenerates exactly to the linear one, which is what makes acceleration a strict generalization rather than a competing estimate.

Acceleration is assumed CONSTANT over the interval — the paper says so explicitly. That is what allows a single acceleration field to serve both directions, and it is why only TWO input frames are needed where earlier quadratic methods required four.

Constructors

Constructor Summary
ImplicitQuadraticMotion()

Methods

Method Summary
Tensor<T> ModulateBackward(Tensor<T> flowBackward, Tensor<T> acceleration, double t) Modulates a linear backward flow into a quadratic one: f_1t = (1-t) * f_10 + (a/2) * ((1-t)^2 - (1-t)).
Tensor<T> ModulateForward(Tensor<T> flowForward, Tensor<T> acceleration, double t) Modulates a linear forward flow into a quadratic one: f_0t = t * f_01 + (a/2) * (t^2 - t).
Tensor<T>[] ModulatePyramid(Tensor<T>[] flowsPerLevel, Tensor<T>[] accelerationPerLevel, double t, bool forward) Progressively modulates flows across a coarse-to-fine pyramid, refining the acceleration contribution level by level.
double BackwardAccelerationWeight(double t) The acceleration weight for the backward flow, ((1-t)^2 - (1-t)) / 2.
double ForwardAccelerationWeight(double t) The acceleration weight (t^2 - t) / 2 applied to the forward flow at time t.
void ValidateTime(double t) Validates a target time and throws if it lies outside [0, 1].