cvg/LightGlue sits at 4.9k stars on GitHub, written primarily in Python. LightGlue: Local Feature Matching at Light Speed (ICCV 2023)
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
LightGlue ⚡️ Local Feature Matching at Light Speed
Philipp Lindenberger
·
Paul-Edouard Sarlin
·
Marc Pollefeys
ICCV 2023
Paper |
Colab |
🤗 Demo |
Poster |
⚙️ Train your own
LightGlue is a deep neural network that matches sparse local features across image pairs. An adaptive mechanism makes it fast for easy pairs (top) and reduces the computational complexity for difficult ones (bottom).
This repository hosts the inference code of LightGlue, a lightweight feature matcher with high accuracy and blazing fast inference. It takes as input a set of keypoints and descriptors for each image and returns the indices of corresponding points. The architecture is based on adaptive pruning techniques, in both network width and depth - check out the paper for more details.
We release pretrained weights of LightGlue with SuperPoint, DISK, ALIKED and SIFT local features.
The training and evaluation code can be found in our library glue-factory.
LightGlue is now part of 🤗 Hugging Face Transformers (credit to @sbucaille!). It enables easy inference in a few lines of Python code, using pip install transformers (model card).
LightGlue can adjust its depth (number of layers) and width (number of keypoints) per image pair, with a marginal impact on accuracy.
Advanced configuration
[Detail of all parameters - click to expand]
n_layers: Number of stacked self+cross attention layers. Reduce this value for faster inference at the cost of accuracy (continuous red line in the plot above). Default: 9 (all layers).
flash: Enable FlashAttention. Significantly increases the speed and reduces the memory consumption without any impact on accuracy. Default: True (LightGlue automatically detects if FlashAttention is available).
For inputs with fewer than 1536 keypoints (determined experimentally), this compiles LightGlue but disables point pruning (large overhead). For larger input sizes, it automatically falls backs to eager mode with point pruning. Adaptive depths is supported for any input size.
Benchmark
Benchmark results on GPU (RTX 3080). With compilation and adaptivity, LightGlue runs at 150 FPS @ 1024 keypoints and 50 FPS @ 4096 keypoints per image. This is a 4-10x speedup over SuperGlue.
Benchmark results on CPU (Intel i7 10700K). LightGlue runs at 20 FPS @ 512 keypoints.
Obtain the same plots for your setup using our benchmark script:
Note: Point pruning introduces an overhead that sometimes outweighs its benefits.
Point pruning is thus enabled only when the there are more than N keypoints in an image, where N is hardware-dependent.
We provide defaults optimized for current hardware (RTX 30xx GPUs).
We suggest running the benchmark script and adjusting the thresholds for your hardware by updating LightGlue.pruning_keypoint_thresholds['cuda'].
Training and evaluation
With Glue Factory, you can train LightGlue with your own local features, on your own dataset!
You can also evaluate it and other baselines on standard benchmarks like HPatches and MegaDepth.
Other links
hloc - the visual localization toolbox: run LightGlue for Structure-from-Motion and visual localization.
LightGlue-ONNX: export LightGlue to the Open Neural Network Exchange (ONNX) format with support for TensorRT and OpenVINO.
Image Matching WebUI: a web GUI to easily compare different matchers, including LightGlue.
kornia now exposes LightGlue via the interfaces LightGlue and LightGlueMatcher.
BibTeX citation
If you use any ideas from the paper or code from this repo, please consider citing:
@inproceedings{lindenberger2023lightglue,
author = {Philipp Lindenberger and
Paul-Edouard Sarlin and
Marc Pollefeys},
title = {{LightGlue: Local Feature Matching at Light Speed}},
booktitle = {ICCV},
year = {2023}
}
License
The pre-trained weights of LightGlue and the code provided in this repository are released under the Apache-2.0 license. DISK follows this license as well but SuperPoint follows a different, restrictive license (this includes its pre-trained weights and its inference file). ALIKED was published under a BSD-3-Clause license.
No homepage URL was recorded for cvg/LightGlue in TopGit's last sync. The README tab above frequently contains screenshots and demo links, or check the repository description on GitHub.
How does cvg/LightGlue compare to other AI Tools projects?
cvg/LightGlue is tracked by TopGit in the AI Tools category, with 4.9k GitHub stars and written in Python. Browse the AI Tools topic page on TopGit to compare it against similar projects by stars and activity.
How many stars does cvg/LightGlue have?
cvg/LightGlue has 4.9k GitHub stars — refresh the page for the live number, or check github.com/cvg/LightGlue. TopGit mirrors GitHub's count but does not claim minute-by-minute accuracy.
Is cvg/LightGlue open source?
Yes — cvg/LightGlue ships under the Apache-2.0 license, which makes its source code freely readable (and, depending on license terms, forkable and reusable). Source: github.com/cvg/LightGlue.
What else is in the AI Tools space?
cvg/LightGlue is tracked by TopGit under the AI Tools category, alongside 4 GitHub-tagged topics. Trending and Topics pages list peer repositories of comparable stars and language.
What is cvg/LightGlue?
cvg/LightGlue (cvg/LightGlue) is a Python project on GitHub. From the project's own README: LightGlue: Local Feature Matching at Light Speed (ICCV 2023)
Where do I read more about cvg/LightGlue?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/cvg/LightGlue is the definitive source.
Read full README in the tab above.
Is LightGlue worth your time?
ChatGPT, Claude and Perplexity can all read this page. Ask one of them what it makes of LightGlue.