Asad-Ismail / lane_detection

Lane Detection and Classification using Front camera monocular images

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

πŸš— Ego and Side Lane Detection for ADAS Applications (Tensorflow 2.x) 🚘

contributions welcome Hits

🌟 Features

  1. Segement and classify ego, left and right lane lines. The output can be visualized as shown below:

animated

  1. Apply pruning, clustering, and quantization to miniaturize the model, making it embedded system-ready.

  2. C++ inference to use the resulting miniature model.

πŸ“š Training Dataset:

  • 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

🧰 Model:

  • 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.

πŸ’» Training and Prediction

  • 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.

    pruning

Applying the above pipeline reduces the model size by approximately 11x, from 24MB to 2.2MB.

animated

About

Lane Detection and Classification using Front camera monocular images


Languages

Language:Python 55.0%Language:Jupyter Notebook 32.4%Language:C++ 10.1%Language:CMake 2.0%Language:Shell 0.5%