Python package that matches keypoints across image pairs using pretrained LightGlue weights with SuperPoint, DISK, ALIKED, or SIFT features.
Overview
LightGlue is a neural matcher for computer vision pipelines that already extract sparse keypoints and descriptors. Given two sets of features, it returns correspondences between points. The design uses adaptive depth and width so easy pairs use fewer layers or keypoints while harder pairs keep more computation.
The release focuses on inference: install via pip, run demo notebooks, or call a small Python API to match image pairs. Pretrained weights ship for several local feature extractors. Training and benchmark evaluation live in the separate glue-factory project; Hugging Face Transformers also exposes the model for pip-based inference.
Configuration covers layer count, FlashAttention, mixed precision, early stopping, point pruning, and match confidence thresholds. Defaults balance speed and accuracy; you can disable adaptivity to favor accuracy or trim keypoints and thresholds for speed. Optional PyTorch compilation adds more throughput on supported GPUs.
Benchmark notes compare GPU and CPU throughput against SuperGlue-class baselines. kornia exposes LightGlue and LightGlueMatcher interfaces for integration in larger vision stacks.
Key features
- Keypoint descriptor pair matching
- Pretrained SuperPoint DISK ALIKED SIFT pairs
- Adaptive depth and width pruning
- Optional FlashAttention and compilation
- Configurable match confidence thresholds
- Pip install with demo notebook
- Hugging Face Transformers integration
- kornia matcher interfaces
Use cases
- Two-view geometry and pose estimation
- Image pair alignment workflows
- Vision pipelines needing fast feature match
- Research reproduction of ICCV matcher