TrafficLoc: Localizing Traffic Surveillance Cameras in 3D Scenes

Yan Xia, Yunxiang Lu, Rui Song, Oussema Dhaouadi, João Henriques, Daniel Cremers

TL;DR

This paper introduces TrafficLoc, a novel method for precisely locating traffic surveillance cameras within 3D scene maps. It tackles the challenge of varying viewpoints and limited real-world data by proposing a new simulated dataset, "Carla Intersection," and a robust coarse-to-fine registration pipeline that leverages novel attention mechanisms and contrastive learning techniques.

What Problem Does This Paper Address?

Accurately knowing the 3D position and orientation (6-DoF pose) of traffic cameras is crucial for cooperative perception systems. These systems integrate data from various sensors (like LiDAR and cameras) to enhance situational awareness for applications like obstacle detection and vehicle localization. However, localizing traffic cameras is challenging due to:

  • Viewpoint Discrepancies: Images and 3D point clouds are captured at different times and from vastly different angles, making direct matching difficult.
  • Data Scarcity: Large-scale, real-world datasets specifically featuring traffic intersections are limited.
  • Camera Intrinsic Variations: Traffic cameras often have variable focal lengths, complicating calibration.
  • Cross-Modal Challenges: Effectively fusing information from 2D images and 3D point clouds, especially under significant viewpoint differences, is a persistent issue for existing methods.

Methods

TrafficLoc employs a coarse-to-fine registration pipeline:

  1. Feature Extraction: Dual branches (ResNet for images, PointNet for point clouds) extract initial features. A Vision Transformer (DUSt3R ViT) is used for image features, and a Point Transformer enhances point cloud group features.
  2. Geometry-guided Feature Fusion (GFF): A Transformer-based module fuses image and point cloud features. Crucially, it incorporates a Geometry-guided Attention Loss (GAL). GAL uses camera projection geometry to guide the attention mechanism, forcing it to focus on geometrically relevant regions and improving robustness to viewpoint changes.
  3. Coarse Matching: This stage establishes initial correspondences between image patches and 3D point groups.
  4. Inter-intra Contrastive Learning (ICL): This novel loss function not only pulls corresponding image patch-point group features together but also enforces distinctiveness within each modality (i.e., between different image patches and different point groups). This helps prevent confusion and improves alignment.
  5. Dense Training Alignment (DTA): To address the sparse nature of ICL, DTA uses a soft-argmax operator to back-propagate gradients to all image patches, incorporating more global features.
  6. Fine Matching: This stage refines the correspondences to a pixel-level accuracy.
  7. Pose Estimation: The final 6-DoF pose is estimated using the EPnP-RANSAC algorithm based on the refined correspondences.

Datasets

  • Carla Intersection Dataset (New): A newly introduced simulated dataset comprising 75 urban and rural intersections generated in the CARLA simulator. It includes diverse viewpoints, lighting conditions, and camera setups to specifically address the challenges of traffic camera localization.
  • KITTI Odometry Dataset [14]: Used for evaluating in-vehicle camera localization.
  • NuScenes Dataset [5]: Another benchmark for in-vehicle camera localization.
  • USTC Intersection Dataset [42]: A real-world intersection dataset used to test Sim2Real generalization.

Key Insights and Ideas

  • Geometry is Key for Cross-Modal Fusion: Simply applying standard attention mechanisms between image and point cloud features isn't enough when viewpoints differ significantly. Explicitly guiding the attention with geometric constraints (GAL) is crucial for robust fusion.
  • Intra-Modality Matters for Alignment: Standard contrastive learning often focuses only on inter-modal pairs. The paper shows that enforcing distinctiveness within image features and within point cloud features (ICL) is vital for accurate coarse matching.
  • Dense Supervision for Robustness: Sparse correspondences can lead to missed global features. Using DTA with soft-argmax helps to leverage more information from the entire image for more robust matching.
  • Sim2Real Transfer is Achievable: The model trained on synthetic data (Carla Intersection) demonstrates strong generalization to real-world intersection data (USTC dataset), highlighting the effectiveness of the proposed approach.

Key Results

  • TrafficLoc significantly outperforms state-of-the-art methods on the proposed Carla Intersection dataset, achieving up to an 86% improvement in localization accuracy.
  • It also achieves new state-of-the-art (SOTA) performance on the KITTI Odometry and NuScenes datasets, demonstrating its effectiveness for both traffic and in-vehicle camera localization.
  • Ablation studies confirm the significant contributions of each proposed component: GAL improves robustness to viewpoint changes, ICL enhances coarse matching accuracy, and DTA further refines feature matching.
  • The model achieves high accuracy while maintaining efficient inference times.

Limitations and Future Work

  • Intrinsic Parameter Estimation: While the paper mentions using DUSt3R for intrinsic parameter estimation when ground truth is unavailable, the localization accuracy shows a notable decline compared to using ground-truth focal lengths. Further work could explore more robust intrinsic parameter estimation or end-to-end learning of intrinsics.
  • Computational Cost: While efficient, the Transformer-based architecture and dense operations can still be computationally intensive. Future work might focus on further optimizing the architecture for real-time deployment on resource-constrained platforms.
  • Dataset Diversity: While Carla Intersection is a significant contribution, expanding to more diverse real-world intersection datasets would further validate the model's generalization capabilities.

Summary updated

Abstract

We tackle the problem of localizing the traffic surveillance cameras in cooperative perception. To overcome the lack of large-scale real-world intersection datasets, we introduce Carla Intersection, a new simulated dataset with 75 urban and rural intersections in Carla. Moreover, we introduce a novel neural network, TrafficLoc, localizing traffic cameras within a 3D reference map. TrafficLoc employs a coarse-to-fine matching pipeline. For image-point cloud feature fusion, we propose a novel Geometry-guided Attention Loss to address cross-modal viewpoint inconsistencies. During coarse matching, we propose an Inter-Intra Contrastive Learning to achieve precise alignment while preserving distinctiveness among local intra-features within image patch-point group pairs. Besides, we introduce Dense Training Alignment with a soft-argmax operator to consider additional features when regressing the final position. Extensive experiments show that our TrafficLoc improves the localization accuracy over the state-of-the-art Image-to-point cloud registration methods by a large margin (up to 86%) on Carla Intersection and generalizes well to real-world data. TrafficLoc also achieves new SOTA performance on KITTI and NuScenes datasets, demonstrating strong localization ability across both in-vehicle and traffic cameras. Our project page is publicly available at https://tum-luk.github.io/projects/trafficloc/.
BibTeX
@inproceedings{xia2025trafficloc,
  author = {Yan Xia and Yunxiang Lu and Rui Song and Oussema Dhaouadi and João Henriques and Daniel Cremers},
  title = {{TrafficLoc: Localizing Traffic Surveillance Cameras in 3D Scenes}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2025},
}
Figure