DKM<T>
Models & Types · AiDotNet.Video.Motion
DKM dense kernelized feature matching for geometry estimation.
Inheritance: NeuralNetworkBase<T> → VideoNeuralNetworkBase<T> → OpticalFlowBase<T> → DKM<T>
For Beginners
DKM (Dense Kernelized Matching) estimates dense correspondences between image pairs using learned kernels. It produces accurate pixel-level matching for optical flow and stereo vision.
How It Works
References:
- Paper: “DKM: Dense Kernelized Feature Matching for Geometry Estimation” (Edstedt et al., CVPR 2023)
DKM uses dense kernelized matching to establish pixel-level correspondences between images for accurate geometry estimation.
Example
// Create a DKM model for dense feature matching and geometry estimation
var dkm = new DKM<double>();
// Or configure with custom feature dimensions
var architecture = new NeuralNetworkArchitecture<double>(
inputType: InputType.ThreeDimensional,
taskType: NeuralNetworkTaskType.Regression,
inputHeight: 256, inputWidth: 256, inputDepth: 3, outputSize: 2);
var model = new DKM<double>(architecture, options: new DKMOptions { NumFeatures = 64, NumLayers = 8 });
Constructors
| Constructor | Summary |
|---|---|
DKM() |
Creates a new DKM model for native training and inference. |
DKM(NeuralNetworkArchitecture<T> architecture, DKMOptions options) |
Methods
| Method | Summary |
|---|---|
ModelMetadata<T> GetModelMetadata() |
|
Tensor<T> EstimateFlow(Tensor<T> frame0, Tensor<T> frame1) |