{"id":13441437,"url":"https://github.com/OpenDriveLab/LaneSegNet","last_synced_at":"2025-03-20T12:30:47.256Z","repository":{"id":211067138,"uuid":"728075907","full_name":"OpenDriveLab/LaneSegNet","owner":"OpenDriveLab","description":"[ICLR 2024] Map Learning with Lane Segment for Autonomous Driving","archived":false,"fork":false,"pushed_at":"2024-07-19T08:36:55.000Z","size":3388,"stargazers_count":240,"open_issues_count":5,"forks_count":26,"subscribers_count":11,"default_branch":"main","last_synced_at":"2024-08-01T03:34:33.759Z","etag":null,"topics":["autonomous-driving","lane-segment","laneline-detection","online-mapping","topology-reasoning"],"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/OpenDriveLab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["OpenDriveLab"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2023-12-06T07:13:48.000Z","updated_at":"2024-07-25T15:46:08.000Z","dependencies_parsed_at":"2024-01-08T13:39:45.753Z","dependency_job_id":"553fbccb-b4fc-47d4-b1c7-7fdb1f1e233e","html_url":"https://github.com/OpenDriveLab/LaneSegNet","commit_stats":null,"previous_names":["opendrivelab/lanesegnet"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenDriveLab%2FLaneSegNet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenDriveLab%2FLaneSegNet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenDriveLab%2FLaneSegNet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenDriveLab%2FLaneSegNet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OpenDriveLab","download_url":"https://codeload.github.com/OpenDriveLab/LaneSegNet/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221759993,"owners_count":16876331,"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":["autonomous-driving","lane-segment","laneline-detection","online-mapping","topology-reasoning"],"created_at":"2024-07-31T03:01:33.901Z","updated_at":"2025-03-20T12:30:47.250Z","avatar_url":"https://github.com/OpenDriveLab.png","language":"Python","funding_links":["https://github.com/sponsors/OpenDriveLab"],"categories":["Python","Online HD map construction"],"sub_categories":["2023"],"readme":"\u003cdiv align=\"center\"\u003e\n\n# LaneSegNet: Map Learning with Lane Segment Perception for Autonomous Driving\n\n[![arXiv](https://img.shields.io/badge/arXiv-2312.16108-479ee2.svg)](https://arxiv.org/abs/2312.16108)\n[![OpenLane-V2](https://img.shields.io/badge/GitHub-OpenLane--V2-blueviolet.svg)](https://github.com/OpenDriveLab/OpenLane-V2)\n[![LICENSE](https://img.shields.io/badge/license-Apache_2.0-blue.svg)](./LICENSE)\n\n![lanesegment](figs/lane_segment.jpg \"Diagram of Lane Segment\")\n\n\u003c/div\u003e\n\n\u003e - :mailbox_with_mail: Primary contact: [Tianyu Li](https://scholar.google.com/citations?user=X6vTmEMAAAAJ) ( litianyu@opendrivelab.com )\n\u003e - [arXiv paper](https://arxiv.org/abs/2312.16108) | [OpenReview](https://openreview.net/forum?id=LsURkIPYR5), ICLR 2024\n\u003e - [Blog (Zhihu)](https://zhuanlan.zhihu.com/p/678596087) | [Slides TODO]()\n\n## Highlights\n\n:fire: We advocate **Lane Segment** as a map learning paradigm that seamlessly incorporates both map :motorway: geometry and :spider_web: topology information.\n\n:checkered_flag: **Lane Segment** and **`OpenLane-V2 Map Element Bucket`** serve as a track in the **`CVPR 2024 Autonomous Grand Challenge`**.\n\n\u003e - Official website: :globe_with_meridians: [AGC2024 Mapless Driving](https://opendrivelab.com/challenge2024/#mapless_driving)\n\u003e - Evaluation server: :hugs: [Hugging Face](https://huggingface.co/spaces/AGC2024/mapless-driving-2024)\n\nThis repository can be used as a starting point for Mapless Driving track.\n\n\n\n## News\n- **`[2024/3]`** We released a multi-head version of LaneSegNet for the OpenLane-V2 Map Element Bucket!\n  - Refer to this [config](projects/configs/lanesegnet_r50_8x1_24e_olv2_subset_A_mapele_bucket.py) file to train the baseline!\n  - Please use the `*_ls.pkl` files generated by [OpenLane-V2](https://github.com/OpenDriveLab/OpenLane-V2/tree/master/data#preprocess) preprocess scripts!\n  - You can use `./tools/dist_test.sh {GPUs} --format-only` to generate the `submission.pkl` now!\n- **`[2023/12]`** LaneSegNet [paper](https://arxiv.org/abs/2312.16108) is available on arXiv. Code is also released!\n\n---\n\n![method](figs/pipeline.png \"Pipeline of LaneSegNet\")\n\n\u003cdiv align=\"center\"\u003e\n\u003cb\u003eOverall pipeline of LaneSegNet\u003c/b\u003e\n\u003c/div\u003e\n\n## Table of Contents\n- [Model Zoo](#model-zoo)\n- [Prerequisites](#prerequisites)\n- [Installation](#installation)\n- [Prepare Dataset](#prepare-dataset)\n- [Train and Evaluate](#train-and-evaluate)\n- [License and Citation](#license-and-citation)\n\n## Model Zoo\n\n\u003e [!NOTE]\n\u003e The evaluation results below are based on OpenLane-V2 devkit `v2.1.0`. In this version, we have addressed a loophole in the TOP metric, which caused the TOP\u003csub\u003elsls\u003c/sub\u003e value to be significantly higher than what was reported in the paper.  \n\u003e For more details please see issue [#76](https://github.com/OpenDriveLab/OpenLane-V2/issues/76) of OpenLane-V2.\n\n### Performance in LaneSegNet paper\n\n|   Model    | Epoch |  mAP  | TOP\u003csub\u003elsls\u003c/sub\u003e | Memory | Config | Download |\n| :--------: | :---: | :---: | :----------------: | :----: | :----: | :------: |\n| LaneSegNet | 24 | 33.5 | 25.4 | 9.4G | [config](projects/configs/lanesegnet_r50_8x1_24e_olv2_subset_A.py) | [ckpt](https://huggingface.co/OpenDriveLab/lanesegnet_r50_8x1_24e_olv2_subset_A/resolve/main/lanesegnet_r50_8x1_24e_olv2_subset_A.pth) / [log](https://huggingface.co/OpenDriveLab/lanesegnet_r50_8x1_24e_olv2_subset_A/resolve/main/20231225_213951.log) |\n\n\u003e The mean AP is between lane segment and pedestrian crossing.\n\n### Performance on OpenLane-V2 Map Element Bucket\n\n| Model | Epoch | DET\u003csub\u003els\u003c/sub\u003e | DET\u003csub\u003ea\u003c/sub\u003e | DET\u003csub\u003et\u003c/sub\u003e | TOP\u003csub\u003elsls\u003c/sub\u003e | TOP\u003csub\u003elste\u003c/sub\u003e | Config |\n| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |\n| LaneSegNet-meb | 24 | 27.8 | 23.8 | 36.9 | 24.1 | 21.3 | [config](projects/configs/lanesegnet_r50_8x1_24e_olv2_subset_A_mapele_bucket.py) |\n\n\u003e This is a naive multi-branch model for the Map Element Bucket.  \n\u003e The pedestrian and road boundary are detected by an additional MapTR head. The traffic element are detected by a Deformable DETR head. The hyper-parameters are roughly set.\n\n## Prerequisites\n\n- Linux\n- Python 3.8.x\n- NVIDIA GPU + CUDA 11.1\n- PyTorch 1.9.1\n\n## Installation\n\nWe recommend using [conda](https://docs.conda.io/en/latest/miniconda.html) to run the code.\n```bash\nconda create -n lanesegnet python=3.8 -y\nconda activate lanesegnet\n\n# (optional) If you have CUDA installed on your computer, skip this step.\nconda install cudatoolkit=11.1.1 -c conda-forge\n\npip install torch==1.9.1+cu111 torchvision==0.10.1+cu111 -f https://download.pytorch.org/whl/torch_stable.html\n```\n\nInstall mm-series packages.\n```bash\npip install mmcv-full==1.5.2 -f https://download.openmmlab.com/mmcv/dist/cu111/torch1.9.0/index.html\npip install mmdet==2.26.0\npip install mmsegmentation==0.29.1\npip install mmdet3d==1.0.0rc6\n```\n\nInstall other required packages.\n```bash\npip install -r requirements.txt\n```\n\n## Prepare Dataset\n\nFollowing [OpenLane-V2 repo](https://github.com/OpenDriveLab/OpenLane-V2/blob/v2.1.0/data) to download the **Image** and the **Map Element Bucket** data. Run the following script to collect data for this repo. \n\n\u003e [!IMPORTANT]\n\u003e \n\u003e :exclamation: Please note that the script for generating LaneSegNet data is not the same as the OpenLane-V2 Map Element Bucket. The `*_lanesegnet.pkl` is not the same as the `*_ls.pkl`.\n\u003e \n\u003e :bell: The `Map Element Bucket` has been updated as of October 2023. Please ensure you download the most recent data.\n\n```bash\ncd LaneSegNet\nmkdir data\n\nln -s {Path to OpenLane-V2 repo}/data/OpenLane-V2 ./data/\npython ./tools/data_process.py\n```\n\nAfter setup, the hierarchy of folder `data` is described below:\n```\ndata/OpenLane-V2\n├── train\n|   └── ...\n├── val\n|   └── ...\n├── test\n|   └── ...\n├── data_dict_subset_A_train_lanesegnet.pkl\n├── data_dict_subset_A_val_lanesegnet.pkl\n├── ...\n```\n\n## Train and Evaluate\n\n### Train\n\nWe recommend using 8 GPUs for training. If a different number of GPUs is utilized, you can enhance performance by configuring the `--autoscale-lr` option. The training logs will be saved to `work_dirs/lanesegnet`.\n\n```bash\ncd LaneSegNet\nmkdir -p work_dirs/lanesegnet\n\n./tools/dist_train.sh 8 [--autoscale-lr]\n```\n\n### Evaluate\nYou can set `--show` to visualize the results.\n\n```bash\n./tools/dist_test.sh 8 [--show]\n```\n\n## License and Citation\nAll assets and code are under the [Apache 2.0 license](./LICENSE) unless specified otherwise.\n\nIf this work is helpful for your research, please consider citing the following BibTeX entry.\n\n``` bibtex\n@inproceedings{li2023lanesegnet,\n  title={LaneSegNet: Map Learning with Lane Segment Perception for Autonomous Driving},\n  author={Li, Tianyu and Jia, Peijin and Wang, Bangjun and Chen, Li and Jiang, Kun and Yan, Junchi and Li, Hongyang},\n  booktitle={ICLR},\n  year={2024}\n}\n\n@inproceedings{wang2023openlanev2,\n  title={OpenLane-V2: A Topology Reasoning Benchmark for Unified 3D HD Mapping}, \n  author={Wang, Huijie and Li, Tianyu and Li, Yang and Chen, Li and Sima, Chonghao and Liu, Zhenbo and Wang, Bangjun and Jia, Peijin and Wang, Yuting and Jiang, Shengyin and Wen, Feng and Xu, Hang and Luo, Ping and Yan, Junchi and Zhang, Wei and Li, Hongyang},\n  booktitle={NeurIPS},\n  year={2023}\n}\n```\n\n## Related resources\n\nWe acknowledge all the open-source contributors for the following projects to make this work possible:\n\n- [Openlane-V2](https://github.com/OpenDriveLab/OpenLane-V2)\n- [BEVFormer](https://github.com/fundamentalvision/BEVFormer)\n- [TopoNet](https://github.com/OpenDriveLab/TopoNet)\n- [PersFormer](https://github.com/OpenDriveLab/PersFormer_3DLane)\n- [OpenLane](https://github.com/OpenDriveLab/OpenLane)\n- [MapTR](https://github.com/hustvl/MapTR)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FOpenDriveLab%2FLaneSegNet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FOpenDriveLab%2FLaneSegNet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FOpenDriveLab%2FLaneSegNet/lists"}