{"id":13441881,"url":"https://github.com/Turoad/lanedet","last_synced_at":"2025-03-20T13:31:09.557Z","repository":{"id":37754374,"uuid":"358456454","full_name":"Turoad/lanedet","owner":"Turoad","description":"An open source lane detection toolbox based on PyTorch, including SCNN, RESA, UFLD, LaneATT, CondLane, etc.","archived":false,"fork":false,"pushed_at":"2022-03-31T11:36:48.000Z","size":495,"stargazers_count":563,"open_issues_count":34,"forks_count":93,"subscribers_count":13,"default_branch":"main","last_synced_at":"2024-10-28T05:11:57.075Z","etag":null,"topics":["conditional-lane-detection","culane","deep-learning","lane-detection","lane-detection-toolbox","lane-line-detection","laneatt","resa","scnn","tusimple","ufld"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Turoad.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-04-16T02:48:43.000Z","updated_at":"2024-10-24T10:57:06.000Z","dependencies_parsed_at":"2022-08-08T21:31:05.790Z","dependency_job_id":null,"html_url":"https://github.com/Turoad/lanedet","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Turoad%2Flanedet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Turoad%2Flanedet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Turoad%2Flanedet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Turoad%2Flanedet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Turoad","download_url":"https://codeload.github.com/Turoad/lanedet/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244619148,"owners_count":20482369,"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":["conditional-lane-detection","culane","deep-learning","lane-detection","lane-detection-toolbox","lane-line-detection","laneatt","resa","scnn","tusimple","ufld"],"created_at":"2024-07-31T03:01:39.218Z","updated_at":"2025-03-20T13:31:09.213Z","avatar_url":"https://github.com/Turoad.png","language":"Python","funding_links":[],"categories":["Python","3. Perception"],"sub_categories":["3.1.1 Vision based"],"readme":"# LaneDet\n## Introduction\nLaneDet is an open source lane detection toolbox based on PyTorch that aims to pull together a wide variety of state-of-the-art lane detection models. Developers can reproduce these SOTA methods and build their own methods.\n\n![demo image](.github/_clips_0601_1494452613491980502_20.jpg)\n\n## Table of Contents\n* [Introduction](#Introduction)\n* [Benchmark and model zoo](#Benchmark-and-model-zoo)\n* [Installation](#Installation)\n* [Getting Started](#Getting-started)\n* [Contributing](#Contributing)\n* [Licenses](#Licenses)\n* [Acknowledgement](#Acknowledgement)\n\n## Benchmark and model zoo\nSupported backbones:\n- [x] ResNet\n- [x] ERFNet\n- [x] VGG\n- [x] MobileNet\n- [] DLA(coming soon)\n\nSupported detectors:\n- [x] [SCNN](configs/scnn)\n- [x] [UFLD](configs/ufld)\n- [x] [RESA](configs/resa)\n- [x] [LaneATT](configs/laneatt)\n- [x] [CondLane](configs/condlane)\n- [] CLRNet(coming soon)\n\n\n## Installation\n\u003c!--\nPlease refer to [INSTALL.md](INSTALL.md) for installation.\n--\u003e\n\n### Clone this repository\n```\ngit clone https://github.com/turoad/lanedet.git\n```\nWe call this directory as `$LANEDET_ROOT`\n\n### Create a conda virtual environment and activate it (conda is optional)\n\n```Shell\nconda create -n lanedet python=3.8 -y\nconda activate lanedet\n```\n\n### Install dependencies\n\n```Shell\n# Install pytorch firstly, the cudatoolkit version should be same in your system.\n\nconda install pytorch==1.8.0 torchvision==0.9.0 cudatoolkit=10.1 -c pytorch\n\n# Or you can install via pip\npip install torch==1.8.0 torchvision==0.9.0\n\n# Install python packages\npython setup.py build develop\n```\n\n### Data preparation\n\n#### CULane\n\nDownload [CULane](https://xingangpan.github.io/projects/CULane.html). Then extract them to `$CULANEROOT`. Create link to `data` directory.\n\n```Shell\ncd $LANEDET_ROOT\nmkdir -p data\nln -s $CULANEROOT data/CULane\n```\n\nFor CULane, you should have structure like this:\n```\n$CULANEROOT/driver_xx_xxframe    # data folders x6\n$CULANEROOT/laneseg_label_w16    # lane segmentation labels\n$CULANEROOT/list                 # data lists\n```\n\n#### Tusimple\nDownload [Tusimple](https://github.com/TuSimple/tusimple-benchmark/issues/3). Then extract them to `$TUSIMPLEROOT`. Create link to `data` directory.\n\n```Shell\ncd $LANEDET_ROOT\nmkdir -p data\nln -s $TUSIMPLEROOT data/tusimple\n```\n\nFor Tusimple, you should have structure like this:\n```\n$TUSIMPLEROOT/clips # data folders\n$TUSIMPLEROOT/lable_data_xxxx.json # label json file x4\n$TUSIMPLEROOT/test_tasks_0627.json # test tasks json file\n$TUSIMPLEROOT/test_label.json # test label json file\n\n```\n\nFor Tusimple, the segmentation annotation is not provided, hence we need to generate segmentation from the json annotation. \n\n```Shell\npython tools/generate_seg_tusimple.py --root $TUSIMPLEROOT\n# this will generate seg_label directory\n```\n\n## Getting Started\n### Training\n\nFor training, run\n\n```Shell\npython main.py [configs/path_to_your_config] --gpus [gpu_ids]\n```\n\n\nFor example, run\n```Shell\npython main.py configs/resa/resa50_culane.py --gpus 0\n```\n\n### Testing\nFor testing, run\n```Shell\npython main.py [configs/path_to_your_config] --validate --load_from [path_to_your_model] [gpu_num]\n```\n\nFor example, run\n```Shell\npython main.py configs/resa/resa50_culane.py --validate --load_from culane_resnet50.pth --gpus 0\n```\n\nCurrently, this code can output the visualization result when testing, just add `--view`.\nWe will get the visualization result in `work_dirs/xxx/xxx/visualization`.\n\nFor example, run\n```Shell\npython main.py configs/resa/resa50_culane.py --validate --load_from culane_resnet50.pth --gpus 0 --view\n```\n\n### Inference\nSee `tools/detect.py` for detailed information.\n```\npython tools/detect.py --help\n\nusage: detect.py [-h] [--img IMG] [--show] [--savedir SAVEDIR]\n                 [--load_from LOAD_FROM]\n                 config\n\npositional arguments:\n  config                The path of config file\n\noptional arguments:\n  -h, --help            show this help message and exit\n  --img IMG             The path of the img (img file or img_folder), for\n                        example: data/*.png\n  --show                Whether to show the image\n  --savedir SAVEDIR     The root of save directory\n  --load_from LOAD_FROM\n                        The path of model\n```\nTo run inference on example images in `./images` and save the visualization images in `vis` folder:\n```\npython tools/detect.py configs/resa/resa34_culane.py --img images\\\n          --load_from resa_r34_culane.pth --savedir ./vis\n```\n\n\n## Contributing\nWe appreciate all contributions to improve LaneDet.  Any pull requests or issues are welcomed.\n\n## Licenses\nThis project is released under the [Apache 2.0 license](LICNESE).\n\n\n## Acknowledgement\n\u003c!--ts--\u003e\n* [open-mmlab/mmdetection](https://github.com/open-mmlab/mmdetection)\n* [pytorch/vision](https://github.com/pytorch/vision)\n* [cardwing/Codes-for-Lane-Detection](https://github.com/cardwing/Codes-for-Lane-Detection)\n* [XingangPan/SCNN](https://github.com/XingangPan/SCNN)\n* [ZJULearning/resa](https://github.com/ZJULearning/resa)\n* [cfzd/Ultra-Fast-Lane-Detection](https://github.com/cfzd/Ultra-Fast-Lane-Detection)\n* [lucastabelini/LaneATT](https://github.com/lucastabelini/LaneATT)\n* [aliyun/conditional-lane-detection](https://github.com/aliyun/conditional-lane-detection)\n\u003c!--te--\u003e\n\n\u003c!-- \n## Citation\nIf you use\n```\n@misc{zheng2021lanedet,\n  author =       {Tu Zheng},\n  title =        {LaneDet},\n  howpublished = {\\url{https://github.com/turoad/lanedet}},\n  year =         {2021}\n}\n``` --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTuroad%2Flanedet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FTuroad%2Flanedet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTuroad%2Flanedet/lists"}