TrafficLoc: Localizing Traffic Surveillance Cameras in 3D Scenes

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

TL;DR

TrafficLoc is a novel coarse-to-fine framework designed to precisely localize roadside traffic surveillance cameras within 3D point cloud maps. By introducing geometry-guided attention and enhanced contrastive learning, it overcomes the massive viewpoint discrepancies typical of traffic intersections, outperforming previous state-of-the-art methods by up to 86% on challenging benchmarks.

What Problem Does This Paper Address?

For "cooperative perception" to work—where roadside sensors and autonomous vehicles share data—we need to know exactly where every sensor is. Specifically, we need the 6-DoF pose (3D position and orientation) of traffic surveillance cameras relative to a 3D reference map (usually a LiDAR point cloud).

This is a difficult Image-to-Point cloud (I2P) registration problem. Most existing I2P methods were designed for in-vehicle cameras, where the camera and LiDAR are roughly at the same height and orientation. Traffic cameras, however, are mounted high up and look down at intersections from angles that vary wildly from the original mapping LiDAR. This "viewpoint gap" causes standard feature-matching algorithms to fail, as the same physical object looks completely different across modalities.

Methods

TrafficLoc adopts a coarse-to-fine strategy to bridge this gap, as illustrated in the pipeline overview:

Figure 2. Pipeline of our TrafficLoc. Given a traffic camera image and a 3D scene point cloud collected at different locations, we first extract features at the point group level and image patch level, respectively. We then fuse them using a Geometry-guided Feature Fusion (GFF) module and match them based on similarity rules. Furthermore, we perform fine matching between the point group center and the extracted image window with a soft-argmax operation. Finally, we use EPnP-RANSAC [13, 24] algorithm to get the final camera pose based on the predicted 2D-3D correspondences.

The authors introduce three key technical innovations:

  1. Geometry-guided Feature Fusion (GFF) & Attention Loss (GAL): Standard Transformers often struggle to find correspondences when viewpoints differ significantly. TrafficLoc uses a Geometry-guided Attention Loss during training. By leveraging the known camera projection geometry, it forces the cross-modal attention layers to focus only on regions that should geometrically correspond.
  2. Inter-intra Contrastive Learning (ICL): Typical contrastive learning only tries to match an image patch to its corresponding 3D point group (inter-modal). ICL goes further by also pushing apart different image patches and different point groups (intra-modal). This makes the features more distinct and easier to match.
  3. Dense Training Alignment (DTA): Instead of supervising only a few sparse pairs, DTA uses a soft-argmax operator to back-propagate gradients across all image patches simultaneously. This results in much sharper and more accurate similarity maps.

Datasets

The researchers found that existing datasets like KITTI and NuScenes lack the complex intersection scenarios needed for traffic camera research. To solve this, they introduced:

  • Carla Intersection: A new large-scale simulated dataset created in the CARLA simulator, featuring 75 urban and rural intersections with diverse camera heights and angles.

They also evaluated their model on:

  • USTC Intersection: A real-world dataset used to test "Sim2Real" generalization.
  • KITTI & NuScenes: Standard in-vehicle benchmarks to demonstrate the model's versatility.

Key Insights and Ideas

  • Geometry as a Prior: The "aha moment" here is that we don't have to let the Transformer learn everything from scratch. By supervising the attention map with geometric constraints (GAL), the model learns to "look" in the right places even when the visual features are distorted by perspective.
  • Intra-modal Distinctiveness: Most I2P research focuses on the "cross-modal gap." This paper highlights that if your features aren't distinct within their own modality (e.g., two different patches of road looking identical), you'll never achieve a clean match across modalities.
  • Dense vs. Sparse Supervision: Moving from sparse point-matching to dense alignment (DTA) significantly reduces "ghosting" or multiple peaks in the similarity maps, as shown in the visualization below:
Visualization of similarity maps with and without ICL/DTA

Key Results

TrafficLoc sets a new bar for localization accuracy:

  • Carla Intersection: It reduced the Relative Rotation Error (RRE) by 85-86% and the Relative Translation Error (RTE) by 64-82% compared to the previous best method (CoFiI2P).
  • Generalization: Even when trained only on synthetic data, it successfully localized cameras in the real-world USTC dataset, showing strong Sim2Real performance.
  • In-Vehicle SOTA: On the KITTI dataset, it achieved an RRE of 0.87° and an RTE of 0.19m, outperforming all existing in-vehicle localization methods.
Figure 1. Localization accuracy on the proposed Carla Intersection and KITTI dataset. The point cloud is projected into a 2D view and shown above the image, with point colors indicating distance. The proposed TrafficLoc achieves better performance, with more correct (green) and fewer incorrect (red) point-to-pixel pairs. The first column presents the input point cloud and input image.

Limitations and Future Work

While TrafficLoc is highly robust, it still relies on an initial estimate of camera intrinsics (focal length). The authors show that using tools like DUSt3R can help estimate these, but there is still a performance drop compared to using ground-truth intrinsics.

Future work could involve end-to-end joint estimation of both intrinsics and extrinsics in a single pass, or further improving the model's robustness to extreme weather conditions and dynamic occlusions (like large trucks blocking the view) which are common at real-world intersections.

Summary updated

Abstract

We tackle the problem of localizing traffic cameras within a 3D reference map and propose a novel image-to-point cloud registration (I2P) method, TrafficLoc, in a coarse-tofine matching fashion. To overcome the lack of large-scale real-world intersection datasets, we first introduce Carla Intersection, a new simulated dataset with 75 urban and rural intersections in Carla. We find that current I2P methods struggle with cross-modal matching under large viewpoint differences, especially at traffic intersections. TrafficLoc thus employs a novel Geometry-guided Attention Loss (GAL) to focus only on the corresponding geometric regions under different viewpoints during 2D-3D feature fusion. To address feature inconsistency in paired image patch-point groups, we further propose Inter-intra Contrastive Learning (ICL) to enhance separating 2D patch/3D group features within each intra-modality and introduce Dense Training Alignment (DTA) with soft-argmax for improving position regression. Extensive experiments show our TrafficLoc greatly improves the performance over the SOTA I2P methods (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 the superiority 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 F. Henriques and Daniel Cremers},
  title = {{TrafficLoc: Localizing Traffic Surveillance Cameras in 3D Scenes}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2025},
}
Figure