PWStableNet<T>
Models & Types · AiDotNet.Video.Stabilization
PWStableNet pixel-wise warping video stabilization with per-pixel flow fields.
Inheritance: NeuralNetworkBase<T> → VideoNeuralNetworkBase<T> → VideoStabilizationBase<T> → PWStableNet<T>
For Beginners
PWStableNet (Pixel-Wise Stable Network) stabilizes video with pixel-level precision, handling parallax and dynamic scenes better than methods that assume a single global motion.
How It Works
References:
- Paper: “PWStableNet: Learning Pixel-Wise Warping Maps for Video Stabilization” (Zhao et al., IEEE TIP 2020)
PWStableNet predicts per-pixel warping maps instead of global homographies, enabling more flexible stabilization that can handle parallax, rolling shutter distortion, and depth-dependent motion, with coarse-to-fine refinement of the warp field.
Example
// Create a PWStableNet model for pixel-wise video stabilization
var architecture = new NeuralNetworkArchitecture<double>(
inputType: InputType.ThreeDimensional,
taskType: NeuralNetworkTaskType.Generative,
inputHeight: 256, inputWidth: 256, inputDepth: 3);
var options = new PWStableNetOptions();
var pwStable = new PWStableNet<double>(architecture, options);
// Or load a pre-trained ONNX model for inference
var pwStableOnnx = new PWStableNet<double>(architecture, "pwstablenet_model.onnx");
Constructors
| Constructor | Summary |
|---|---|
PWStableNet(NeuralNetworkArchitecture<T> architecture, PWStableNetOptions options, IGradientBasedOptimizer<T, Tensor<T>, Tensor<T>> optimizer) |
Creates a PWStableNet model for native training and inference. |
PWStableNet(NeuralNetworkArchitecture<T> architecture, string modelPath, PWStableNetOptions options) |
Creates a PWStableNet model for native training and inference. |
Methods
| Method | Summary |
|---|---|
ModelMetadata<T> GetModelMetadata() |
|
Tensor<T> Stabilize(Tensor<T> unstableFrames) |