3D Scene Geometry-Aware Constraint for Camera Localization with Deep Learning

Mi Tian, Qiong Nie, Hao Shen

Abstract

Camera localization, the estimation of a 6-degree-of-freedom (6DoF) pose from a single image, is a critical component of autonomous navigation. While deep learning-based pose regression offers a simplified alternative to traditional feature-matching pipelines, these models often lack geometric consistency. This paper introduces a framework that incorporates 3D scene geometry as a training constraint. By utilizing photometric and structural similarity (SSIM) losses during training, the model achieves superior accuracy and significantly faster convergence. The resulting system performs efficient single-image inference without requiring depth maps or 3D models at runtime.

Introduction

Precise camera localization is essential for tasks ranging from augmented reality to self-driving cars. Traditional methods typically rely on matching 2D image features to a pre-built 3D map, followed by PnP and RANSAC. While effective, these methods are computationally intensive and sensitive to environmental changes. Recent end-to-end deep learning approaches, such as PoseNet, regress the camera pose directly. However, these models often ignore the underlying geometric relationships of the scene. This research proposes a geometry-aware constraint that regularizes the learning process, bridging the gap between deep learning and classical geometry.

Methodology

The core of the proposed method is a ResNet-50 based architecture that outputs position ($x$) and orientation ($q$). The training phase is augmented with a 3D Scene Geometry-Aware Constraint that uses image pairs to enforce consistency.

The training pipeline (a) incorporates photometric and SSIM losses by warping images based on predicted poses. The network architecture (b) utilizes a ResNet backbone for pose regression.

During training, the network predicts poses for two consecutive frames. Using these poses and a depth map, one frame is warped into the coordinate system of the other. Two key loss functions are applied:

  1. Photometric Loss ($L_P$): Measures the pixel-wise intensity difference between the warped image and the target image.
  2. Structural Similarity (SSIM) Loss ($L_S$): Evaluates the preservation of high-level structural information, providing robustness against local noise.

Importantly, the depth map and geometric constraints are only utilized during the training phase. At inference time, the model operates as a standard pose regressor, requiring only a single RGB image.

Experimental Results

The framework was evaluated on the Microsoft 7-Scene indoor dataset and the Oxford RobotCar outdoor dataset.

Localization Accuracy

On the 7-Scene benchmark, the model consistently outperformed existing methods like LSTM-Pose and VidLoc. For instance, in the "Chess" scene, it achieved a median error of 0.09m and 4.39°. In the large-scale Oxford RobotCar environment, the geometry-aware approach yielded a 36% improvement in localization accuracy over the baseline PoseNet.

Visualization of the predicted camera trajectory (red) compared to the ground truth (green), illustrating the model's ability to recover complex motion paths.

Training Efficiency

A significant advantage of the proposed constraints is the acceleration of training. The model converges in approximately 50 epochs, whereas comparable models like MapNet require up to 300 epochs to achieve similar performance levels. This efficiency is attributed to the geometric "guidance" provided by the auxiliary losses.

Discussion

The research highlights several key insights:

  • Self-Supervision: Training on image pairs allows the network to learn relative motion, which regularizes the absolute pose prediction.
  • Robustness to Sparse Depth: The system remains effective even when training with sparse depth data (down to 20% density), which is common in real-world sensor setups.
  • Generalization: The geometric constraints are architecture-agnostic and consistently improve performance across different backbone networks.

Conclusion

This paper demonstrates that incorporating 3D geometric principles into deep learning architectures significantly enhances camera localization performance. By using geometry as a "teacher" during training, the model achieves high precision and rapid convergence while maintaining the simplicity and speed of end-to-end pose regression during deployment.

Summary updated

BibTeX
@inproceedings{tian2020d,
  author = {Mi Tian and Qiong Nie and Hao Shen},
  title = {{3D Scene Geometry-Aware Constraint for Camera Localization with Deep Learning}},
  booktitle = {IEEE International Conference on Robotics and Automation},
  year = {2020},
  doi = {10.1109/icra40945.2020.9196940},
}
Figure