NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Sparse Laneformer

Ji Liu, Zifeng Zhang, Mingjie Lu, Hongyang Wei, Dong Li, Yile Xie, Jinzhang Peng, Lu Tian, Ashish Sirasao, Emad BarsoumarXiv 2024 · DOI

Abstract

Traditional lane detection methods rely on thousands of fixed, redundant anchors, leading to computational inefficiency and poor adaptability to diverse environments. Sparse Laneformer rethinks this paradigm by utilizing a small set of dynamic, position-aware queries within a two-stage transformer architecture. By incorporating geometric priors through novel attention mechanisms like Horizontal Perceptual Attention (HPA), the model achieves state-of-the-art accuracy on major benchmarks like CULane and TuSimple while significantly reducing computational complexity (MACs).

The Problem: Redundancy in Dense Anchors

Lane detection is a cornerstone of autonomous driving, but traditional "anchor-based" methods are often inefficient. Most current models rely on dense anchors—thousands of predefined lines or rays—to cover every possible lane position. This approach suffers from three major flaws:

  1. Redundancy: A typical road image contains only a few lanes, making thousands of anchors computationally wasteful.
  2. Dataset Dependency: Anchors are often "hard-coded" based on training set statistics, limiting adaptability to new camera setups.
  3. Lack of Adaptivity: Fixed anchors do not adjust to the specific geometry of the current scene.
Comparison of traditional dense anchor strategies (top) versus the proposed sparse and horizontal attention mechanisms (bottom).

The authors ask: Is it possible to design a lane detector that uses only a handful of sparse, learnable, and dynamic anchors?

Methodology: Sparse and Dynamic Transformers

The Sparse Laneformer framework operates on a small set of queries (typically only 20) rather than thousands of anchors. Its architecture is built around several key innovations:

Key Innovations

  • Sparse & Dynamic Anchors: The model uses learnable lane and angle queries to generate dynamic anchors that rotate around specific points, adapting to image content in real-time.
  • Horizontal Perceptual Attention (HPA): Recognizing that lanes are vertical structures defined by horizontal positions, HPA restricts attention to specific horizontal regions, slashing computational costs.
  • Lane-Angle Cross Attention (LACA): This module allows spatial location and orientation queries to communicate, ensuring internal consistency in lane shape prediction.
  • Lane Perceptual Attention (LPA): In the second stage, the model uses deformable cross-attention to fine-tune predictions, focusing on local features around the coarse lanes identified in the first stage.
Sparse Laneformer uses dynamic anchors and local refinement to detect lanes with high precision and minimal redundancy.

Key Insights and Results

The model was evaluated on industry-standard benchmarks including CULane, TuSimple, and LLAMAS. The results yielded several critical insights:

  • Sparsity is Sufficient: 20 dynamic anchors can outperform 1,000+ fixed ones, suggesting the "search space" for lanes is smaller than previously thought if the model is adaptive.
  • Geometric Priors Matter: Baking concepts like rotation and horizontal context into the transformer architecture allows for faster and more accurate learning than vanilla transformers.
  • Efficiency Gains: On the CULane dataset, Sparse Laneformer (ResNet-34) surpassed the previous Laneformer by 3.0% F1 score while requiring only 18.1G MACs (compared to O2SFormer’s 25.1G).

Limitations and Future Work

While Sparse Laneformer excels in 2D detection, the authors identify two primary areas for future development:

  1. 3D Extension: Extending the sparse query mechanism to 3D space is critical for path planning in undulating terrain.
  2. Temporal Consistency: Integrating video-based temporal information could further stabilize queries in high-speed or high-noise scenarios.

Summary updated

BibTeX
@misc{liu2024sparse,
  author = {Ji Liu and Zifeng Zhang and Mingjie Lu and Hongyang Wei and Dong Li and Yile Xie and Jinzhang Peng and Lu Tian and Ashish Sirasao and Emad Barsoum},
  title = {{Sparse Laneformer}},
  year = {2024},
  eprint = {2404.07821},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2404.07821},
}
Figure