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:
- Redundancy: A typical road image contains only a few lanes, making thousands of anchors computationally wasteful.
- Dataset Dependency: Anchors are often "hard-coded" based on training set statistics, limiting adaptability to new camera setups.
- Lack of Adaptivity: Fixed anchors do not adjust to the specific geometry of the current scene.
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.
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:
- 3D Extension: Extending the sparse query mechanism to 3D space is critical for path planning in undulating terrain.
- Temporal Consistency: Integrating video-based temporal information could further stabilize queries in high-speed or high-noise scenarios.
Summary updated