{"id":15758698,"url":"https://github.com/Honminden/GlobalMapNet","last_synced_at":"2025-10-15T10:31:16.317Z","repository":{"id":257809337,"uuid":"864120064","full_name":"Honminden/GlobalMapNet","owner":"Honminden","description":"the official implementation of GlobalMapNet","archived":false,"fork":false,"pushed_at":"2024-09-27T14:30:47.000Z","size":1273,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-04T10:03:27.325Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Honminden.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":"2024-09-27T14:27:42.000Z","updated_at":"2024-09-27T14:35:17.000Z","dependencies_parsed_at":"2024-10-04T10:03:35.681Z","dependency_job_id":"ce440c6a-2e50-4c7c-bde7-bac2bc68c7c8","html_url":"https://github.com/Honminden/GlobalMapNet","commit_stats":null,"previous_names":["honminden/globalmapnet"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Honminden%2FGlobalMapNet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Honminden%2FGlobalMapNet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Honminden%2FGlobalMapNet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Honminden%2FGlobalMapNet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Honminden","download_url":"https://codeload.github.com/Honminden/GlobalMapNet/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":236604520,"owners_count":19175850,"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":[],"created_at":"2024-10-04T10:01:20.989Z","updated_at":"2025-10-15T10:31:10.956Z","avatar_url":"https://github.com/Honminden.png","language":"Python","funding_links":[],"categories":["Online HD map construction"],"sub_categories":["2024"],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003eGlobalMapNet\u003c/h1\u003e\n  \n  \u003ch3\u003eGlobalMapNet: An Online Framework for Vectorized Global HD Map Construction \u003c/h3\u003e\n  \n  [![arXiv](https://img.shields.io/badge/arXiv-Paper-\u003cCOLOR\u003e.svg)](https://arxiv.org/abs/2409.10063)\n  \n  \u003cimg src=\"./resources/globalmapnet_structure.png\" width=\"950px\"\u003e\n\nhttps://github.com/user-attachments/assets/eb3899f6-fc8a-4c5e-8d1f-1e299c708433\n\n\u003c/div\u003e\n\n## Introduction\nThis repository is an official implementation of GlobalMapNet.\n\n## Updates\n* **`20240927`:** Code released on Github.\n* **`20240917`:** We release the revised version of our paper (v2) on arXiv.\n* **`20240916`:** We release our paper on arXiv.\n\n## Getting Started\n### 1. Environment\n**Step 1.** Prepare environment.\n\na. If you already have the correct environment (e.g. conda env or venv for StreamMapNet), just reuse it in this repository.\n\nb. create a new conda env: Create conda environment and activate it.\n```\nconda create --name globalmapnet python=3.8 -y\nconda activate globalmapnet\n```\n\nc. create a new venv: Create a local venv in this repository and activate it.\n```\npython -m venv venv\nsource venv/bin/activate\n```\n\n**Step 2.** Install PyTorch.\n\n```\npip install torch==1.9.0+cu111 torchvision==0.10.0+cu111 torchaudio==0.9.0 -f https://download.pytorch.org/whl/torch_stable.html\n```\n\n**Step 3.** Install MMCV series.\n\n```\n# Install mmcv-series\npip install mmcv-full==1.6.0\npip install mmdet==2.28.2\npip install mmsegmentation==0.30.0\ngit clone https://github.com/open-mmlab/mmdetection3d.git\ncd mmdetection3d\ngit checkout v1.0.0rc6 \npip install -e .\n```\n\n**Step 4.** Install other requirements.\n\n```\npip install -r requirements.txt\n```\n\n**Step 5.** Install rasterizer.\n\n```\ncd plugin/models/heads/diff_ras/\npython setup.py develop\n```\n\n### 2. Data Preparation\n**Step 1.** Download [NuScenes](https://www.nuscenes.org/download) dataset to `./data/nuscenes`.\n\n**Step 2.** Download [Argoverse2 (sensor)](https://argoverse.github.io/user-guide/getting_started.html#download-the-datasets) dataset to `./data/av2`.\n\n**Step 3.** Generate annotation files for both datasets.\n\n```\npython tools/data_converter/nuscenes_converter.py --data-root ./data/nuscenes --dest-path cache/annotations --newsplit \npython tools/data_converter/argoverse_converter.py --data-root ./data/av2/sensor --dest-path cache/annotations --newsplit \n```\n\n**Step 4.** (Alternatively) Generate annotation files for nuScenes dataset with ordered scenes for cross-scene evaluation.\n\n```\npython tools/data_converter/nuscenes_converter.py --data-root ./data/nuscenes --dest-path cache/annotations --newsplit --sort-scene\n```\n\n**Step 5.** Generate GT global map files for both datasets.\n\n```\npython plugin/models/globalmapnet/map_utils/nusc_gt_map.py --data-root ./data/nuscenes --root-dir ./cache/global_maps --location all\npython plugin/models/globalmapnet/map_utils/argo_gt_map.py --ann_dir ./cache/annotations --data-root ./cache/global_maps --split all\n```\n\n### 3. Training and Validating\nTo train a model on a single GPU:\n\n```\nbash tools/dist_train.sh plugin/configs/nusc_newsplit_480_60x30_24e_global_train.py 1\n```\n\nTo validate a model on a single GPU for single-scene evaluation:\n\n```\nbash tools/dist_test.sh plugin/configs/nusc_newsplit_480_60x30_24e_global_eval.py ${CHECKPOINT} 1 --eval\n```\n\nTo validate a model on a single GPU for cross-scene evaluation:\n\n```\nbash tools/dist_test.sh plugin/configs/nusc_newsplit_480_60x30_24e_global_cross_scene_eval.py ${CHECKPOINT} 1 --eval\n```\n\nTo test a model's inference speed:\n\n```\npython tools/benchmark.py plugin/configs/nusc_newsplit_480_60x30_24e_global_eval.py ${CHECKPOINT}\n```\n\n### 4. Visualization\nTo visualize a comparison of StreamMapNet, GlobalMapNet and GT:\n```\npython tools/visualization/vis_compare.py --globalmapnet-path ${GLOBAL_MAP_PATH} --streammapnet-path ${STREAM_MAP_PATH} --gt-path ${GT_MAP_PATH}\n```\n\nTo visualize a video:\n```\npython tools/visualization/vis_video.py ${CONFIG} ${CHECKPOINT} ${SCENE_ID}\n```\n\n### 5. Fixes and Notices\nsee [fixes_and_notices](./fixes_and_notices.md) (updated 20240927)\n\n## Results\n\n### Single-scene comparison on NuScenes newsplit\n| Range | Method | $\\mathrm{AP}_{road}$ | $\\mathrm{AP}_{lane}$| $\\mathrm{AP}_{ped}$ | $\\mathrm{mAP}$ | $\\mathrm{GAP}_{road}$ | $\\mathrm{GAP}_{lane}$| $\\mathrm{GAP}_{ped}$ | $\\mathrm{mGAP}$ | Config | Epoch | Checkpoint |\n|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|\n| $60\\times 30\\ m$ | StreamMapNet| 42.4 | 28.7 | 27.4 | 32.9 | 12.8 | 13.4 | 15.5 | 13.9 | [Config](./plugin/configs/nusc_newsplit_480_60x30_24e_stream.py) | 24| [ckpt](https://huggingface.co/hdtr/GlobalMapNet-public/blob/main/streammapnet_nusc_60x30.pth)|\n| $60\\times 30\\ m$ | GlobalMapNet| 43.4 | 31.8 | 29.3 | 34.8 | 18.0 | 16.3 | 18.5 | 17.6 | [Config](./plugin/configs/nusc_newsplit_480_100x50_24e_global_eval.py) | 24| [ckpt](https://huggingface.co/hdtr/GlobalMapNet-public/blob/main/globalmapnet_nusc_100x50.pth)|\n| $100\\times 50\\ m$ | StreamMapNet| 26.3 | 21.4 | 25.8 | 24.5 | 6.0 | 10.2 | 13.4 | 9.9 | [Config](./plugin/configs/nusc_newsplit_480_100x50_24e_stream.py) | 24| [ckpt](https://huggingface.co/hdtr/GlobalMapNet-public/blob/main/streammapnet_nusc_100x50.pth)|\n| $100\\times 50\\ m$ | GlobalMapNet| 25.8 | 21.2 | 25.5 | 24.2 | 6.4 | 10.2 | 20.4 | 12.3 | [Config](./plugin/configs/nusc_newsplit_480_100x50_24e_global_eval.py) | 24| [ckpt](https://huggingface.co/hdtr/GlobalMapNet-public/blob/main/globalmapnet_nusc_100x50.pth)|\n\n### Single-scene comparison on Argoverse2 newsplit\n| Range | Method | $\\mathrm{AP}_{road}$ | $\\mathrm{AP}_{lane}$| $\\mathrm{AP}_{ped}$ | $\\mathrm{mAP}$ | $\\mathrm{GAP}_{road}$ | $\\mathrm{GAP}_{lane}$| $\\mathrm{GAP}_{ped}$ | $\\mathrm{mGAP}$ | Config | Epoch | Checkpoint |\n|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|\n| $60\\times 30\\ m$ | StreamMapNet| 64.4 | 58.5 | 58.2 | 60.4 | 33.8 | 34.2 | 27.2 | 31.7 | [Config](./plugin/configs/av2_newsplit_608_60x30_30e_stream.py) | 30| [ckpt](https://huggingface.co/hdtr/GlobalMapNet-public/blob/main/streammapnet_av2_60x30.pth)|\n| $60\\times 30\\ m$ | GlobalMapNet| 64.8 | 58.6 | 57.5 | 60.3 | 38.8 | 34.5 | 33.7 | 35.6 | [Config](./plugin/configs/av2_newsplit_608_60x30_30e_global_eval.py) | 30| [ckpt](https://huggingface.co/hdtr/GlobalMapNet-public/blob/main/globalmapnet_av2_60x30.pth)|\n| $100\\times 50\\ m$ | StreamMapNet| 52.7 | 49.2 | 61.1 | 54.3 | 23.0 | 25.4 | 41.3 | 29.9 | [Config](./plugin/configs/av2_newsplit_608_100x50_30e_stream.py) | 30| [ckpt](https://huggingface.co/hdtr/GlobalMapNet-public/blob/main/streammapnet_av2_100x50.pth)|\n| $100\\times 50\\ m$ | GlobalMapNet| 52.1 | 47.5 | 61.0 | 53.5 | 25.0 | 26.3 | 44.6 | 32.0 | [Config](./plugin/configs/av2_newsplit_608_100x50_30e_global_eval.py) | 30 | [ckpt](https://huggingface.co/hdtr/GlobalMapNet-public/blob/main/globalmapnet_av2_100x50.pth)|\n\n\n### Cross-scene comparison on NuScenes newsplit\n| Range | Method | $\\mathrm{GAP}_{road}$ | $\\mathrm{GAP}_{lane}$| $\\mathrm{GAP}_{ped}$ | $\\mathrm{mGAP}$ | Config | Epoch | Checkpoint |\n|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|\n| $60\\times 30\\ m$ | StreamMapNet| 6.2 | 9.9 | 15.5 | 10.5 | [Config](./plugin/configs/nusc_newsplit_480_60x30_24e_stream_cross_scene_eval.py) | 24| see above |\n| $60\\times 30\\ m$ | GlobalMapNet| 10.7 | 12.2 | 22.5 | 15.2 | [Config](./plugin/configs/nusc_newsplit_480_60x30_24e_global_cross_scene_eval.py) | 24| see above | \n\n## Acknowledgements\nGlobalMapNet is based on [mmdetection3d](https://github.com/open-mmlab/mmdetection3d). It is also greatly inspired by the following outstanding contributions to the open-source community: [BEVFormer](https://github.com/fundamentalvision/BEVFormer), [HDMapNet](https://github.com/Tsinghua-MARS-Lab/HDMapNet), [MapTR](https://github.com/hustvl/MapTR) and [StreamMapNet](https://github.com/yuantianyuan01/StreamMapNet).\n\n\n## Citation\n```\n@article{shi2024globalmapnet,\n  title={GlobalMapNet: An Online Framework for Vectorized Global HD Map Construction},\n  author={Shi, Anqi and Cai, Yuze and Chen, Xiangyu and Pu, Jian and Fu, Zeyu and Lu, Hong},\n  journal={arXiv preprint arXiv:2409.10063},\n  year={2024}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHonminden%2FGlobalMapNet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FHonminden%2FGlobalMapNet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHonminden%2FGlobalMapNet/lists"}