FlexGlue: Sparse-to-Dense Feature Matching and Visual Disambiguation
Organizations: ETH Zurich · Google · Microsoft Spatial AI Lab
Abstract
To estimate correspondences across images, existing approaches match either sparse interest points, which is highly efficient but limited by repeatability, or dense pixel grids, which is robust but expensive. Furthermore, these approaches are trained with only matching pairs and thus often fail to reject unrelated pairs that exhibit visual symmetries, which is equally important in applications like Structure-from-Motion (SfM). We bridge these gaps by introducing FlexGlue, a neural network for asymmetric sparse-to-dense matching and disambiguation. Given two images and coordinates of points in the first image, FlexGlue estimates the coordinates of the corresponding points in the second image while simultaneously rejecting the pair if non-matching. By searching for a limited set of correspondences among dense pixels, our approach is both fast and effective at both matching and disambiguation: it combines the sub-pixel accuracy of dense matching with the speed of sparse matching, while rejecting incorrect pairs with high precision. Experiments on multiple datasets show that FlexGlue pushes the Pareto frontier in relative pose estimation and significantly outperforms existing approaches for SfM and visual localization. FlexGlue is publicly available at https://github.com/cvg/flexglue .
Figures & tables
| Detector | Matching | MegaDepth-1500 | ScanNet-1500 | HardMatch | Extr. | Match | ||||||
| mAA@10px | [ms] | [ms] | ||||||||||
| ALIKED | LightGlue | 52.4 | 68.8 | 81.0 | 17.0 | 34.2 | 51.3 | 36.3 | 36.0 | 21.7 | ||
| DaD | LoMa-G | 56.1 | 72.2 | 84.0 | 29.3 | 51.7 | 70.0 | 54.3 | 128.5 | 49.8 | ||
| Sparse | 4096 kp. | SuperPoint | Ours | 53.8 | 70.0 | 82.0 | 31.9 | 54.8 | 72.6 | 55.7 | 33.1 | 29.6 |
| - | RoMa | 62.6 | 76.7 | 86.3 | 31.8 | 53.4 | 70.9 | 48.1 | 49.4 | 239.5 | ||
| - | MASt3R | 54.5 | 71.9 | 84.0 | 34.0 | 57.0 | 74.4 | 33.5 | 51.1 | 747.2 | ||
| Ground–Ground | Ground–Aerial | Aerial–Aerial | ||||||||||
| Method | HPatches | WxBS | RUBIK | IMC22 | TerraSky3D | EarthMatch | SatAst | |||||
| 3px | 5px | 10px | mAA@10px | succ. | mAA | % loc. | 10px | |||||
| ALIKED+LG | 66.2 | 76.9 | 86.3 | 43.9 | 52.8 | 59.1 | 39.0 | 79.2 | 25.3 | 29.4 | 84.0 | 18.4 |
| LoMa-G | 66.4 | 77.5 | 87.3 | 73.4 | 73.1 | 79.8 | 47.6 | 89.8 | 53.4 | 61.6 | 98.0 | 24.4 |
| LoMa-R | 66.8 | 77.9 | 87.7 | 65.5 | 68.6 | 75.9 | 45.1 | 86.3 | 44.2 | 51.7 | 99.6 | 48.3 |
| RoMav2 | 72.2 | 81.2 | 89.2 | 64.8 | 78.4 | 86.2 | 59.5 | 84.7 | 53.9 | 62.9 | 92.2 | 38.1 |
| Method | Labelled data | DG | ViSym-F | LaMAR | Time | |||
| AUROC | AP | AUROC | AP | AUROC | AP | [ms] | ||
| DG ( Cai et al., 2023 ) | DG | 94.4 | 95.4 | 66.2 | 74.1 | 69.5 | 69.8 | 139.5 |
| DG++ ( Xiangli et al., 2025 ) | DG | 98.1 | 98.0 | 86.4 | 90.9 | 78.6 | 79.4 | 124.7 |
| DG++ ( Xiangli et al., 2025 ) | DG + ViSym | 98.1 | 98.1 | 88.3 | 90.7 | 73.3 | 75.3 | 124.7 |
| Ours | matching | 97.0 | 97.1 | 95.3 | 96.5 | 88.5 | 89.0 | 28.7 |
| Ours | DG + matching | 98.4 | 98.2 | 95.9 | 96.8 | 88.8 | 89.2 | 28.7 |
Appendix figures & tables14 assets
Supplementary material from the paper’s appendix.
Appendix
| Keypoints | ETH3D SfM | IMC2025 | HardMatch | |||
| score | mAA | |||||
| SuperPoint | 68.9 | 86.8 | 92.3 | 95.3 | 66.6 | 55.5 |
| DaD | 70.1 | 86.9 | 91.0 | 94.5 | 65.7 | 55.3 |
| RaCo | 71.7 | 88.1 | 92.5 | 95.4 | 66.6 | 54.9 |
| Original label | Pairs | Unchanged | Flipped | Unsure |
| Positive | 1590 | 1500 | 57 | 33 |
| Negative | 1590 | 1154 | 418 | 18 |
| Total | 3180 | 2654 | 475 | 51 |
| Kept | 1184 | 946 | 238 | 0 |
| Dataset | Type | #Scenes | Weight |
| MegaDepth ( Li & Snavely, 2018 ) | outdoor, real | 152 | 0.17 |
| AerialMegaDepth ( Vuong et al., 2025 ) | aerial–ground, rendered | 113 | 0.17 |
| BlendedMVS ( Yao et al., 2020 ) | objects & scenes, rendered | 493 | 0.15 |
| ScanNet++ ( Yeshwanth et al., 2023 ) | indoor, real | 827 | 0.15 |
| Hypersim ( Roberts et al., 2021 ) | indoor, synthetic | 399 | 0.10 |
| Map-free ( Arnold et al., 2022 ) | outdoor, real | 460 | 0.10 |
Image Matching
Image matching finds corresponding points, regions, or objects across images despite changes in viewpoint, scale, lighting, or sensor.
See all 87 papers