Abstract
Visual localization is a fundamental task in robotics and augmented reality, requiring precise 6-DoF camera pose estimation. While Scene Coordinate Regression (SCR) has shown promise, it often suffers from noise due to dense, per-pixel predictions. VS-Net introduces a "voting-by-segmentation" approach that identifies a sparse set of high-accuracy, scene-specific landmarks. By combining a dual-branch architecture with a memory-efficient prototype-based triplet loss, VS-Net achieves state-of-the-art performance on both indoor and outdoor benchmarks while significantly reducing computational overhead.
Introduction: From Dense Noise to Sparse Precision
Determining the exact position and orientation of a camera within a known environment is a cornerstone of modern spatial computing. Current state-of-the-art methods typically fall into two categories: feature-based methods (e.g., SfM) which match local descriptors to 3D maps, and Scene Coordinate Regression (SCR) which uses neural networks to predict 3D coordinates for every pixel.
SCR methods are powerful but face a significant "quality control" challenge. By attempting to estimate coordinates for every pixel—including those on dynamic objects, reflective surfaces, or featureless regions—they introduce substantial noise into the pose estimation process. VS-Net addresses this by shifting the paradigm from dense, noisy estimation to sparse, precise landmark identification.
Methodology
The VS-Net framework operates through a multi-stage pipeline designed for robustness and efficiency.
Landmark Generation
The process begins with the pre-processing of a scene's 3D map. Using a "Supervoxel" algorithm, the 3D surfaces are over-segmented into thousands of small mosaic patches. The geometric center of each patch is designated as a scene-specific landmark. This discretization allows the network to focus on stable, recognizable structures rather than arbitrary points in space.
The VS-Net Architecture
The core of the system is a neural network with a shared encoder and two specialized decoder branches:
- Segmentation Branch: This branch classifies each pixel in the query image into one of the thousands of pre-defined landmark patches.
- Landmark Location Voting Branch: Each pixel predicts a 2D directional vector pointing toward the center of its assigned landmark.
To determine the final 2D location of a landmark, the system aggregates the directional "votes" from all pixels assigned to that landmark's ID. Using RANSAC and iterative refinement, the system identifies the intersection point of these vectors, creating a robust 2D-3D correspondence even in the presence of partial occlusions.
Prototype-based Triplet Loss
Training a segmentation network with thousands of classes (landmarks) typically requires a massive classification layer, leading to prohibitive memory costs. VS-Net overcomes this using a prototype-based triplet loss. Instead of a static weight matrix, the model maintains "prototypes" (embeddings) for each landmark. During training, online hard negative mining (kNN) identifies the most confusing landmarks, and the network is trained to pull pixel embeddings toward the correct prototype while pushing them away from hard negatives. This approach reduced memory consumption from 5.7 GB to just 1.17 MB for a 5,000-class problem.
Experimental Results
VS-Net was evaluated on two gold-standard benchmarks: Microsoft 7-Scenes (indoor) and Cambridge Landmarks (outdoor).
- Indoor Accuracy: On the 7-Scenes dataset, VS-Net achieved a median error of 2.4cm / 0.8°, outperforming previous leaders like HSC-Net (2.7cm / 1.0°).
- Outdoor Robustness: The model showed significant improvements on the Cambridge Landmarks dataset, particularly in the "Great Court" scene, a location where many traditional SCR methods fail due to repetitive textures and scale.
- Efficiency: The prototype-based loss function proved to be approximately 1,400x more memory-efficient than standard cross-entropy, enabling training on standard consumer hardware.
Conclusion
VS-Net demonstrates that "less is more" in visual localization. By focusing on a sparse set of high-quality landmarks and employing a robust voting mechanism, the framework achieves superior accuracy and resilience compared to dense regression methods. While the model remains scene-specific, its efficiency and performance set a new standard for the field. Future research may explore incorporating temporal data from video sequences to further enhance landmark stability across varying scales and lighting conditions.
Summary updated