Lane Detection using HW-Transformer
HWLane: Transformer-based Lane Detection for Autonomous Driving
Research Overview
This project presents HWLane, a novel transformer-based approach for lane detection in autonomous driving. The model leverages self-attention mechanisms across both row and column dimensions to capture complex spatial relationships in road scenes.
By combining horizontal and vertical attention patterns, HWLane achieves superior performance in detecting lane boundaries under various challenging conditions including occlusions, shadows, and varying lighting.
Key Features
- •HW-Transformer: Dual-axis self-attention mechanism
- •Robust Detection: Handles occlusions and shadows
- •Real-time Performance: Optimized for autonomous systems
- •Improved Accuracy: State-of-the-art results on benchmarks
Datasets Used
TuSimple
Preprocessed dataset with 6,408 training images and 2,550 test images
Resolution
1280 × 720 pixels with high-quality lane annotations
Augmentation
Data augmentation techniques applied for robustness
Model & Results
Performance metrics and architecture comparison
Model Architecture
Baseline: Tiny U-Net
Lightweight encoder-decoder with skip connections
Improved: HW-Transformer
Integrates horizontal and vertical self-attention layers
Enhancements
SWA (Stochastic Weight Averaging) & TTA (Test Time Augmentation)
Architecture Distribution
Performance Metrics Comparison
IoU Score Progression
Best IoU Score
0.5210
U-Net + TTA
Accuracy
93.10%
Improved Model
F1-Score
0.9050
Best Performance
Code & Implementation
Explore the implementation details and code snippets
Full Implementation
Access the complete codebase on GitHub
Interactive Visualization
See lane detection in action
Highway Scene

How It Works
- 1.Input image is preprocessed and resized to 720×1280
- 2.HW-Transformer processes the image with dual-axis attention
- 3.Decoder generates lane detection mask
- 4.Post-processing refines lane boundaries