Abstract
NeRFMatch introduces a novel approach to visual localization by utilizing the internal features of Neural Radiance Fields (NeRF) for 2D-3D matching. By treating a pre-trained NeRF as the primary scene representation, the method achieves state-of-the-art results on outdoor benchmarks. This approach offers a compact, interpretable alternative to traditional point-cloud-based or absolute pose regression methods.
Introduction
Visual localization—determining a camera's 6DoF pose—is critical for robotics and augmented reality. Traditional structure-based methods rely on large 3D point clouds, which are storage-intensive. Conversely, implicit methods like Absolute Pose Regression (APR) are compact but often lack accuracy. While NeRFs have excelled in view synthesis, their potential as direct localization engines remained largely untapped. NeRFMatch addresses this by extracting discriminative 3D descriptors directly from NeRF's internal layers to establish 2D-3D correspondences.
Methodology
The NeRFMatch pipeline treats the NeRF as the "source of truth" for the environment, moving beyond its role as a simple data augmenter.
Feature Extraction
Instead of rendering RGB pixels, the system extracts intermediate feature vectors from the NeRF’s 3D encoder. Middle layers are found to be most effective, providing a balance between geometric detail and semantic consistency. This allows the model to use "free" descriptors trained solely for view synthesis to establish precise matches.
Matching Architectures
The authors propose two variants for matching query image features with extracted NeRF features:
- Full NeRFMatch: A transformer-based architecture utilizing self- and cross-attention for coarse-to-fine alignment.
- NeRFMatch-Mini: A lightweight version using a dual-softmax matching function for high-speed applications.
Localization Pipeline
- Retrieval: Coarse pose estimation via image retrieval against a synthetic database rendered by the NeRF.
- Matching: 3D points and features are rendered from the reference pose and matched against the query image using NeRFMatch.
- Solving: A PnP (Perspective-n-Point) solver computes the estimated pose.
- Refinement: The pose is iteratively refined through further matching or photometric loss backpropagation (similar to iNeRF).
Experiments and Results
The method was evaluated on the Cambridge Landmarks (outdoor) and 7-Scenes (indoor) datasets.
Key Findings
- Performance: On the Cambridge Landmarks "Great Court" scene, NeRFMatch achieved a median error of 19.5 cm / 0.1°, outperforming many Scene Coordinate Regression (SCR) and APR methods.
- Efficiency: NeRFMatch-Mini operates in just 37ms with a small 42.8 MB footprint, making it suitable for resource-constrained environments.
- Cross-Scene Generalization: The transformer-based matching function learns a general ability to align features, allowing it to be trained on multiple scenes simultaneously.
Discussion and Limitations
While highly effective outdoors, performance on the indoor 7-Scenes dataset was limited by the quality of NeRF reconstructions in texture-less areas. Furthermore, while matching is fast, the rendering overhead of NeRF (approx. 141ms for 3,600 points) remains a bottleneck. Future work may involve integrating faster NeRF backends like Instant-NGP or Gaussian Splatting to enhance real-time performance.
Conclusion
NeRFMatch successfully demonstrates that NeRFs can serve as robust localization engines. By leveraging internal neural features for matching, it provides a path toward more compact and versatile spatial AI systems that unify reconstruction and localization.
Summary updated