RoMa v2 β€” ONNX graphs for OpenMVS

Exported RoMa v2 graphs, in the layout OpenMVS consumes in-process through ONNX Runtime. Two graphs per preset, no refiner:

  • descriptor β€” image[1,3,S,S] (planar RGB in [0,1]) β†’ layers[1,2,G,G,1024], value_facets[1,2,G,G,1024], retrieval[1,2048]. The DINOv3 backbone taps two blocks into layers (what the matcher consumes) and two into value_facets, which the graph pools on device β€” GeM(p=3) β†’ concat β†’ signed power β†’ L2 β€” into the 2048-D retrieval vector used for image-pair selection.
  • match_coarse β€” (descriptors_A, descriptors_B) β†’ warp[1,C,C,2], confidence[1,C,C,1], warp_BA[1,C,C,2], confidence_BA[1,C,C,1]. Both directions of a pair come from one call, so a two-view verdict can measure inlier area in each image without a second pass.

S is the square input resolution the preset traces for, G = S/16 the descriptor grid and C = S/4 the warp grid. Graphs are fp32, static shape, batch 1; the runtime decides the rest (ONNX Runtime runs the fp32 graph with TF32 on CUDA).

Contents

base-fp32/
  roma_base.json                          manifest β€” shapes, taps, retrieval recipe, file names
  roma_base_descriptor_fp32.onnx          + .onnx.data     (external weights)
  roma_base_match_coarse_fp32.onnx        + .onnx.data
  roma_base_descriptor_fp32.export.json   provenance sidecar
  roma_base_match_coarse_fp32.export.json

base traces at S = 640 (G = 40, C = 160). turbo (320) and fast (512) are published as sibling directories when needed; the OpenMVS default is base.

Use from OpenMVS

cmake --build . --target roma2-model     # fetches this repo, verifies the pinned checksums
CreateStructure images/ --roma2 true --match-mode 4          # DINOv3+GeM pair selection, SIFT matching
CreateStructure images/ --roma2 true --roma2-match true      # + one-pass dense matching

The build's fetch script places the files where --roma2 finds them; otherwise point --roma2-model DIR or $OPENMVS_ROMA2_MODEL_PATH at the preset directory. Needs a build configured with -DOpenMVS_USE_ONNXRUNTIME=ON.

Provenance

Every graph carries an .export.json sidecar recording exactly what produced it:

RoMa v2 checkpoint romav2.0.1.pt, SHA256 1557dec0d21b62366465f7ff4d5fdf228cc695d0582e196ad2b80e05230828b7
RoMa v2 commit 83a14cf
DINOv3 hub commit adc254450203739c8149213a7a69d8d905b4fcfa
exporter torch.onnx dynamo
value-facet blocks 15, 20
layer taps 11, 17

Each graph is checked against the eager PyTorch model twice: once on random input (which catches a graph that computes nothing) and once on a real overlapping image pair, with the pooled retrieval descriptors judged separately at a cosine floor of 0.99999. The CPU execution provider and the model's own bf16 noise floor are measured too. The export log of the run that produced these files ships with them.

Licence β€” read this before downloading

Two licences apply, and the stricter one governs the weights.

  • RoMa v2's own code is MIT (Copyright Β© 2025 Johan Edstedt) β€” LICENSE-RoMaV2-MIT.txt.
  • The descriptor graph contains DINOv3 weights, which are licensed by Meta under the DINOv3 License β€” LICENSE-DINOv3.md, the version pinned at export time (last updated 2025-08-19).

Under Β§1(a) that licence grants a royalty-free, worldwide right to use, reproduce, distribute, copy, modify and create derivative works of the materials. Under Β§1(b)(i), redistribution of the materials or any derivative is permitted only under that same Agreement, with a copy of it supplied β€” which is why it travels in this repository and why these weights are not covered by OpenMVS's own AGPL licence. Β§1(b)(iii) and Β§1(b)(v) require trade-control compliance and forbid ITAR, military, weapons, nuclear and espionage uses. Β§1(b)(ii) asks that published research acknowledge the use of DINOv3.

Downloading and using these files means accepting the DINOv3 License. Meta may amend it (Β§8); the copy here is the version these graphs were exported under.

Citation

@article{edstedt2025romav2,
  title   = {{RoMa v2}},
  author  = {Edstedt, Johan and others},
  year    = {2025},
  url     = {https://github.com/Parskatt/RoMaV2}
}

DINOv3: SimΓ©oni et al., DINOv3, Meta AI Research, 2025.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support