{"id":18484460,"url":"https://github.com/asad-ismail/lane_detection","last_synced_at":"2025-04-19T14:40:08.822Z","repository":{"id":151365523,"uuid":"341604397","full_name":"Asad-Ismail/lane_detection","owner":"Asad-Ismail","description":"Lane Detection and Classification using Front camera monocular images","archived":false,"fork":false,"pushed_at":"2023-03-02T17:00:31.000Z","size":42896,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-29T08:43:42.818Z","etag":null,"topics":["adas","cpp","embedded","lanedetection","pruning","quantization","tensorflow","weight","weightclustering"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Asad-Ismail.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-02-23T15:44:06.000Z","updated_at":"2024-07-19T07:05:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"68287e63-5602-48c3-9677-05bc931eba3d","html_url":"https://github.com/Asad-Ismail/lane_detection","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Asad-Ismail%2Flane_detection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Asad-Ismail%2Flane_detection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Asad-Ismail%2Flane_detection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Asad-Ismail%2Flane_detection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Asad-Ismail","download_url":"https://codeload.github.com/Asad-Ismail/lane_detection/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249716225,"owners_count":21315062,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["adas","cpp","embedded","lanedetection","pruning","quantization","tensorflow","weight","weightclustering"],"created_at":"2024-11-06T12:40:07.710Z","updated_at":"2025-04-19T14:40:08.790Z","avatar_url":"https://github.com/Asad-Ismail.png","language":"Python","readme":"# 🚗 Ego and Side Lane Detection for ADAS Applications (Tensorflow 2.x) 🚘\r\n## [![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/Asad-Ismail/lane_detection/issues) [![Hits](https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2FAsad-Ismail%2Flane_detection\u0026count_bg=%2379C83D\u0026title_bg=%23555555\u0026icon=\u0026icon_color=%23E7E7E7\u0026title=hits\u0026edge_flat=false)](https://hits.seeyoufarm.com)\r\n\r\n## 🌟 Features\r\n1. Segement and classify ego, left and right lane lines. The output can be visualized as shown below:\r\n\r\n  \u003cp align=\"center\"\u003e\r\n    \u003cimg src=\"https://user-images.githubusercontent.com/22799415/109520292-5b520e80-7aac-11eb-982d-0ff7c8d0ab9e.gif\", alt=\"animated\" /\u003e\r\n  \u003c/p\u003e\r\n  \r\n2. Apply pruning, clustering, and quantization to miniaturize the model, making it embedded system-ready.\r\n\r\n3. C++ inference to use the resulting miniature model.\r\n\r\n## 📚 Training Dataset:\r\n\r\n* The training data is TU Simple Lane Detection dataset.You can access it through this link: https://github.com/TuSimple/tusimple-benchmark\r\n\r\n* 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)\r\n\r\n* Images are 1280x720 RGB, and labels are 1280x720 grayscale images\r\n\r\n* Image augmentations like rotation, flipping, saturation, brightness, and contrast changes are applied randomly\r\n\r\n* Data pipeline is made efficient using data interleaving and prefetch\r\n\r\n## 🧰 Model:\r\n* MobileNetV2 is used as the backbone network, and then transposed convolutions are applied for upsampling with UNET-like feature concatenation.\r\n\r\n* ResNets or EfficientNets can also be used as a backbone for better performance.\r\n\r\n## 💻 Training and Prediction\r\n\r\n* Install requirements using pip install -r requirements.txt\r\n\r\n* Run training using python train.py --train_images [path to train images] --train_labels [path to train labels]\r\n\r\n* Perform prediction on image or video using pred.py or pred_video.py (also writes the blended video).\r\n\r\n* Prune, cluster, and quantize model weights and activations for miniaturization.\r\n\r\n  \u003cp align=\"center\"\u003e\r\n    \u003cimg src=\"https://user-images.githubusercontent.com/22799415/109626664-19bf7300-7b41-11eb-8367-de783d1af713.png\" alt=\"pruning\",img width=\"550\" /\u003e\r\n  \u003c/p\u003e\r\nApplying the above pipeline reduces the model size by approximately 11x, from 24MB to 2.2MB.\r\n  \u003cp align=\"center\"\u003e\r\n    \u003cimg src=\"https://user-images.githubusercontent.com/22799415/109627067-85a1db80-7b41-11eb-96f7-107d4ae99224.gif\"  alt=\"animated\" /\u003e\r\n  \u003c/p\u003e\r\n  \r\n* Pretrained weights are available at https://drive.google.com/drive/folders/1EhQ-8UoFv4rvMqe2mrJ4HFzZATd_Ee8c?usp=sharing.\r\n\r\n\r\n\r\n\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasad-ismail%2Flane_detection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fasad-ismail%2Flane_detection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasad-ismail%2Flane_detection/lists"}