{"id":19559780,"url":"https://github.com/cfzd/Ultra-Fast-Lane-Detection-v2","last_synced_at":"2025-04-26T23:32:41.135Z","repository":{"id":37360992,"uuid":"469546790","full_name":"cfzd/Ultra-Fast-Lane-Detection-v2","owner":"cfzd","description":"Ultra Fast Deep Lane Detection With Hybrid Anchor Driven Ordinal Classification (TPAMI 2022)","archived":false,"fork":false,"pushed_at":"2024-04-15T08:46:43.000Z","size":24888,"stargazers_count":608,"open_issues_count":148,"forks_count":100,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-11-11T05:03:09.622Z","etag":null,"topics":["deep-learning","lane-detection","pytorch"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cfzd.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-03-14T01:53:34.000Z","updated_at":"2024-11-11T02:55:38.000Z","dependencies_parsed_at":"2024-11-11T05:02:24.317Z","dependency_job_id":"1ff83508-faca-45e6-afff-a4422d270d3c","html_url":"https://github.com/cfzd/Ultra-Fast-Lane-Detection-v2","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/cfzd%2FUltra-Fast-Lane-Detection-v2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cfzd%2FUltra-Fast-Lane-Detection-v2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cfzd%2FUltra-Fast-Lane-Detection-v2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cfzd%2FUltra-Fast-Lane-Detection-v2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cfzd","download_url":"https://codeload.github.com/cfzd/Ultra-Fast-Lane-Detection-v2/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251068040,"owners_count":21531475,"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":["deep-learning","lane-detection","pytorch"],"created_at":"2024-11-11T05:01:23.390Z","updated_at":"2025-04-26T23:32:37.578Z","avatar_url":"https://github.com/cfzd.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Ultra-Fast-Lane-Detection-V2\nPyTorch implementation of the paper \"[Ultra Fast Deep Lane Detection with Hybrid Anchor Driven Ordinal Classification](https://arxiv.org/abs/2206.07389)\".\n\n\n![](ufldv2.png \"vis\")\n\n# Demo \n\u003ca href=\"https://youtu.be/VkvpoHlaMe0\n\" target=\"_blank\"\u003e\u003cimg src=\"http://img.youtube.com/vi/VkvpoHlaMe0/0.jpg\" \nalt=\"Demo\" width=\"240\" height=\"180\" border=\"10\" /\u003e\u003c/a\u003e\n\n\n# Install\nPlease see [INSTALL.md](./INSTALL.md)\n\n# Get started\nPlease modify the `data_root` in any configs you would like to run. We will use `configs/culane_res18.py` as an example.\n\nTo train the model, you can run:\n```\npython train.py configs/culane_res18.py --log_path /path/to/your/work/dir\n```\nor\n```\npython -m torch.distributed.launch --nproc_per_node=8 train.py configs/culane_res18.py --log_path /path/to/your/work/dir\n```\nIt should be noted that if you use different number of GPUs, the learning rate should be adjusted accordingly. The configs' learning rates correspond to 8-GPU training on CULane and CurveLanes datasets. **If you want to train on CULane or CurveLanes with single GPU, please decrease the learning rate by a factor of 1/8.** On the Tusimple, the learning rate corresponds to single GPU training.\n# Trained models\nWe provide trained models on CULane, Tusimple, and CurveLanes.\n\n| Dataset    | Backbone | F1   | Link |\n|------------|----------|-------|------|\n| CULane     | ResNet18 | 75.0  |  [Google](https://drive.google.com/file/d/1oEjJraFr-3lxhX_OXduAGFWalWa6Xh3W/view?usp=sharing)/[Baidu](https://pan.baidu.com/s/1Z3W4y3eA9xrXJ51-voK4WQ?pwd=pdzs)    |\n| CULane     | ResNet34 | 76.0  |   [Google](https://drive.google.com/file/d/1AjnvAD3qmqt_dGPveZJsLZ1bOyWv62Yj/view?usp=sharing)/[Baidu](https://pan.baidu.com/s/1PHNpVHboQlmpjM5NXl9IxQ?pwd=jw8f)   |\n| Tusimple   | ResNet18 | 96.11 |   [Google](https://drive.google.com/file/d/1Clnj9-dLz81S3wXiYtlkc4HVusCb978t/view?usp=sharing)/[Baidu](https://pan.baidu.com/s/1umHo0RZIAQ1l_FzL2aZomw?pwd=6xs1)   |\n| Tusimple   | ResNet34 | 96.24 |   [Google](https://drive.google.com/file/d/1pkz8homK433z39uStGK3ZWkDXrnBAMmX/view?usp=sharing)/[Baidu](https://pan.baidu.com/s/1Eq7oxnDoE0vcQGzs1VsGZQ?pwd=b88p)   |\n| CurveLanes | ResNet18 | 80.42 |   [Google](https://drive.google.com/file/d/1VfbUvorKKMG4tUePNbLYPp63axgd-8BX/view?usp=sharing)/[Baidu](https://pan.baidu.com/s/1jCqKqgSQdh6nwC5pYpYO1A?pwd=urhe)   |\n| CurveLanes | ResNet34 | 81.34 |   [Google](https://drive.google.com/file/d/1O1kPSr85Icl2JbwV3RBlxWZYhLEHo8EN/view?usp=sharing)/[Baidu](https://pan.baidu.com/s/1fk2Wg-1QoHXTnTlasSM6uQ?pwd=4mn3)   |\n\nFor evaluation, run\n```Shell\nmkdir tmp\n\npython test.py configs/culane_res18.py --test_model /path/to/your/model.pth --test_work_dir ./tmp\n```\n\nSame as training, multi-gpu evaluation is also supported.\n```Shell\nmkdir tmp\n\npython -m torch.distributed.launch --nproc_per_node=8 test.py configs/culane_res18.py --test_model /path/to/your/model.pth --test_work_dir ./tmp\n```\n\n# Visualization\nWe provide a script to visualize the detection results. Run the following commands to visualize on the testing set of CULane.\n```\npython demo.py configs/culane_res18.py --test_model /path/to/your/culane_res18.pth\n```\n\n# Tensorrt Deploy\nWe also provide a python script to do tensorrt inference on videos.\n\n1. Convert to onnx model\n    ```\n    python deploy/pt2onnx.py --config_path configs/culane_res34.py --model_path weights/culane_res34.pth\n    ```\n    Or you can download the onnx model using the following script: https://github.com/PINTO0309/PINTO_model_zoo/blob/main/324_Ultra-Fast-Lane-Detection-v2/download.sh. And copy `ufldv2_culane_res34_320x1600.onnx` to `weights/ufldv2_culane_res34_320x1600.onnx`\n\n2. Convert to tensorrt model\n\n    Use trtexec to convert engine model\n\n    `trtexec --onnx=weights/culane_res34.onnx --saveEngine=weights/culane_res34.engine`\n\n3. Do inference\n    ```\n    python deploy/trt_infer.py --config_path  configs/culane_res34.py --engine_path weights/culane_res34.engine --video_path example.mp4\n    ```\n\n# Citation\n\n```BibTeX\n@InProceedings{qin2020ultra,\nauthor = {Qin, Zequn and Wang, Huanyu and Li, Xi},\ntitle = {Ultra Fast Structure-aware Deep Lane Detection},\nbooktitle = {The European Conference on Computer Vision (ECCV)},\nyear = {2020}\n}\n\n@ARTICLE{qin2022ultrav2,\n  author={Qin, Zequn and Zhang, Pengyi and Li, Xi},\n  journal={IEEE Transactions on Pattern Analysis and Machine Intelligence}, \n  title={Ultra Fast Deep Lane Detection With Hybrid Anchor Driven Ordinal Classification}, \n  year={2022},\n  volume={},\n  number={},\n  pages={1-14},\n  doi={10.1109/TPAMI.2022.3182097}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcfzd%2FUltra-Fast-Lane-Detection-v2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcfzd%2FUltra-Fast-Lane-Detection-v2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcfzd%2FUltra-Fast-Lane-Detection-v2/lists"}