MapTR: Structured Modeling and Learning for Online Vectorized HD Map Construction

Bencheng Liao, Shaoyu Chen, Xinggang Wang, Tianheng Cheng, Qian Zhang, Wenyu Liu, Chang Huang

TL;DR

MapTR is a structured, end-to-end Transformer framework that builds vectorized High-Definition (HD) maps in real-time from multi-camera images. By treating map elements as point sets with "permutation-equivalent" modeling, it eliminates the ambiguity of traditional sequence-based methods, achieving state-of-the-art accuracy and an 8x speedup over previous camera-based approaches.

What Problem Does This Paper Address?

High-definition (HD) maps are the "digital rails" for autonomous vehicles, providing precise information about lane dividers, boundaries, and pedestrian crossings. Traditionally, these maps are built offline using expensive SLAM-based pipelines. Recently, researchers have shifted toward online construction—building the map on the fly using the car's own sensors.

However, existing online methods face a dilemma. Rasterized methods (which produce top-down images) are fast but lack "instance-level" information; they don't know where one lane ends and another begins. Vectorized methods (which produce coordinates) provide the necessary structure but are often slow because they use "auto-regressive" decoders—predicting one point at a time. Furthermore, these methods struggle with "permutation ambiguity": for a simple lane divider, should the model start labeling from the north or the south? This arbitrary choice confuses the learning process and leads to unstable predictions.

Methods

MapTR introduces a "DETR-like" paradigm for map construction, focusing on three core innovations:

  1. Permutation-Equivalent Modeling: Instead of forcing the model to learn a single, fixed sequence of points for a map element, MapTR models each element as a point set with a group of equivalent permutations. For a polyline (like a lane), both forward and backward orderings are treated as equally "correct." For a polygon (like a crossing), any circular shift or reversal is valid. This stabilizes training by removing the penalty for choosing a different but geometrically identical ordering.
  2. Hierarchical Query Embedding: The model uses a two-level query system. Instance queries represent entire map elements (e.g., "Lane #1"), while point queries represent specific locations within that element. These are summed to create hierarchical queries that the Transformer decoder uses to probe Bird's Eye View (BEV) features.
  3. Hierarchical Bipartite Matching: To calculate loss, the model first matches predicted instances to ground-truth instances. Once matched, it performs a second level of matching to find the optimal point-to-point assignment based on the equivalent permutations defined in step one.

The architecture follows an encoder-decoder structure: a backbone extracts image features, a "2D-to-BEV" module transforms them into a top-down view, and the Transformer decoder regresses the final coordinates.

Datasets

The authors evaluated MapTR on the nuScenes dataset, a standard benchmark for autonomous driving. It contains 1,000 driving scenes with full 360-degree camera coverage. The evaluation focused on three primary map elements: pedestrian crossings, lane dividers, and road boundaries.

Key Insights and Ideas

  • Ambiguity is a Bottleneck: The "aha moment" of the paper is realizing that the difficulty in vectorized mapping isn't just the geometry—it's the mathematical representation. By allowing the model to be "order-agnostic" through permutation groups, the authors significantly reduced the training difficulty.
  • Parallelism Wins: By moving away from auto-regressive (point-by-point) prediction to a parallel Transformer decoder, MapTR achieves massive speedups, making it viable for actual deployment on vehicle hardware.
  • Edge Direction Matters: Beyond just point locations, the authors introduced an Edge Direction Loss. This ensures that the lines connecting the points have the correct orientation, which helps the model capture the high-level "flow" of the road.

Key Results

  • Speed: MapTR-nano runs at 25.1 FPS on an NVIDIA RTX 3090, achieving real-time performance. This is 8x faster than the previous state-of-the-art camera-based method (VectorMapNet).
  • Accuracy: Despite the speedup, MapTR-nano achieved a 5.0 higher mAP (mean Average Precision) than its predecessors.
  • Cross-Modality Superiority: Remarkably, MapTR-tiny (a slightly larger version) outperformed existing methods that use both Camera and LiDAR data, despite MapTR using only cameras.
  • Robustness: Qualitative results show the model maintains stable map construction even in challenging conditions like rainy weather or night-time driving.
MapTR Qualitative Results

Limitations and Future Work

While MapTR is a major step forward, some limitations remain:

  • Temporal Consistency: The current version processes frames independently. Integrating temporal information (looking at previous frames) could further stabilize the map and handle occlusions (e.g., when a large truck blocks the camera's view of a lane).
  • Complex Topology: The paper focuses on polylines and polygons. Future work could extend this to more complex road topologies, such as Y-junctions or intricate intersections where lanes merge and split.
  • Downstream Integration: The authors suggest that the next step is integrating MapTR directly with motion prediction and planning modules to see how much the vectorized output improves actual driving behavior.

Summary updated

BibTeX
@inproceedings{liao2023maptr,
  author = {Bencheng Liao and Shaoyu Chen and Xinggang Wang and Tianheng Cheng and Qian Zhang and Wenyu Liu and Chang Huang},
  title = {{MapTR: Structured Modeling and Learning for Online Vectorized HD Map Construction}},
  booktitle = {International Conference on Learning Representations},
  year = {2023},
  url = {https://openreview.net/forum?id=k7p_YAO7yE},
}
Figure