Introduction
Camera relocalisation—the task of determining the 6-degree-of-freedom (6-DOF) pose of a camera from a single image—is a fundamental challenge in robotics, autonomous driving, and augmented reality. Traditional approaches typically rely on matching local features, such as SIFT, to a pre-existing 3D point cloud. While these methods are highly accurate, they often struggle in environments with low texture or significant lighting variations.
Recent advancements, notably the PoseNet architecture, have demonstrated that Convolutional Neural Networks (CNNs) can regress camera pose directly from raw pixels. However, early iterations of these models utilized a "naive" loss function: a simple weighted sum of position error (in meters) and orientation error (in quaternions). Because these units are fundamentally incomparable, researchers were forced to manually tune a "beta" hyperparameter to balance the two components—a process that is both time-consuming and scene-dependent.
Proposed Geometric Loss Functions
This research introduces principled geometric alternatives to the standard weighted loss, significantly closing the performance gap between deep learning and traditional geometric localization methods. The authors propose two primary innovations:
1. Learning Weighting via Homoscedastic Uncertainty
Rather than relying on a fixed weight, the authors frame pose estimation as a multi-task learning problem where position and orientation are distinct tasks. They introduce a loss function that automatically weights these tasks by estimating their respective "task noise," or homoscedastic uncertainty. This allows the network to dynamically adjust the importance of translation versus rotation during the training process, eliminating the need for manual hyperparameter search.
2. Geometric Reprojection Loss
The second innovation is a reprojection loss that calculates the distance between 3D scene points projected into the 2D image plane using the predicted pose versus the ground truth pose. This approach naturally unifies rotation and translation into a single scalar value (pixels), grounded in the actual geometry of the scene. This formulation inherently balances the pose components without requiring any additional hyperparameters.
Experimental Evaluation
The proposed methods were evaluated using a modified GoogLeNet architecture across three diverse benchmarks: Cambridge Landmarks (outdoor street-scale), 7 Scenes (indoor rooms), and Dubrovnik 6K (small-town scale).
Key Results
The transition to geometric loss functions yielded substantial improvements in localization performance:
- Accuracy Boost: On the Cambridge Landmarks dataset, accuracy improved from 65.0% to 90.3% (measured as the percentage of images localized within 2m and 5°).
- Indoor Precision: In small indoor rooms, the model achieved accuracies between 0.2m and 0.4m, a significant improvement over the original PoseNet.
- Synergy: Training a single model for both position and orientation simultaneously outperformed separate models, suggesting that the features learned for one task benefit the other.
- Efficiency: The model maintains a high inference speed, regressing a 6-DOF pose in approximately 5ms, which is orders of magnitude faster than traditional SIFT-based pipelines.
Discussion and Future Work
The authors observed that the optimal manual weight ($\beta$) in previous studies was essentially an approximation of scene geometry, a relationship that the reprojection loss makes explicit. For optimal training, a "two-step" approach is recommended: initializing with uncertainty-based loss followed by fine-tuning with reprojection loss to avoid local minima.
Despite these gains, challenges remain. The model currently lags behind point-feature methods on datasets with limited training data, such as Dubrovnik 6K. Additionally, the reprojection loss requires a pre-existing 3D model of the scene. Future research may explore leveraging temporal consistency in video sequences to further enhance robustness and accuracy.
Summary updated