LoMa
LoMa (Nordström, Edstedt et al. 2026): sparse matching of two photos of one scene: DaD keypoints, DeDoDe-G descriptions (VGG19 plus DINOv2) and a light LightGlue-style transformer matcher; matches as keypoint index pairs (the form COLMAP takes). MIT code and weights; DINOv2 Apache-2.0.
experimental Fork of davnords/loma@ecc947d · backends: portable, kernels
- Paper LoMa: Local Feature Matching Revisited ECCV 2026 · first released 6 Apr 2026
Paper 2026 Added in 0.2.0 Evaluated with 0.4.0
Use it
pip install fastforks Lean install with only what this model needs: pip install fastforks-core
from fastforks import matching
model = matching.load("loma-b") # fastest backend that runs here
result = model("image1.jpg", "image2.jpg")
# result fields: keypoints1, keypoints2, pairs, scores
keypoints1 = result.keypoints1 # a torch tensor
arrays = result.numpy() # the tensor fields as NumPy arrays: arrays["keypoints1"]
result.backend # what ran: mode, device, dtype
points1, points2 = result.matches(5000) # matched pixels, sampled where the model is certain
pose = matching.estimate_pose(points1, points2, K1, K2) # relative pose on the GPU (RANSAC); K = intrinsics [3, 3]
pose.R, pose.t, pose.inliers # rotation, unit translation, inlier mask Other ways to run it
- Backend:
matching.load("loma-b", mode="kernels") # or "portable", "auto" (default) - Precision:
matching.load("loma-b", dtype="float32") # full precision: slower, portable only - Options:
matching.load("loma-b", options={"max_keypoints": 2048, "long_side": 1024, "size": 784})
fastforks bench loma-b Times the model on this machine. load(…, mode="portable") or mode="kernels" picks a backend; usage guide.
Speed and memory
Every backend on one GPU (RTX 5060 Ti 16 GB) and the same input, the authors’ code included. Kernels runs fp16. Portable runs bf16 on CUDA.
Input: synthetic, 768x1024 (the task’s standard size)
| Backend | dtype | Time per call (ms) | vs original fp16 | Peak memory allocated / reserved | Load (s) | First call (s) |
|---|---|---|---|---|---|---|
| Original fp32Original LoMa on the same synthetic pair with 2,048 keypoints per image. FP32 with mixed precision disabled. | fp32 | 1039 | 0.37× | 4,174 MiB/4,992 MiB | 11.5 | 1.35 |
| Original (own default)Original LoMa on the same synthetic pair with 2,048 keypoints per image. Authors' BF16 mixed precision on Ampere and later. | bf16 | 383 | – | 1,853 MiB/3,494 MiB | 8.1 | 0.78 |
| Portable fp32 | fp32 | not measured | – | – | – | – |
| PortableFull matching API on one synthetic 768 × 1024 pair with 2,048 keypoints per image. | bf16 | 308 | 1.2× | 1,547 MiB/2,546 MiB | 2.8 | 0.72 |
| KernelsFull matching API on one synthetic 768 × 1024 pair with 2,048 keypoints per image. | fp16 | 261 | 1.5× | 1,177 MiB/1,676 MiB | 1.6 | 0.65 |
| Portable + torch.compile | 287 | 1.3× | 2,870 MiB/3,258 MiB | 143 (build) | – | |
| TensorRT bf16standalone build only | bf16 | 326 | 1.2× | 1,968 MiBenginenot comparable | 176 (build) | – |
Measured on RTX 5060 Ti 16 GB, torch 2.14.1+cu130, 2026-11-25. Separate process for each mode. Synchronized first call and median of the last 3 warm calls.. Ratios divide two
times of this table (same GPU, same input). Original fp16 is the authors’ own precision option, else torch.autocast. torch.compile and TensorRT: build time instead of load time. TensorRT memory (engine, not comparable) is the GPU memory the engine took, read from the driver because TensorRT allocates outside PyTorch, so it can't be compared with the PyTorch peaks of the other rows.
Other devices
| Device | Backend | dtype | ms / call | Peak memory | Load / first call (s) | Output vs reference | Input |
|---|---|---|---|---|---|---|---|
| NVIDIA runs on Linux and Windows | |||||||
| NVIDIA L4 CUDA, torch 2.14.1+cu130, 2026-11-29 | Portable | bf16 | 340 | 1,518 MiB/1,718 MiB | 3.0 / 1.0 | matches | 768x1024 |
| Kernels | fp16 | 305 | 1,146 MiB/1,286 MiB | 2.0 / 0.7 | matches | 768x1024 | |
| NVIDIA L40S CUDA, torch 2.14.1+cu130, 2026-11-30 | Portable | bf16 | 92.2 | 1,518 MiB/1,698 MiB | 2.0 / 0.5 | matches | 768x1024 |
| Kernels | fp16 | 79.9 | 1,146 MiB/1,288 MiB | 1.5 / 0.4 | matches | 768x1024 | |
| NVIDIA A10 CUDA, torch 2.14.1+cu130, 2026-11-30 | Portable | bf16 | 269 | 1,518 MiB/1,698 MiB | 2.1 / 0.7 | matches | 768x1024 |
| Kernels | fp16 | 236 | 1,146 MiB/1,288 MiB | 1.9 / 0.5 | matches | 768x1024 | |
| Apple silicon runs on macOS | |||||||
| Apple M1 Pro 16 GB MPS, torch 2.14.1, 2026-11-22 | Portable | fp32 | 3041 | 8,137 MiB process | 2.1 / 3.6 | matches | 768x1024 |
| Kernels | fp32 | not implemented | – | – | 768x1024 | ||
| Apple M1 Pro 16 GB (MLX, fp16) MLX, torch 2.14.1, 2026-11-25 | Portable | fp16 | 2375 | 2,819 MiB process | 2.3 / 2.4 | matches | 768x1024 |
| Portable | fp32 | 3246 | 3,574 MiB process | 3.0 / 3.3 | matches | 768x1024 | |
| Kernels | fp32 | not implemented | – | – | 768x1024 | ||
CUDA memory is torch’s peak allocated / reserved; Apple has no such counter, so the Mac rows show the process footprint (weights, Python and torch included). “Output vs reference” compares the device’s output with the stored golden output under the card’s tolerance; – = not checked on that device. Kernels “not implemented” = no kernels for this model on that backend yet: it runs portable there.
Licence and weights
Commercial use allowed
- Code
- MIT AND Apache-2.0 LICENSELICENSE-DADLICENSE-DEDODELICENSE-DINOv2
- Weights
- MIT AND Apache-2.0 (assumed from code)(not stated by the authors; assumed to follow the code) source
- Training data
- weights licence not stated by the original authors; assumed to be the code licence
Our reading of the licences, not legal advice.
Weights
loma_B.pt 758 MB· hosted on GitHubfastforks downloads and checks these files on first use (fastforks download loma-b).
Accuracy
The test set through the authors’ code and through ours: same checkpoint, same protocol. The distance between the original’s fp32 and fp16 runs is what half precision alone costs; our runs should stay within it.
MegaDepth-1500
300 pairs at 768 x 1024, pose AUC@5 / @10 / @20
| Run | dtype | AUC@5° ↑ | AUC@10° ↑ | AUC@20° ↑ | Δ AUC@5° vs fp32 original | pairs | ms / pair |
|---|---|---|---|---|---|---|---|
| Original fp32 | fp32 | 55.1 | 71.2 | 82.2 | reference | 300 | 1037 |
| Original fp16 | bf16 | 54.9 | 71.7 | 83.1 | −0.2 | 300 | 383 |
| Portable fp32 | not measured | ||||||
| Portable | bf16 | 58.1 | 73.5 | 84.2 | +3.1 | 300 | – |
| Kernels | fp16 | 57.2 | 73.8 | 84.8 | +2.1 | 300 | – |
Dense matchers: 5000 matches per pair sampled from the warp by certainty (upstream's balanced KDE sampling); sparse matchers: all their matches of one call (LightGlue, XFeat: LightGlue's MegaDepth-1500 setting; LoFTR, DeDoDe: their card defaults). OpenCV essential-matrix RANSAC (0.5 px threshold, normalised by the mean focal length); AUC of the larger of the rotation and translation-direction errors. Both modes receive pairs resized to 768 x 1024. Map matched pixels to the calibrated evaluation coordinates and use the same RANSAC seed per pair. Original = the authors’ code, same checkpoint and protocol. Measured on original fp32, original fp16: RTX 5060 Ti, torch 2.14.1+cu130, 2026-11-25; portable: RTX 5060 Ti, torch 2.14.1+cu130, fastforks 4475282a, 2026-11-18; kernels: RTX 5060 Ti, torch 2.14.1+cu130, fastforks 8630e98f1, 2026-11-20.
MegaDepth-1500
every 5th pair, relative pose AUC@5 / @10 / @20 degrees
| Run | dtype | AUC@5° ↑ | AUC@10° ↑ | AUC@20° ↑ | Δ AUC@5° vs fp32 original | pairs | ms / pair |
|---|---|---|---|---|---|---|---|
| Original fp32 | fp32 | 54.5 | 71.6 | 83.7 | reference | 300 | 1033 |
| Original fp16 | bf16 | 55.6 | 72.2 | 84.2 | +1.1 | 300 | 381 |
| Portable fp32 | fp32 | 56.2 | 72.7 | 84.1 | +1.8 | 300 | 974 |
| Portable | bf16 | 54.3 | 71.3 | 83.6 | −0.2 | 300 | 307 |
| Kernels | fp16 | 54.7 | 71.8 | 83.9 | +0.2 | 300 | 259 |
Dense matchers: 5000 matches per pair sampled from the warp by certainty (upstream's balanced KDE sampling); sparse matchers: all their matches of one call (LightGlue, XFeat: LightGlue's MegaDepth-1500 setting; LoFTR, DeDoDe: their card defaults). OpenCV essential-matrix RANSAC (0.5 px threshold, normalised by the mean focal length); AUC of the larger of the rotation and translation-direction errors. The same 300 pairs for all modes, so float32 and bfloat16 compare pair for pair. Original = the authors’ code, same checkpoint and protocol. Measured on original fp32: RTX 5060 Ti, torch 2.14.1+cu130, 2026-11-16; original fp16: RTX 5060 Ti, torch 2.14.1+cu130, 2026-11-25; portable fp32, portable: RTX 5060 Ti, torch 2.14.1+cu130, fastforks 32e2e81e9, 2026-11-20; kernels: RTX 5060 Ti, torch 2.14.1+cu130, fastforks 3e1db914b746, 2026-11-25.
Relative pose on the GPU
A dense matcher is usually followed by RANSAC on its matches to get the camera motion. fastforks does that step on the
GPU too: result.matches(n) samples matched points where the model is certain, and matching.estimate_pose runs essential-matrix RANSAC on them, many image pairs per call, with no copy to
the CPU. Like the models it has a portable (plain PyTorch) and a kernels (CUDA) backend.
| Solver | Runs on | Threshold (px) | Pose AUC@5 / @10 / @20 | Pairs per second |
|---|---|---|---|---|
| fastforks estimate_pose, kernels | GPU, batches of 500 pairs | 1.0 | 69.9 / 81.5 / 89.3 | 18,446 |
| fastforks estimate_pose, portable | GPU, batches of 500 pairs | 1.0 | 69.6 / 81.2 / 89.1 | 418 |
| PoseLib 2.0.5 | CPU, 16 processes | 1.0 | 70.0 / 81.6 / 89.5 | 325 |
| OpenCV USAC (MAGSAC++) | CPU, 16 processes | 0.5 | 65.7 / 78.6 / 87.3 | 271 |
| OpenCV RANSAC | CPU, 16 processes | 0.5 | 62.9 / 76.9 / 86.4 | 323 |
MegaDepth-1500, RoMa v2 matches (5000 per pair), 5 samplings, the same matches for every solver, on one machine: RTX 5060 Ti and a Ryzen 7 5800X (16 threads). Each solver runs at the inlier threshold where it is most accurate. Pairs per second is wall-clock throughput over all 7500 poses: the CPU solvers run one pair per call in 16 single-threaded processes, the GPU solver takes 500 pairs per call. One pair alone takes about 1.7 ms with the kernels, 29 ms with PoseLib and 24 ms with OpenCV RANSAC on one core. The accuracy table above stays on OpenCV RANSAC, as in the papers, so it is comparable with published numbers; this table is the only place the GPU solver is used.
Closeness to the original
Beyond the test-set scores: the raw output of ours against the original’s fp32 output on the same input, pixel by pixel. CPU, float32: max |diff| <= 0.011 vs the original. GPU, portable bfloat16 and kernels float16 (the defaults): mean |diff| <= 0.05 and p99 <= 0.6 (absolute error of the output keypoints1).
| Check | Tolerance | Measured |
|---|---|---|
| CPU fp32, max |diff| | ≤ 0.011 | not recorded |
| cpu_min_recall | ≤ 0.99 | not recorded |
| cpu_min_match | ≤ 0.99 | not recorded |
| GPU default dtypes, mean |diff| | ≤ 0.05 | 0.00655 |
| GPU default dtypes, p99 |diff| | ≤ 0.6 | 0.3415 |
| gpu_min_recall | ≤ 0.96 | not recorded |
| gpu_min_match | ≤ 0.93 | not recorded |
Recorded for loma-b on RTX 5060 Ti, torch 2.14.1+cu130, 2026-11-18, with these kernels: cudnn_hacccutlass_convigevloma_descriptor
Details
LoMa (Nordström, Edstedt et al. 2026): local feature matching with a light transformer. DaD (a VGG11 detector trained by distillation, Edstedt et al. 2025) finds 2048 keypoints per image, a DeDoDe descriptor (VGG for B64/B128, VGG plus DINOv2 for B/L/G/R) describes them, and nine LightGlue-style transformer layers (rotary self-attention, cross-attention) refine the descriptions before a dual-softmax assignment. Returns both keypoint sets, the index pairs of the matches and their scores.
- Input / output
- Input: two RGB images of one scene. Output: for every pixel of the first image its position in the second (x, y in pixels) and a certainty that the pixel is visible in both.
What the numbers mean, and which models need the camera focal length
Sparse matchers (LightGlue) return the keypoints of both images and the index pairs of the matched ones instead. To reconstruct camera poses from an image folder with these matchers, see [structure from motion](../sfm.md).
- Input size
- any H x W >= 32, padded to a multiple of 32; tested up to 3000x4000 (2,424 MiB allocated)
- Options
max_keypoints=2048>= 1· changes the outputlong_side=1024>= 16· changes the outputsize=784>= 56· changes the output
- Outputs
keypoints1,keypoints2,pairs,scores- Checkpoint
dim=256,heads=4,layers=9- CUDA kernels
loma_descriptorigevIGEV stereo: convolution epilogues, correlation lookups, GRU gatescutlass_convCUTLASS convolutions with the recurrent update (GRU) fused incudnn_haccconvolutions with fp16 accumulation (cuDNN)
- Apple (MPS)
- fp32
Limitations
- The standalone B and L BF16 TensorRT engines at 768 x 1024 were compared on ten shifted photos. Minimum match precision within 2 px was 96.62% for B and 95.46% for L.
- For LoMa-B at 768 x 1024 BF16, export ONNX and build TensorRT in a fresh process. On the first 50 calibrated MegaDepth pairs, AUC@5 was 64.16 portable, 62.97 with the separately built plan, and 54.30 with the bundled TensorRT export.
- Sparse output: no dense warp. `result.matches()` gives the matched points for `estimate_pose`; `pairs` are the index pairs pycolmap / COLMAP databases take.
- One image pair per call internally (batches run pair by pair); the match counts differ per pair.
- The match count depends on the image pair. The fixed 768 x 1024 LoMa-B64 TensorRT export returns variable-length matches. On ten photos paired with shifted copies, at least 96.7% of TensorRT correspondences agreed with portable within 2 pixels in both images.
- Two resizes per image as upstream: the detector sees a long side of `long_side` (aspect kept), the descriptor a `size` x `size` square whatever the aspect ratio.
- LoMa-R uses rotation augmentation. The other variants are trained for upright images.
Full reference, generated from the repository
LoMa (Nordström, Edstedt et al. 2026): sparse matching of two photos of one scene: DaD keypoints, DeDoDe-G descriptions (VGG19 plus DINOv2) and a light LightGlue-style transformer matcher; matches as keypoint index pairs (the form COLMAP takes). MIT code and weights; DINOv2 Apache-2.0.
Commercial use: yes.
| variant | input | backend | time (ms) | peak memory (MiB, allocated / reserved) |
|---|---|---|---|---|
loma-b | synthetic (768x1024) | original (fp32) original portable kernels portable + torch.compile TensorRT bf16 | 1039 383 308 261 287 326 (standalone build) | 4174 / 4992 1853 / 3494 1547 / 2546 1177 / 1676 2870 / 3258 1986 / 2010 |
loma-b64 | synthetic (768x1024) | original (fp32) original portable kernels portable + torch.compile TensorRT bf16 | 316 196 129 103 102 109 | 1322 / 1730 938 / 1276 854 / 1210 511 / 748 1230 / 1356 1010 / 1034 |
loma-b128 | synthetic (768x1024) | original (fp32) original portable kernels portable + torch.compile TensorRT bf16 | 369 222 150 113 124 144 | 2001 / 2534 962 / 1696 879 / 1232 543 / 860 1398 / 1800 1062 / 1066 |
loma-l | synthetic (768x1024) | original (fp32) original portable kernels portable + torch.compile TensorRT bf16 | 1088 393 318 270 298 336 (standalone build) | 4314 / 5132 1993 / 3628 1685 / 2680 1249 / 1732 3006 / 3194 2042 / 2066 |
loma-g | synthetic (768x1024) | original (fp32) original portable kernels portable + torch.compile TensorRT bf16 | 1238 433 357 305 331 366 | 4851 / 5732 2529 / 4076 2223 / 3204 1518 / 1930 3547 / 3890 2298 / 2322 |
loma-r | synthetic (768x1024) | original (fp32) original portable kernels portable + torch.compile TensorRT bf16 | 1036 383 308 260 287 326 | 4174 / 4992 1853 / 3494 1547 / 2546 1177 / 1676 2870 / 3256 1986 / 2010 |
Details
- Original code: https://github.com/davnords/loma at
ecc947d44ddc - Code licence: MIT AND Apache-2.0 (permissive); files:
LICENSE,LICENSE-DAD,LICENSE-DEDODE,LICENSE-DINOv2 - Weights licence: MIT AND Apache-2.0 (assumed from code)
- Licence evidence: https://github.com/davnords/loma/blob/ecc947d44ddc9d50387e887bbedc743d65ffac00/README.md#license ; https://github.com/Parskatt/dad/blob/41b9e86a1a3ae52128485cc1094aa4952ef489ba/LICENSE ; https://github.com/Parskatt/DeDoDe/blob/6d156183f4dc84cd704ae779eebc8350995c5b06/README.md#license
- Training data: MegaDepth (Internet photo collections with SfM / MVS depth) (Matcher: MegaDepth (paper); DaD: MegaDepth-based distillation (DaD paper); DeDoDe-G descriptor: MegaDepth; B, L, G and R include frozen DINOv2 (LVD-142M). B64 and B128 use VGG descriptors.)
- Options:
max_keypoints= 2048 (>= 1),long_side= 1024 (>= 16),size= 784 (>= 56) - Kernel libraries:
loma_descriptor,igev,cutlass_conv,cudnn_hacc - Variants:
loma-b,loma-b64,loma-b128,loma-l,loma-g,loma-r - Public TensorRT export is unavailable for
loma-b(the bundled BF16 build reduces relative pose AUC@5 by 9.87 points on 50 MegaDepth pairs; use ONNX export and a separate engine build). - Outputs: keypoints1, keypoints2, pairs, scores
- Input size: any H x W >= 32, padded to a multiple of 32
- Tested up to (portable, fp16, RTX 5060 Ti 16 GB):
loma-b3000x4000 (2.4 GiB peak allocated, 3.6 reserved);loma-b643000x4000 (1.1 GiB peak allocated, 1.4 reserved);loma-b1283000x4000 (1.1 GiB peak allocated, 1.4 reserved);loma-l3000x4000 (2.1 GiB peak allocated, 2.8 reserved);loma-g3000x4000 (2.6 GiB peak allocated, 3.3 reserved);loma-r3000x4000 (2.0 GiB peak allocated, 2.7 reserved) loma-b768x1024, first call: portable + torch.compile 143 s (cold Inductor cache), TensorRT bf16 176 s (ONNX + engine).loma-b64768x1024, first call: portable + torch.compile 87 s (cold Inductor cache), TensorRT bf16 102 s (ONNX + engine).loma-b128768x1024, first call: portable + torch.compile 86 s (cold Inductor cache), TensorRT bf16 103 s (ONNX + engine).loma-l768x1024, first call: portable + torch.compile 134 s (cold Inductor cache), TensorRT bf16 157 s (ONNX + engine).loma-g768x1024, first call: portable + torch.compile 131 s (cold Inductor cache), TensorRT bf16 171 s (ONNX + engine).loma-r768x1024, first call: portable + torch.compile 142 s (cold Inductor cache), TensorRT bf16 175 s (ONNX + engine).loma-boriginal (fp32) 768x1024: Original LoMa on the same synthetic pair with 2,048 keypoints per image. FP32 with mixed precision disabled.loma-boriginal 768x1024: Original LoMa on the same synthetic pair with 2,048 keypoints per image. Authors' BF16 mixed precision on Ampere and later.loma-bportable 768x1024, kernels 768x1024: Full matching API on one synthetic 768 × 1024 pair with 2,048 keypoints per image.loma-b64original (fp32) 768x1024: Original LoMa on the same synthetic pair with 2,048 keypoints per image. FP32 with mixed precision disabled.loma-b64original 768x1024: Original LoMa on the same synthetic pair with 2,048 keypoints per image. Authors' BF16 mixed precision on Ampere and later.loma-b64portable 768x1024, kernels 768x1024: Full matching API on one synthetic 768 × 1024 pair with 2,048 keypoints per image.loma-b128original (fp32) 768x1024: Original LoMa on the same synthetic pair with 2,048 keypoints per image. FP32 with mixed precision disabled.loma-b128original 768x1024: Original LoMa on the same synthetic pair with 2,048 keypoints per image. Authors' BF16 mixed precision on Ampere and later.loma-b128portable 768x1024, kernels 768x1024: Full matching API on one synthetic 768 × 1024 pair with 2,048 keypoints per image.loma-loriginal (fp32) 768x1024: Original LoMa on the same synthetic pair with 2,048 keypoints per image. FP32 with mixed precision disabled.loma-loriginal 768x1024: Original LoMa on the same synthetic pair with 2,048 keypoints per image. Authors' BF16 mixed precision on Ampere and later.loma-lportable 768x1024, kernels 768x1024: Full matching API on one synthetic 768 × 1024 pair with 2,048 keypoints per image.loma-goriginal (fp32) 768x1024: Original LoMa on the same synthetic pair with 2,048 keypoints per image. FP32 with mixed precision disabled.loma-goriginal 768x1024: Original LoMa on the same synthetic pair with 2,048 keypoints per image. Authors' BF16 mixed precision on Ampere and later.loma-gportable 768x1024, kernels 768x1024: Full matching API on one synthetic 768 × 1024 pair with 2,048 keypoints per image.loma-roriginal (fp32) 768x1024: Original LoMa on the same synthetic pair with 2,048 keypoints per image. FP32 with mixed precision disabled.loma-roriginal 768x1024: Original LoMa on the same synthetic pair with 2,048 keypoints per image. Authors' BF16 mixed precision on Ampere and later.loma-rportable 768x1024, kernels 768x1024: Full matching API on one synthetic 768 × 1024 pair with 2,048 keypoints per image.loma-bload / first call: original 8.0709 s / 0.7796 s, portable 2.53 s / 1.269 s, kernels 1.61 s / 0.757 sloma-b64load / first call: original 3.5803 s / 0.9006 s, portable 0.28 s / 0.759 s, kernels 0.91 s / 0.651 sloma-b128load / first call: original 3.7091 s / 0.9045 s, portable 0.52 s / 0.636 s, kernels 0.85 s / 0.662 sloma-lload / first call: original 8.2423 s / 0.7863 s, portable 1.49 s / 0.69 s, kernels 3.06 s / 0.758 sloma-gload / first call: original 9.9204 s / 0.8636 s, portable 2.36 s / 0.8 s, kernels 2.19 s / 0.677 sloma-rload / first call: original 8.0216 s / 0.7804 s, portable 2.8 s / 0.733 s, kernels 1.93 s / 0.809 s- Protocol, first call, 3 warm-up, peak reset, median of 3 rounds x median of 5
Measured
Dense matchers: 5000 matches per pair sampled from the warp by certainty (upstream's balanced KDE sampling); sparse matchers: all their matches of one call (LightGlue, XFeat: LightGlue's MegaDepth-1500 setting; LoFTR, DeDoDe: their card defaults). OpenCV essential-matrix RANSAC (0.5 px threshold, normalised by the mean focal length); AUC of the larger of the rotation and translation-direction errors. Both modes receive pairs resized to 768 x 1024. Map matched pixels to the calibrated evaluation coordinates and use the same RANSAC seed per pair. The same 300 pairs for all modes, so float32 and bfloat16 compare pair for pair. Original = the original code named under Details, same checkpoint and protocol.
| variant | dataset | original fp32 | original fp16 | portable | portable fp32 | kernels | TensorRT | note |
|---|---|---|---|---|---|---|---|---|
loma-b | MegaDepth-1500, 300 pairs at 768 x 1024, pose AUC@5 / @10 / @20 | 55.1 / 71.2 / 82.2 | 54.9 / 71.7 / 83.1 | 58.1 / 73.5 / 84.2 | 57.2 / 73.8 / 84.8 | 56.9 / 73.1 / 84.2 | ||
loma-b | MegaDepth-1500, every 5th pair, relative pose AUC@5 / @10 / @20 degrees | 54.5 / 71.6 / 83.7 | 55.6 / 72.2 / 84.2 | 54.3 / 71.3 / 83.6 | 56.2 / 72.7 / 84.1 | 54.7 / 71.8 / 83.9 | ||
loma-b64 | MegaDepth-1500, 300 pairs at 768 x 1024, pose AUC@5 / @10 / @20 | 56.4 / 72.1 / 83.1 | 57.1 / 72.7 / 83.3 | 54.8 / 71.4 / 83.2 | 56.0 / 71.6 / 83.2 | 58.4 / 74.4 / 84.4 | ||
loma-b64 | MegaDepth-1500, every 5th pair, relative pose AUC@5 / @10 / @20 degrees | 57.0 / 73.6 / 84.8 | 56.2 / 73.2 / 84.4 | 56.9 / 72.8 / 84.5 | 54.9 / 71.5 / 83.1 | 57.3 / 72.5 / 83.6 | ||
loma-b128 | MegaDepth-1500, 300 pairs at 768 x 1024, pose AUC@5 / @10 / @20 | 58.8 / 73.6 / 84.2 | 56.6 / 72.5 / 83.8 | 53.0 / 70.2 / 82.1 | 54.9 / 71.8 / 84.0 | 55.6 / 71.5 / 82.7 | ||
loma-b128 | MegaDepth-1500, every 5th pair, relative pose AUC@5 / @10 / @20 degrees | 55.4 / 71.7 / 82.7 | 56.3 / 73.7 / 85.4 | 56.1 / 72.9 / 84.5 | 56.2 / 72.0 / 83.7 | 57.7 / 74.1 / 85.4 | ||
loma-l | MegaDepth-1500, 300 pairs at 768 x 1024, pose AUC@5 / @10 / @20 | 55.4 / 71.8 / 83.2 | 55.2 / 71.3 / 83.2 | 57.1 / 72.9 / 83.8 | 59.9 / 76.0 / 86.2 | 55.3 / 72.6 / 83.9 | ||
loma-l | MegaDepth-1500, every 5th pair, relative pose AUC@5 / @10 / @20 degrees | 54.3 / 70.9 / 83.3 | 55.6 / 72.1 / 84.1 | 56.4 / 74.3 / 85.6 | 57.1 / 72.9 / 84.6 | 56.4 / 73.9 / 85.2 | ||
loma-g | MegaDepth-1500, 300 pairs at 768 x 1024, pose AUC@5 / @10 / @20 | 56.8 / 73.0 / 84.5 | 59.5 / 74.8 / 85.2 | 56.8 / 72.6 / 84.0 | 56.9 / 73.0 / 83.9 | 56.7 / 72.4 / 83.3 | ||
loma-g | MegaDepth-1500, every 5th pair, relative pose AUC@5 / @10 / @20 degrees | 59.1 / 74.1 / 84.5 | 55.5 / 71.5 / 83.0 | 57.3 / 73.6 / 84.3 | 58.8 / 74.6 / 85.3 | 56.1 / 72.8 / 84.4 | ||
loma-r | MegaDepth-1500, 300 pairs at 768 x 1024, pose AUC@5 / @10 / @20 | 54.9 / 70.5 / 82.1 | 56.9 / 72.9 / 84.1 | 55.7 / 72.5 / 84.4 | 54.5 / 70.4 / 83.1 | 55.3 / 71.0 / 82.6 | ||
loma-r | MegaDepth-1500, every 5th pair, relative pose AUC@5 / @10 / @20 degrees | 57.1 / 72.6 / 84.1 | 54.1 / 70.6 / 82.9 | 56.6 / 72.1 / 83.3 | 56.9 / 72.4 / 83.6 | 54.7 / 70.7 / 83.1 |
Measured on portable: NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks 32e2e81e9 / 3e1db914b7468c48e59db7f2461bc37e582be1da / 4475282a / ba3a401e / c4a792fe, 2026-11-18 to 2026-11-25; portable32: NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks 32e2e81e9, 2026-11-20; kernels: NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks 379b86e4b / 3e1db914b7468c48e59db7f2461bc37e582be1da / 8630e98f1 / cb6c4aae6, 2026-11-20 to 2026-11-25; tensorrt: NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks 4475282a / ba3a401e / c4a792fe, 2026-11-18.
Parity
CPU, float32: max |diff| <= 0.011 vs the original. GPU, portable bfloat16 and kernels float16 (the defaults): mean |diff| <= 0.05 and p99 <= 0.6 (absolute error of the output keypoints1).
| variant | kernels error vs original, mean / p99 | GPU, torch | kernels used |
|---|---|---|---|
loma-b | 0.00655 / 0.3415 | RTX 5060 Ti, torch 2.14.1+cu130 | cudnn_hacc@cudnn92400, cutlass_conv@988138e042cb:sm_120, igev@f075827d68c6:sm_120, loma_descriptor@a249ce2993af:sm_120 |
loma-b64 | 0.00728 / 0.37323 | RTX 5060 Ti, torch 2.14.1+cu130 | cudnn_hacc@cudnn92400, cutlass_conv@988138e042cb:sm_120, igev@f075827d68c6:sm_120, loma_descriptor@a249ce2993af:sm_120 |
loma-b128 | 0.00655 / 0.3415 | RTX 5060 Ti, torch 2.14.1+cu130 | cudnn_hacc@cudnn92400, cutlass_conv@988138e042cb:sm_120, igev@f075827d68c6:sm_120, loma_descriptor@a249ce2993af:sm_120 |
loma-l | 0.00655 / 0.3415 | RTX 5060 Ti, torch 2.14.1+cu130 | cudnn_hacc@cudnn92400, cutlass_conv@988138e042cb:sm_120, igev@f075827d68c6:sm_120, loma_descriptor@a249ce2993af:sm_120 |
loma-g | 0.00655 / 0.3415 | RTX 5060 Ti, torch 2.14.1+cu130 | cudnn_hacc@cudnn92400, cutlass_conv@988138e042cb:sm_120, igev@f075827d68c6:sm_120, loma_descriptor@a249ce2993af:sm_120 |
loma-r | 0.00655 / 0.3415 | RTX 5060 Ti, torch 2.14.1+cu130 | cudnn_hacc@cudnn92400, cutlass_conv@988138e042cb:sm_120, igev@f075827d68c6:sm_120, loma_descriptor@a249ce2993af:sm_120 |
Limitations
- The standalone B and L BF16 TensorRT engines at 768 x 1024 were compared on ten shifted photos. Minimum match precision within 2 px was 96.62% for B and 95.46% for L.
- For LoMa-B at 768 x 1024 BF16, export ONNX and build TensorRT in a fresh process. On the first 50 calibrated MegaDepth pairs, AUC@5 was 64.16 portable, 62.97 with the separately built plan, and 54.30 with the bundled TensorRT export.
- Sparse output: no dense warp.
result.matches()gives the matched points forestimate_pose;pairsare the index pairs pycolmap / COLMAP databases take. - One image pair per call internally (batches run pair by pair); the match counts differ per pair.
- The match count depends on the image pair. The fixed 768 x 1024 LoMa-B64 TensorRT export returns variable-length matches. On ten photos paired with shifted copies, at least 96.7% of TensorRT correspondences agreed with portable within 2 pixels in both images.
- Two resizes per image as upstream: the detector sees a long side of
long_side(aspect kept), the descriptor asizexsizesquare whatever the aspect ratio. - LoMa-R uses rotation augmentation. The other variants are trained for upright images.
Example output
No example rendered for this checkpoint yet.