{"id":28417664,"url":"https://github.com/apolloauto/apollo-vision-net-deployment","last_synced_at":"2025-06-26T15:31:18.993Z","repository":{"id":266604186,"uuid":"898790979","full_name":"ApolloAuto/Apollo-Vision-Net-Deployment","owner":"ApolloAuto","description":"Apollo BEV+OCC model deployment","archived":false,"fork":false,"pushed_at":"2024-12-05T05:07:42.000Z","size":430,"stargazers_count":4,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-04T12:50:43.501Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ApolloAuto.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-12-05T03:26:41.000Z","updated_at":"2025-04-20T14:24:53.000Z","dependencies_parsed_at":"2024-12-05T06:31:08.011Z","dependency_job_id":null,"html_url":"https://github.com/ApolloAuto/Apollo-Vision-Net-Deployment","commit_stats":null,"previous_names":["apolloauto/apollo-vision-net-deployment"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ApolloAuto/Apollo-Vision-Net-Deployment","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ApolloAuto%2FApollo-Vision-Net-Deployment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ApolloAuto%2FApollo-Vision-Net-Deployment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ApolloAuto%2FApollo-Vision-Net-Deployment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ApolloAuto%2FApollo-Vision-Net-Deployment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ApolloAuto","download_url":"https://codeload.github.com/ApolloAuto/Apollo-Vision-Net-Deployment/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ApolloAuto%2FApollo-Vision-Net-Deployment/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262094324,"owners_count":23257933,"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":"2025-06-04T07:15:23.071Z","updated_at":"2025-06-26T15:31:18.985Z","avatar_url":"https://github.com/ApolloAuto.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Deployment of Apollo Vision Network on TensorRT\n\nThis repository is a deployment project of [Apollo Vision Network](./) on [TensorRT](https://developer.nvidia.com/tensorrt).\n\n## Benchmarks\n\n|                            Model                             |   Data   | Batch Size |          mAP/miou          | FPS   |  Device  |\n| :----------------------------------------------------------: | :------: | :--------: | :-----------------------: | :--: | :------: |\n| Apollo Vision Network\u003cbr /\u003e[download](./) | NuScenes |     1      | mAP: 0.3194\u003cbr/\u003emiou: 0.2187  |   5.7   | Orin |\n\n## Clone\n\n```shell\ngit clone xxxx\ncd xxxx\nPROJECT_DIR=$(pwd)\n```\n\n## Data Preparation\n\n### NuScenes and CAN bus (For BEVFormer)\n\nDownload nuScenes V1.0 full dataset data and CAN bus expansion data [HERE](https://www.nuscenes.org/download) as `/path/to/nuscenes` and `/path/to/can_bus`.\n\nPrepare nuscenes data like [BEVFormer](https://github.com/fundamentalvision/BEVFormer/blob/master/docs/prepare_dataset.md).\n\n```shell\ncd ${PROJECT_DIR}/data\nln -s /path/to/nuscenes nuscenes\nln -s /path/to/can_bus can_bus\n\ncd ${PROJECT_DIR}\nsh samples/bevformer/create_data.sh\n```\n\n### Tree\n\n```shell\n${PROJECT_DIR}/data/.\n├── can_bus\n│   ├── scene-0001_meta.json\n│   ├── scene-0001_ms_imu.json\n│   ├── scene-0001_pose.json\n│   └── ...\n└── nuscenes\n    ├── maps\n    ├── samples\n    ├── sweeps\n    └── v1.0-trainval\n```\n\n## Install\n### CUDA/cuDNN/TensorRT\n\nDownload and install the `CUDA-11.6/cuDNN-8.6.0/TensorRT-8.5.1.7` following [NVIDIA](https://www.nvidia.com/en-us/).\n\n### PyTorch\n\nInstall PyTorch and TorchVision following the [official instructions](https://pytorch.org/get-started/locally/).\n\n```shell\npip install torch==1.12.1+cu116 torchvision==0.13.1+cu116 torchaudio==0.12.1+cu116 --extra-index-url https://download.pytorch.org/whl/cu116\n```\n\n### MMCV-full\n\n```shell\ngit clone https://github.com/open-mmlab/mmcv.git\ncd mmcv\ngit checkout v1.5.0\npip install -r requirements/optional.txt\nMMCV_WITH_OPS=1 pip install -e .\n```\n\n### MMDetection\n\n```shell\ngit clone https://github.com/open-mmlab/mmdetection.git\ncd mmdetection\ngit checkout v2.25.1\npip install -v -e .\n# \"-v\" means verbose, or more output\n# \"-e\" means installing a project in editable mode,\n# thus any local modifications made to the code will take effect without reinstallation.\n```\n\n### MMDeploy\n\n```shell\ngit clone git@github.com:open-mmlab/mmdeploy.git\ncd mmdeploy\ngit checkout v0.10.0\n\ngit clone git@github.com:NVIDIA/cub.git third_party/cub\ncd third_party/cub\ngit checkout c3cceac115\n\n# go back to third_party directory and git clone pybind11\ncd ..\ngit clone git@github.com:pybind/pybind11.git pybind11\ncd pybind11\ngit checkout 70a58c5\n```\n\n#### Build TensorRT Plugins of MMDeploy\n\n**Make sure cmake version \u003e= 3.14.0 and gcc version \u003e= 7.**\n\n```shell\nexport MMDEPLOY_DIR=/the/root/path/of/MMDeploy\nexport TENSORRT_DIR=/the/path/of/tensorrt\nexport CUDNN_DIR=/the/path/of/cuda\n\nexport LD_LIBRARY_PATH=$TENSORRT_DIR/lib:$LD_LIBRARY_PATH\nexport LD_LIBRARY_PATH=$CUDNN_DIR/lib64:$LD_LIBRARY_PATH\n\ncd ${MMDEPLOY_DIR}\nmkdir -p build\ncd build\ncmake -DCMAKE_CXX_COMPILER=g++-7 -DMMDEPLOY_TARGET_BACKENDS=trt -DTENSORRT_DIR=${TENSORRT_DIR} -DCUDNN_DIR=${CUDNN_DIR} ..\nmake -j$(nproc) \nmake install\n```\n\n#### Install MMDeploy\n\n```shell\ncd ${MMDEPLOY_DIR}\npip install -v -e .\n# \"-v\" means verbose, or more output\n# \"-e\" means installing a project in editable mode,\n# thus any local modifications made to the code will take effect without reinstallation.\n```\n\n### Install this Project\n\n```shell\ncd ${PROJECT_DIR}\npip install -r requirements.txt\n```\n\n#### Build and Install Custom TensorRT Plugins\n\n**NOTE: CUDA\u003e=11.4, SM version\u003e=7.5**\n\n```shell\ncd ${PROJECT_DIR}/TensorRT/build\ncmake .. -DCMAKE_TENSORRT_PATH=/path/to/TensorRT\nmake -j$(nproc)\nmake install\n```\n\n**Run Unit Test of  Custom TensorRT Plugins**\n\n```shell\ncd ${PROJECT_DIR}\nsh samples/test_trt_ops.sh\n```\n\n#### Build and Install Part of Ops in MMDetection3D\n\n```shell\ncd ${PROJECT_DIR}/third_party/bev_mmdet3d\npython setup.py build develop\n```\n\n### Prepare the Checkpoints\n\nDownload above PyTorch checkpoints to `${PROJECT_DIR}/checkpoints/pytorch/`. The ONNX files and TensorRT engines will be saved in `${PROJECT_DIR}/checkpoints/onnx/` and `${PROJECT_DIR}/checkpoints/tensorrt/`.\n\n## Run\n\nThe following command is used to generate onnx file of apollo vision net.\n\n```shell\npython tools/pth2onnx.py configs/apollo_bev/bev_tiny_det_occ_apollo_trt.py path_pth --opset_version 13 --cuda\n```\n\n## Acknowledgement\n\n* [BEVFormer_tensorrt](https://github.com/DerryHub/BEVFormer_tensorrt)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapolloauto%2Fapollo-vision-net-deployment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapolloauto%2Fapollo-vision-net-deployment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapolloauto%2Fapollo-vision-net-deployment/lists"}