Abstract
Feature matching is a fundamental task in computer vision, yet traditional point-level methods often struggle with extreme viewpoint and illumination changes. We present SAM (Scene-Aware Feature Matching), a hierarchical framework that introduces "scene groups" to guide local feature correspondence. By integrating group-level consistency with point-level matching, SAM achieves state-of-the-art robustness on standard benchmarks without requiring explicit semantic labels.
Introduction: The Challenge of Local Textures
Feature matching—identifying corresponding physical points across different images—is the backbone of computer vision tasks like 3D reconstruction (SfM) and autonomous navigation (SLAM). While deep learning has vastly improved this field, current "gold standard" models primarily operate at the point level. They utilize local textures and global context through attention but often lack a structural understanding of the scene.
When an image undergoes massive lighting shifts or drastic camera movements, local textures become unreliable. Without an understanding of which regions belong together (e.g., "this cluster is the building," "this cluster is the sky"), models often produce "noisy" matches that lead to downstream failures in geometry estimation.
Methodology
SAM introduces a Transformer-based architecture that incorporates group tokens alongside standard image tokens to provide hierarchical guidance.
- Multi-level Feature Initialization: The model extracts local descriptors (image tokens) and uses a Group Token Selection module to pick representative "seeds" from these tokens to act as group centers.
- Attentional Grouping: SAM utilizes a stack of self-attention and cross-attention layers where image tokens and group tokens interact. This allows the group tokens to "perceive" the global scene and the image tokens to understand their group membership.
- Token Grouping Module: This module explicitly assigns image tokens to specific groups using a "straight-through trick," making a non-differentiable argmax operation trainable. This creates a hard assignment of pixels to scene regions.
- Multi-level Score Construction: Instead of just calculating a similarity matrix for points, SAM calculates a group-level score. The final matching score is a weighted sum of point-to-point similarity and group-to-group consistency. If two points belong to different groups, their likelihood of matching is penalized.
Key Insights
- Scene-Awareness as a Filter: Grouping acts as a powerful geometric filter. By forcing the model to decide which "region" a point belongs to, SAM effectively blocks out irrelevant interference from non-corresponding areas.
- Beyond Point-Level Textures: By incorporating group tokens, the model maintains a "big picture" view of the scene even when local textures are washed out by sun glare or motion blur.
- Implicit Supervision: Remarkably, the model does not require manual grouping or segmentation labels. It learns to group regions effectively using only ground-truth match labels.
Experimental Results
SAM consistently outperformed established baselines like SuperGlue and OANet across multiple metrics:
- Homography Estimation: On the R1M dataset, SAM achieved an AUC@10 of 53.80, a significant jump over SuperGlue’s 51.94.
- Pose Estimation: On the YFCC100M dataset, SAM showed a +3.67% improvement in exact AUC at the 10° threshold compared to SuperGlue, demonstrating superior robustness in outdoor environments.
- Image Matching (HPatches): SAM achieved near-perfect Mean Matching Accuracy (MMA) in illumination-change scenes at higher error thresholds, outperforming both detector-based and detector-free methods.
Limitations and Future Work
While SAM is real-time capable, the addition of group tokens increases computational complexity compared to simpler point-level matchers. Currently, the model lacks explicit semantic understanding (e.g., identifying a "car" vs. a "tree") and uses a fixed number of groups. Future iterations may benefit from dynamic grouping that scales with scene complexity and the incorporation of semantic supervision.
Summary updated