TemporalConsistency<T>

Models & Types · AiDotNet.Metrics

Temporal Consistency metric for evaluating video smoothness and coherence.

How It Works

Temporal consistency measures how smoothly content changes between consecutive frames. It’s crucial for video generation quality, as flickering and jittery artifacts are often more distracting than per-frame quality issues.

Two main approaches:

  • Pixel-level temporal difference (simple but sensitive to motion)
  • Optical flow consistency (accounts for motion but more complex)

Values range from 0 to 1, where higher values indicate better temporal consistency.

Constructors

Constructor Summary
TemporalConsistency() Initializes a new instance of TemporalConsistency calculator.

Methods

Method Summary
T ComputeFlicker(Tensor<T> generatedVideo) Computes flicker metric (measures high-frequency temporal variations).
T ComputeSimple(Tensor<T> generatedVideo) Computes simple temporal consistency without optical flow.
T ComputeWithFlow(Tensor<T> generatedVideo, Tensor<T> opticalFlow) Computes temporal consistency using warped frame differences.