ThreeDMF<T>

Models & Types · AiDotNet.Video.Stabilization

3DMF 3D motion field video stabilization with depth-aware camera compensation.

Inheritance: NeuralNetworkBase<T> → VideoNeuralNetworkBase<T> → VideoStabilizationBase<T> → ThreeDMF<T>

For Beginners

3DMF (3D Motion Field) stabilizes video by estimating 3D camera motion and removing unwanted shake while preserving intentional camera movements like pans and tilts.

How It Works

References:

  • Paper: “3D Video Stabilization with Depth Estimation by CNN-based Optimization” (Lee & Lee, CVPR 2021)

3DMF estimates depth and 3D camera motion to perform stabilization in 3D space, jointly predicting per-pixel depth maps and 6-DOF camera poses to compute depth-aware warping that correctly handles parallax and depth-dependent motion.

Example

// Create a 3DMF model for depth-aware 3D video stabilization
var architecture = new NeuralNetworkArchitecture<double>(
    inputType: InputType.ThreeDimensional,
    taskType: NeuralNetworkTaskType.Generative,
    inputHeight: 256, inputWidth: 256, inputDepth: 3);
var options = new ThreeDMFOptions();
var threeDMF = new ThreeDMF<double>(architecture, options);
            
// Or load a pre-trained ONNX model for inference
var threeDMFOnnx = new ThreeDMF<double>(architecture, "3dmf_model.onnx");

Constructors

Constructor Summary
ThreeDMF(NeuralNetworkArchitecture<T> architecture, ThreeDMFOptions options, IGradientBasedOptimizer<T, Tensor<T>, Tensor<T>> optimizer) Creates a ThreeDMF model for native training and inference.
ThreeDMF(NeuralNetworkArchitecture<T> architecture, string modelPath, ThreeDMFOptions options) Creates a ThreeDMF model for native training and inference.

Methods

Method Summary
ModelMetadata<T> GetModelMetadata()
Tensor<T> Stabilize(Tensor<T> unstableFrames)