OSMLoc: Single Image-Based Visual Localization in OpenStreetMap with Geometric and Semantic Guidances

Youqi Liao, Xieyuanli Chen, Shuhao Kang, Jianping Li, Zhen Dong, Hongchao Fan, Bisheng Yang

Abstract

OpenStreetMap (OSM), a rich and versatile source of volunteered geographic information (VGI), facilitates human self-localization and scene understanding by integrating nearby visual observations with vectorized map data. However, the disparity in modalities and perspectives poses a major challenge for effectively matching camera imagery with compact map representations, thereby limiting the full potential of VGI data in real-world localization applications. Inspired by the fact that the human brain relies on the fusion of geometric and semantic understanding for spatial localization tasks, we propose the OSMLoc in this paper. OSMLoc is a brain-inspired visual localization approach based on first-person-view images against the OSM maps. It integrates semantic and geometric guidance to significantly improve accuracy, robustness, and generalization capability. First, we equip the OSMLoc with the visual foundational model to extract powerful image features. Second, a geometry-guided depth distribution adapter is proposed to bridge the monocular depth estimation and camera-to-BEV transform. Thirdly, the semantic embeddings from the OSM data are utilized as auxiliary guidance for image-to-OSM feature matching. To validate the proposed OSMLoc, we collect a worldwide cross-area and cross-condition (CC) benchmark for extensive evaluation. Experiments on the MGL dataset, CC validation benchmark, and KITTI dataset have demonstrated the superiority of our method.

Introduction

Visual localization—determining a precise pose based on visual observations—is a fundamental requirement for autonomous navigation. While industrial systems often rely on high-definition (HD) maps or dense 3D point clouds, these are costly to maintain and update. OpenStreetMap (OSM) provides a globally available, community-driven alternative. However, localizing a first-person perspective camera image against a top-down 2D vector map presents a significant "Image-to-OSM" (I2O) gap due to discrepancies in perspective and data modality.

Methodology

OSMLoc draws inspiration from the human brain's retrosplenial-hippocampal circuit, which fuses environmental geometry with landmark semantics for navigation. The framework addresses the I2O gap through three key innovations:

  1. Foundation Model Backbone: The system utilizes a frozen DINOv2 encoder (from the Depth Anything model) to extract robust features with an inherent understanding of scene structure.
  2. Geometry-guided BEV Transform: To align the camera view with the map, OSMLoc introduces a Depth Distribution Adapter (DDA). This component uses depth priors from the foundation model to project image features into a Bird’s-Eye-View (BEV), mitigating the ambiguity of monocular depth estimation.
  3. Semantic Alignment: The model is trained to align visual features (e.g., buildings, roads) with OSM semantic labels, ensuring the encoder ignores transient visual noise in favor of persistent map landmarks.
The OSMLoc framework integrates geometric and semantic guidance to achieve 3-DoF localization from a single image and OSM data.

Experimental Evaluation

The model was evaluated across three major benchmarks:

  • MGL (Mapillary Geo-Localization): Over 800k images across 13 cities.
  • KITTI: A standard autonomous driving dataset.
  • CC (Cross-area & Cross-condition) Benchmark: A new benchmark introduced by the authors featuring 7,164 images from four cities (Detroit, Munich, Taipei, and Brisbane) not present in the training set, specifically testing generalization across diverse urban environments.

Results and Discussion

OSMLoc demonstrates significant improvements over the previous state-of-the-art, OrienterNet. On the MGL dataset, it improved 5-meter position recall by over 5%. The performance gains were even more pronounced on the CC Benchmark, where OSMLoc-B improved 5-meter recall in Detroit by 16.77% compared to the baseline.

Performance comparison on the CC benchmark showing OSMLoc's superior position and orientation recall across diverse global cities.

Key insights from the results include:

  • Depth as a Bridge: Relative depth priors are more critical for perspective transformation than absolute metric accuracy.
  • Semantic Universality: Using semantics allows the model to generalize across different architectural styles and lighting conditions.
  • Efficiency: The OSMLoc-S variant achieves approximately 11 FPS on modern hardware, making it suitable for real-time robotics applications.

Conclusion

OSMLoc successfully bridges the gap between first-person imagery and vectorized OSM data by mimicking biological navigation strategies. While challenges remain in repetitive "urban canyons" and sparse environments, the integration of foundation models and semantic guidance provides a robust path forward for global-scale visual localization without the need for expensive HD maps.

Summary updated

Abstract

OpenStreetMap (OSM), a rich and versatile source of volunteered geographic information (VGI), facilitates human self-localization and scene understanding by integrating nearby visual observations with vectorized map data. However, the disparity in modalities and perspectives poses a major challenge for effectively matching camera imagery with compact map representations, thereby limiting the full potential of VGI data in real-world localization applications. Inspired by the fact that the human brain relies on the fusion of geometric and semantic understanding for spatial localization tasks, we propose the OSMLoc in this paper. OSMLoc is a brain-inspired visual localization approach based on first-person-view images against the OSM maps. It integrates semantic and geometric guidance to significantly improve accuracy, robustness, and generalization capability. First, we equip the OSMLoc with the visual foundational model to extract powerful image features. Second, a geometry-guided depth distribution adapter is proposed to bridge the monocular depth estimation and camera-to-BEV transform. Thirdly, the semantic embeddings from the OSM data are utilized as auxiliary guidance for image-to-OSM feature matching. To validate the proposed OSMLoc, we collect a worldwide cross-area and cross-condition (CC) benchmark for extensive evaluation. Experiments on the MGL dataset, CC validation benchmark, and KITTI dataset have demonstrated the superiority of our method. Code, pre-trained models, CC validation benchmark, and additional results are available at: https://github.com/WHU-USI3DV/OSMLoc.
BibTeX
@misc{liao2024osmloc,
  author = {Youqi Liao and Xieyuanli Chen and Shuhao Kang and Jianping Li and Zhen Dong and Hongchao Fan and Bisheng Yang},
  title = {{OSMLoc: Single Image-Based Visual Localization in OpenStreetMap with Geometric and Semantic Guidances}},
  year = {2024},
  eprint = {2411.08665},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2411.08665},
}
Figure