https://github.com/asad-ismail/lane_detection
Lane Detection and Classification using Front camera monocular images
https://github.com/asad-ismail/lane_detection
adas cpp embedded lanedetection pruning quantization tensorflow weight weightclustering
Last synced: 12 months ago
JSON representation
Lane Detection and Classification using Front camera monocular images
- Host: GitHub
- URL: https://github.com/asad-ismail/lane_detection
- Owner: Asad-Ismail
- Created: 2021-02-23T15:44:06.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2023-03-02T17:00:31.000Z (about 3 years ago)
- Last Synced: 2025-03-29T08:43:42.818Z (about 1 year ago)
- Topics: adas, cpp, embedded, lanedetection, pruning, quantization, tensorflow, weight, weightclustering
- Language: Python
- Homepage:
- Size: 40.9 MB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 🚗 Ego and Side Lane Detection for ADAS Applications (Tensorflow 2.x) 🚘
## [](https://github.com/Asad-Ismail/lane_detection/issues) [](https://hits.seeyoufarm.com)
## 🌟 Features
1. Segement and classify ego, left and right lane lines. The output can be visualized as shown below:
2. Apply pruning, clustering, and quantization to miniaturize the model, making it embedded system-ready.
3. 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.
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.