{"id":20731453,"url":"https://github.com/opendrivelab/toponet","last_synced_at":"2025-05-16T14:07:58.372Z","repository":{"id":171716014,"uuid":"619886354","full_name":"OpenDriveLab/TopoNet","owner":"OpenDriveLab","description":"Graph-based Topology Reasoning for Driving Scenes","archived":false,"fork":false,"pushed_at":"2025-01-02T01:58:25.000Z","size":795,"stargazers_count":312,"open_issues_count":3,"forks_count":14,"subscribers_count":24,"default_branch":"main","last_synced_at":"2025-05-08T18:48:29.506Z","etag":null,"topics":["autonomous-driving","centerline-detection","road-topology","traffic-element-recognition"],"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-03-27T15:54:18.000Z","updated_at":"2025-05-06T06:51:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"30b650b6-054c-4c1d-8e5d-7802ad576324","html_url":"https://github.com/OpenDriveLab/TopoNet","commit_stats":{"total_commits":28,"total_committers":5,"mean_commits":5.6,"dds":0.5,"last_synced_commit":"02246f663a89d820a8735ff34ce5a51ecc5f45b2"},"previous_names":["opendrivelab/toponet"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenDriveLab%2FTopoNet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenDriveLab%2FTopoNet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenDriveLab%2FTopoNet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenDriveLab%2FTopoNet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OpenDriveLab","download_url":"https://codeload.github.com/OpenDriveLab/TopoNet/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254544146,"owners_count":22088807,"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","centerline-detection","road-topology","traffic-element-recognition"],"created_at":"2024-11-17T05:14:53.579Z","updated_at":"2025-05-16T14:07:58.170Z","avatar_url":"https://github.com/OpenDriveLab.png","language":"Python","funding_links":["https://github.com/sponsors/OpenDriveLab"],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# TopoNet: A New Baseline for Scene Topology Reasoning\n\n## Graph-based Topology Reasoning for Driving Scenes\n\n[![arXiv](https://img.shields.io/badge/arXiv-2304.05277-479ee2.svg)](https://arxiv.org/abs/2304.05277)\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![method](figs/pipeline.png \"Model Architecture\")\n\n\n\u003c/div\u003e\n\n\u003e - Production from [OpenDriveLab](https://opendrivelab.com) at Shanghai AI Lab. Jointly with collaborators at Huawei.\n\u003e - Primary contact: [Tianyu Li](https://scholar.google.com/citations?user=X6vTmEMAAAAJ) ( litianyu@opendrivelab.com )\n\n---\n\nThis repository contains the source code of **TopoNet**, [Graph-based Topology Reasoning for Driving Scenes](https://arxiv.org/abs/2304.05277).\n\nTopoNet is the first end-to-end framework capable of abstracting traffic knowledge beyond conventional perception tasks, _i.e._, **reasoning connections between centerlines and traffic elements** from sensor inputs. It unifies heterogeneous feature\nlearning and enhances feature interactions via the graph neural network architecture and the knowledge graph design. \n\nInstead of recognizing lanes, we adhere that modeling the lane topology is `appropriate` to construct road components within the perception framework, to facilitate the ultimate driving comfort. \nThis is in accordance with the [UniAD philosophy](https://github.com/OpenDriveLab/UniAD).\n\n## Table of Contents\n- [News](#news)\n- [Main Results](#main-results)\n- [Prerequisites](#prerequisites)\n- [Installation](#installation)\n- [Prepare Dataset](#prepare-dataset)\n- [Train and Evaluate](#train-and-evaluate)\n- [License](#license)\n- [Citation](#citation)\n\n## News\n\n- **`Pinned:`** The [leaderboard](https://opendrivelab.com/AD23Challenge.html#openlane_topology) for Lane Topology Challenge is open for regular submissions year around. This Challenge **`would`** be back in 2024's edition.\n- **`[2023/11]`** :fire:The code and model of OpenLane-V2 subset-B is released!\n- **`[2023/08]`** The code and model of TopoNet is released!\n- **`[2023/04]`** TopoNet [paper](https://arxiv.org/abs/2304.05277) is available on arXiv.\n- **`[2023/01]`** Introducing [Autonomous Driving Challenge](https://opendrivelab.com/AD23Challenge.html) for Lane Topology at CVPR 2023.\n\n\n## Main Results\n\n### Results on OpenLane-V2 subset-A val\n\nWe provide results on **[Openlane-V2](https://github.com/OpenDriveLab/OpenLane-V2) subset-A val** set.\n\n|    Method    | Backbone  | Epoch | DET\u003csub\u003el\u003c/sub\u003e | TOP\u003csub\u003ell\u003c/sub\u003e | DET\u003csub\u003et\u003c/sub\u003e | TOP\u003csub\u003elt\u003c/sub\u003e |   OLS    |\n| :----------: | :-------: | :---: | :-------------: | :--------------: | :-------------: | :--------------: | :------: |\n|     STSU     | ResNet-50 |  24   |      12.7       |       0.5        |      43.0       |       15.1       |   25.4   |\n| VectorMapNet | ResNet-50 |  24   |      11.1       |       0.4        |      41.7       |       6.2        |   20.8   |\n|    MapTR     | ResNet-50 |  24   |       8.3       |       0.2        |      43.5       |       5.8        |   20.0   |\n|    MapTR*    | ResNet-50 |  24   |      17.7       |       1.1        |      43.5       |       10.4       |   26.0   |\n| **TopoNet**  | ResNet-50 |  24   |    **28.6**     |     **4.1**      |    **48.6**     |     **20.3**     | **35.6** |\n\n:fire:: Based on the updated `v1.1` OpenLane-V2 devkit and metrics, we have reassessed the performance of TopoNet and other SOTA models. For more details please see issue [#76](https://github.com/OpenDriveLab/OpenLane-V2/issues/76) of OpenLane-V2.\n\n|    Method    | Backbone  | Epoch | DET\u003csub\u003el\u003c/sub\u003e | TOP\u003csub\u003ell\u003c/sub\u003e | DET\u003csub\u003et\u003c/sub\u003e | TOP\u003csub\u003elt\u003c/sub\u003e |   OLS    |\n| :----------: | :-------: | :---: | :-------------: | :--------------: | :-------------: | :--------------: | :------: |\n|     STSU     | ResNet-50 |  24   |      12.7       |       2.9        |      43.0       |       19.8       |   29.3   |\n| VectorMapNet | ResNet-50 |  24   |      11.1       |       2.7        |      41.7       |       9.2        |   24.9   |\n|    MapTR     | ResNet-50 |  24   |       8.3       |       2.3        |      43.5       |       8.9        |   24.2   |\n|    MapTR*    | ResNet-50 |  24   |      17.7       |       5.9        |      43.5       |       15.1       |   31.0   |\n| **TopoNet**  | ResNet-50 |  24   |    **28.6**     |     **10.9**     |    **48.6**     |     **23.8**     | **39.8** |\n\n\u003e *: evaluation based on matching results on Chamfer distance.  \n\u003e The result of TopoNet is from this repo.\n\n\n### Results on OpenLane-V2 subset-B val\n\n|    Method    | Backbone  | Epoch | DET\u003csub\u003el\u003c/sub\u003e | TOP\u003csub\u003ell\u003c/sub\u003e | DET\u003csub\u003et\u003c/sub\u003e | TOP\u003csub\u003elt\u003c/sub\u003e |   OLS    |\n| :----------: | :-------: | :---: | :-------------: | :--------------: | :-------------: | :--------------: | :------: |\n| **TopoNet**  | ResNet-50 |  24   |    **24.4**     |     **6.7**      |    **52.6**     |     **16.7**     | **36.0** |\n\n\u003e The result is based on the updated `v1.1` OpenLane-V2 devkit and metrics.  \n\u003e The result of TopoNet is from this repo.\n\n## Model Zoo\n\n| Model | Dataset | Backbone | Epoch |  OLS  | Memory | Config | Download |\n| :---: | :-----: | :------: | :---: | :---: | :----: | :----: | :------: |\n| TopoNet-R50 | subset-A | ResNet-50 | 24 | 39.8 | 12.3G | [config](projects/configs/toponet_r50_8x1_24e_olv2_subset_A.py) | [ckpt](https://huggingface.co/OpenDriveLab/toponet_r50_8x1_24e_olv2_subset_A/resolve/main/toponet_r50_8x1_24e_olv2_subset_A.pth) / [log](https://huggingface.co/OpenDriveLab/toponet_r50_8x1_24e_olv2_subset_A/resolve/main/20231017_113808.log) |\n| TopoNet-R50 | subset-B | ResNet-50 | 24 | 36.0 | 8.2G  | [config](projects/configs/toponet_r50_8x1_24e_olv2_subset_B.py) | [ckpt](https://huggingface.co/OpenDriveLab/toponet_r50_8x1_24e_olv2_subset_B/resolve/main/toponet_r50_8x1_24e_olv2_subset_B.pth) / [log](https://huggingface.co/OpenDriveLab/toponet_r50_8x1_24e_olv2_subset_B/resolve/main/20231127_121131.log) |\n\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 toponet python=3.8 -y\nconda activate toponet\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/v1.0.0/data) to download the data and run the [preprocessing](https://github.com/OpenDriveLab/OpenLane-V2/tree/v1.0.0/data#preprocess) code.\n\n```bash\ncd TopoNet\nmkdir data \u0026\u0026 cd data\n\nln -s {PATH to OpenLane-V2 repo}/data/OpenLane-V2\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.pkl\n├── data_dict_subset_A_val.pkl\n├── data_dict_subset_B_train.pkl\n├── data_dict_subset_B_val.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/toponet`.\n\n```bash\ncd TopoNet\nmkdir -p work_dirs/toponet\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\n\nAll assets and code are under the [Apache 2.0 license](./LICENSE) unless specified otherwise.\n\n## Citation\nIf this work is helpful for your research, please consider citing the following BibTeX entry.\n\n``` bibtex\n@article{li2023toponet,\n  title={Graph-based Topology Reasoning for Driving Scenes},\n  author={Li, Tianyu and Chen, Li and Wang, Huijie and Li, Yang and Yang, Jiazhi and Geng, Xiangwei and Jiang, Shengyin and Wang, Yuting and Xu, Hang and Xu, Chunjing and Yan, Junchi and Luo, Ping and Li, Hongyang},\n  journal={arXiv preprint arXiv:2304.05277},\n  year={2023}\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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopendrivelab%2Ftoponet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopendrivelab%2Ftoponet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopendrivelab%2Ftoponet/lists"}