GaVS<T>
Models & Types · AiDotNet.Video.Stabilization
GaVS gaze-aware video stabilization with saliency-weighted motion smoothing.
Inheritance: NeuralNetworkBase<T> → VideoNeuralNetworkBase<T> → VideoStabilizationBase<T> → GaVS<T>
For Beginners
GaVS (Generative Adversarial Video Stabilization) uses adversarial training to produce stabilized video that looks natural. The discriminator ensures the output appears like genuinely stable footage.
How It Works
References:
- Paper: “Gaze-aware Video Stabilization” (2023)
GaVS predicts viewer gaze regions and applies stronger stabilization near the focus of attention while allowing more camera motion in peripheral regions. This preserves intentional cinematographic movements while removing distracting shake near gaze targets.
Example
// Create a GaVS model for gaze-aware video stabilization
var architecture = new NeuralNetworkArchitecture<double>(
inputType: InputType.ThreeDimensional,
taskType: NeuralNetworkTaskType.Generative,
inputHeight: 256, inputWidth: 256, inputDepth: 3);
var options = new GaVSOptions();
var gavs = new GaVS<double>(architecture, options);
// Or load a pre-trained ONNX model for inference
var gavsOnnx = new GaVS<double>(architecture, "gavs_model.onnx");
Constructors
| Constructor | Summary |
|---|---|
GaVS(NeuralNetworkArchitecture<T> architecture, GaVSOptions options, IGradientBasedOptimizer<T, Tensor<T>, Tensor<T>> optimizer) |
Creates a GaVS model for native training and inference. |
GaVS(NeuralNetworkArchitecture<T> architecture, string modelPath, GaVSOptions options) |
Creates a GaVS model for native training and inference. |
Methods
| Method | Summary |
|---|---|
ModelMetadata<T> GetModelMetadata() |
|
Tensor<T> Stabilize(Tensor<T> unstableFrames) |