Abstract
We introduce a novel CNN-based approach for visual localization from a single RGB image that relies on densely matching a set of Objects-of-Interest (OOIs). In this paper, we focus on planar objects which are highly descriptive in an environment, such as paintings in museums or logos and storefronts in malls or airports. For each OOI, we define a reference image for which 3D world coordinates are available. Given a query image, our CNN model detects the OOIs, segments them and finds a dense set of 2D-2D matches between each detected OOI and its corresponding reference image. Given these 2D-2D matches, together with the 3D world coordinates of each reference image, we obtain a set of 2D-3D matches from which solving a Perspective-n-Point problem gives a pose estimate. We show that 2D-3D matches for reference images, as well as OOI annotations can be obtained for all training images from a single instance annotation per OOI by leveraging Structure-from-Motion reconstruction. We introduce a novel synthetic dataset, VirtualGallery, which targets challenges such as varying lighting conditions and different occlusion levels. Our results show that our method achieves high precision and is robust to these challenges. We also experiment using the Baidu localization dataset captured in a shopping mall. Our approach is the first deep regression-based method to scale to such a larger environment.
Introduction
Visual localization—determining the exact 6-DoF pose of a camera—is a fundamental challenge in robotics and augmented reality. Traditional structure-based methods using local features like SIFT are accurate but suffer from high memory consumption and sensitivity to lighting changes. Conversely, deep learning approaches like PoseNet offer speed but often lack the precision required for many applications. Scene-coordinate regression methods (e.g., DSAC) provide high accuracy but typically fail to scale beyond single-room environments.
This paper addresses these limitations by focusing on "Objects-of-Interest" (OOIs). Instead of processing the entire scene, which often includes noise like textureless walls or moving people, the proposed method targets stable, discriminative, planar landmarks. This approach mimics human navigation, which relies on recognizable landmarks rather than every detail of the environment.
Methodology
Pipeline Overview
The localization process begins with a database of OOIs. For each OOI, a reference image with known 3D world coordinates is maintained. When a query image is received, the system detects and segments the OOIs, regresses dense matches to the reference images, and computes the camera pose.
CNN Architecture and Match Regression
The core of the system is a CNN architecture inspired by DensePose and Mask R-CNN. The network uses a backbone with a Feature Pyramid Network (FPN) and RoIAlign to extract features for detected objects. The authors found that regressing 2D matches to a reference image is more stable and accurate than trying to regress 3D scene coordinates directly, as it keeps the coordinate space normalized.
The pipeline consists of four main stages:
- Detection and Segmentation: The model detects predefined OOIs and generates precise segmentation masks.
- Dense Match Regression: For every pixel within a detected OOI, the network regresses its corresponding (u, v) coordinates in the canonical reference image.
- 2D-to-3D Transitivity: Because the 3D world coordinates of the reference images are known (via Structure-from-Motion), these 2D-2D matches are converted into 2D-3D correspondences.
- Pose Estimation: A Perspective-n-Point (PnP) solver with RANSAC uses these correspondences to calculate the final camera pose.
A significant advantage of this method is its weakly-supervised annotation strategy. By leveraging SfM reconstructions, training labels can be automatically propagated from a single manual mask per OOI.
Experimental Evaluation
The method was evaluated on two distinct datasets:
- VirtualGallery: A new synthetic dataset representing an art gallery with 42 paintings. It features challenging variations in lighting, viewpoint, and occlusion levels caused by moving human models.
- Baidu Localization Dataset: A large-scale real-world dataset from a shopping mall (~240m long). It presents challenges like reflective surfaces and high pedestrian traffic, testing the system's scalability.
Results and Discussion
The proposed method demonstrates significant improvements in precision and robustness:
- High Precision: In the VirtualGallery dataset, the method achieved a median error of less than 3cm and 0.5°, outperforming DSAC++ and PoseNet.
- Robustness: The system remains accurate even under 80% occlusion of an OOI or drastic lighting changes. By focusing only on OOIs, the model naturally ignores background clutter.
- Scalability: This is the first deep regression-based method to effectively scale to large environments like the Baidu shopping mall, where previous coordinate regression methods often failed.
Conclusion
This research presents a robust and scalable approach to visual localization by focusing on dense match regression for Objects-of-Interest. While currently restricted to planar objects and dependent on the presence of OOIs in the query image, the method sets a new benchmark for precision in large-scale environments. Future work will explore expanding the system to non-planar 3D objects and implementing automatic OOI discovery to eliminate the need for manual selection.
Summary updated