- Segement and classify ego, left and right lane lines. The output can be visualized as shown below:
-
Apply pruning, clustering, and quantization to miniaturize the model, making it embedded system-ready.
-
C++ inference to use the resulting miniature model.
-
The training data is TU Simple Lane Detection dataset.You can access it through this link: https://github.com/TuSimple/tusimple-benchmark
-
Dataset is preprocessed to annotate the lanes in 4 categories left ego (label=2), right ego (label=1), right lane (label=3), and left lane line (label=4)
-
Images are 1280x720 RGB, and labels are 1280x720 grayscale images
-
Image augmentations like rotation, flipping, saturation, brightness, and contrast changes are applied randomly
-
Data pipeline is made efficient using data interleaving and prefetch
-
MobileNetV2 is used as the backbone network, and then transposed convolutions are applied for upsampling with UNET-like feature concatenation.
-
ResNets or EfficientNets can also be used as a backbone for better performance.
-
Install requirements using pip install -r requirements.txt
-
Run training using python train.py --train_images [path to train images] --train_labels [path to train labels]
-
Perform prediction on image or video using pred.py or pred_video.py (also writes the blended video).
-
Prune, cluster, and quantize model weights and activations for miniaturization.
Applying the above pipeline reduces the model size by approximately 11x, from 24MB to 2.2MB.
- Pretrained weights are available at https://drive.google.com/drive/folders/1EhQ-8UoFv4rvMqe2mrJ4HFzZATd_Ee8c?usp=sharing.