RoMa<T>

Models & Types · AiDotNet.Video.Motion

RoMa robust dense feature matching with DINOv2 foundation for pixel-dense warps.

Inheritance: NeuralNetworkBase<T> → VideoNeuralNetworkBase<T> → OpticalFlowBase<T> → RoMa<T>

For Beginners

RoMa (Robust Dense Matching) estimates robust pixel correspondences between images. It handles challenging cases like occlusions, textureless regions, and large displacements.

How It Works

References:

  • Paper: “RoMa: Robust Dense Feature Matching” (Edstedt et al., CVPR 2024)

RoMa achieves robust dense feature matching using DINOv2 foundation features, producing pixel-dense correspondence maps for geometry estimation.

Example

// Create a RoMa model for robust dense feature matching
var roma = new RoMa<double>();
            
// Or configure with custom parameters
var architecture = new NeuralNetworkArchitecture<double>(
    inputType: InputType.ThreeDimensional,
    taskType: NeuralNetworkTaskType.Regression,
    inputHeight: 256, inputWidth: 256, inputDepth: 3, outputSize: 2);
var model = new RoMa<double>(architecture);

Constructors

Constructor Summary
RoMa() Initializes a new instance with default architecture settings.
RoMa(NeuralNetworkArchitecture<T> architecture, RoMaOptions options) Creates a new RoMa model for native training and inference.

Methods

Method Summary
ModelMetadata<T> GetModelMetadata()
Tensor<T> EstimateFlow(Tensor<T> frame0, Tensor<T> frame1)