[Paper Review] LightGlue: Local Feature Matching at Light Speed
LightGlue is a fast, adaptive deep matcher for sparse local feature correspondences that outperforms prior sparse matchers while approaching dense matcher accuracy, with an early-stopping mechanism and point pruning to save computation.
We introduce LightGlue, a deep neural network that learns to match local features across images. We revisit multiple design decisions of SuperGlue, the state of the art in sparse matching, and derive simple but effective improvements. Cumulatively, they make LightGlue more efficient - in terms of both memory and computation, more accurate, and much easier to train. One key property is that LightGlue is adaptive to the difficulty of the problem: the inference is much faster on image pairs that are intuitively easy to match, for example because of a larger visual overlap or limited appearance change. This opens up exciting prospects for deploying deep matchers in latency-sensitive applications like 3D reconstruction. The code and trained models are publicly available at https://github.com/cvg/LightGlue.
Motivation & Objective
- Motivate efficient, accurate sparse local feature matching for image pairs under challenging conditions.
- Improve training stability and speed relative to prior Transformer-based matchers (notably SuperGlue).
- Develop an adaptive, depth- and width-aware architecture that exits early on easy pairs and prunes unhelpful points.
- Decouple similarity and matchability to enable efficient, per-layer supervision and faster inference.
Proposed method
- Use a stack of L identical layers with self- and cross-attention to update per-point states for two images.
- Employ a rotary 2D relative positional encoding in self-attention to preserve relative geometry across layers.
- Compute a lightweight correspondence head that combines per-point matchability scores with a pairwise similarity score to form a soft partial assignment P.
- Introduce an adaptive depth/width mechanism with confidence-based exit criteria and point pruning to reduce computation on easy cases.
- Train in two stages: first synthetic homographies for correspondence prediction, then MegaDepth for real-world refinement; use deep supervision to enable early exits.
- Disentangle matching from a heavy optimal-transport solver (as in Sinkhorn-based methods) by predicting assignments at multiple layers with a lightweight head.
Experimental results
Research questions
- RQ1Can LightGlue reduce inference time while maintaining or improving accuracy for sparse feature matching across a range of difficulties?
- RQ2How do architectural choices (relative positional encoding, bidirectional attention, matchability signaling, and early exiting) impact accuracy, speed, and training stability?
- RQ3Does adaptive depth/width pruning provide practical speedups without sacrificing matching quality in real-world outdoor and indoor datasets?
- RQ4How does LightGlue compare to SuperGlue and dense matchers in downstream tasks like homography estimation, relative pose, and visual localization?
- RQ5Is decoupling matchability from similarity beneficial for training dynamics and final performance?
Key findings
- LightGlue achieves faster inference than prior sparse matchers (notably SuperGlue) with competitive or better accuracy across evaluated tasks.
- Adaptive depth/width pruning and early exit based on confidence substantially reduce runtime, especially on easy image pairs, while preserving accuracy.
- Bidirectional cross-attention and relative 2D rotary positional encoding improve efficiency and accuracy, with full bidirectional attention offering speedups without accuracy loss.
- Disentangling similarity from matchability yields cleaner gradients and enables a faster, per-layer prediction of correspondences, avoiding costly Sinkhorn iterations.
- In homography, LightGlue provides high precision and competitive recall, enabling accurate homography estimation via lightweight solvers; in relative pose, it achieves higher pose accuracy and faster inference than several baselines; in outdoor localization, it matches SuperGlue accuracy with significantly higher throughput (and gains with optimization).
- Training benefits include faster convergence and better recall/precision trade-offs than SuperGlue when pre-trained on synthetic homographies and fine-tuned on MegaDepth.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.