kornia/lightglue

Pretrained weights for LightGlue (Local Feature Matching at Light Speed), used by kornia.feature.LightGlue.

LightGlue is a sparse feature matcher built as a pruned transformer that early-exits unpromising keypoint pairs at each layer, achieving near-SuperGlue accuracy at a fraction of the latency. ICCV 2023.

Original repo: cvg/LightGlue

Weights

File Descriptor
superpoint_lightglue.pth SuperPoint
disk_lightglue.pth DISK
aliked_lightglue.pth ALIKED
raco_aliked_lightglue.pth RaCo-ALIKED
sift_lightglue.pth SIFT
doghardnet_lightglue.pth DoG-AffNet-HardNet
keynet_affnet_hardnet_lightglue.pth Key.Net-AffNet-HardNet
dedodeb_lightglue.pth DeDoDe-B
dedodeg_lightglue.pth DeDoDe-G
xfeat-lighterglue.pt XFeat (LighterGlue)

Citation

@article{LightGlue2023,
    author  = {Philipp Lindenberger and Paul-Edouard Sarlin and Marc Pollefeys},
    title   = {{LightGlue}: Local Feature Matching at Light Speed},
    journal = {ICCV},
    year    = {2023}
}

ONNX / TensorRT exports for vision-rt

Alongside the PyTorch checkpoints above, this repo holds the LightGlue+ matcher for RaCo-ALIKED features as a standalone ONNX graph plus prebuilt TensorRT engines, used by vision-rt's vrt-lightglue crate. These are the ONNX/TensorRT form of raco_aliked_lightglue.pth — not a new set of weights.

normalized_keypoints (2P,1,K,2)   f32   long-edge normalised
descriptors          (2P,1,K,128) f32   L2-normalised
  -> matches0 (P,K) i32   index into image 1, or -1 if unmatched
  -> mscores0 (P,K) f32   match confidence in [0,1]

The matching extractor half lives in kornia/raco-aliked; both halves must come from the same kN export, since K is baked into each.

Why a split graph. Upstream (fabio-sim/LightGlue-ONNX) publishes only a fused extractor+matcher graph, which can match only the two images handed to it in a single forward pass. Splitting the matcher out means descriptors extracted at any time — from a map, a relocalization database, a keyframe store — can be matched against a live frame. Cutting upstream of LightGlue's NonZero compaction also removes the graph's only data-dependent shapes and its int64 output.

Matching cost is O(K²), so unlike the extractor it gets rapidly worse with K. On a Jetson Orin Nano (MAXN_SUPER, TRT 10.3.0.30, fp16, one pair): 7.9 ms at k512, 21.6 ms at k1024, 126.5 ms at k3072. Extraction moves the other way (the RaCo ranker is bypassed at K≥3072), so pick k512 if you match every frame and k3072 if extraction dominates.

Engines are machine-locked to the exact TensorRT version and GPU architecture they were built for (trt10.3.0.30, sm87 — JetPack 6 on Orin), and to the shape profile they were built at. Elsewhere, build from the ONNX; vrt-hub does it automatically.

Licences. The ONNX/engine files are derived works combining LightGlue (Apache-2.0), RaCo (Apache-2.0) and ALIKED (BSD-3-Clause) weights. BSD-3-Clause requires its attribution to be reproduced in redistributions in binary form, which these files are — see LICENSE-NOTICE.md. That notice is absent from the upstream export repo and is reproduced deliberately.

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