{"id":15480996,"url":"https://github.com/ThomasVonWu/SparseEnd2End","last_synced_at":"2025-10-12T01:31:05.062Z","repository":{"id":253604554,"uuid":"843981822","full_name":"ThomasVonWu/SparseEnd2End","owner":"ThomasVonWu","description":"End2EndPerception deployment solution based on vision sparse transformer paradigm is open sourced.","archived":false,"fork":false,"pushed_at":"2025-01-07T14:15:43.000Z","size":27776,"stargazers_count":81,"open_issues_count":3,"forks_count":17,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-01-07T15:24:24.783Z","etag":null,"topics":["autonomous-driving","cuda-accleration","end2end-perception","onnx-convertation","sparse-transformer","tensorrt-conversion"],"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/ThomasVonWu.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-08-18T02:37:26.000Z","updated_at":"2025-01-07T14:17:43.000Z","dependencies_parsed_at":"2025-01-07T15:33:40.752Z","dependency_job_id":null,"html_url":"https://github.com/ThomasVonWu/SparseEnd2End","commit_stats":null,"previous_names":["thomasvonwu/sparseend2end"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThomasVonWu%2FSparseEnd2End","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThomasVonWu%2FSparseEnd2End/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThomasVonWu%2FSparseEnd2End/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThomasVonWu%2FSparseEnd2End/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ThomasVonWu","download_url":"https://codeload.github.com/ThomasVonWu/SparseEnd2End/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":236148745,"owners_count":19102714,"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","cuda-accleration","end2end-perception","onnx-convertation","sparse-transformer","tensorrt-conversion"],"created_at":"2024-10-02T05:00:59.997Z","updated_at":"2025-10-12T01:30:58.819Z","avatar_url":"https://github.com/ThomasVonWu.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# SparseEnd2End: Obstacle 3D Detection and Tracking Architecture Based VisionTransformer\n\n![demo](resources/sparse_end2end.gif)\n\n\u003cdiv align=\"center\"\u003e\n\n[![license](https://img.shields.io/github/license/ThomasVonWu/SparseEnd2End\n)](https://github.com/ThomasVonWu/SparseEnd2End/blob/main/LICENSE)\n[![issues](https://img.shields.io/github/issues/ThomasVonWu/SparseEnd2End?color=F48D73)](https://github.com/ThomasVonWu/SparseEnd2End/issues?q=is%3Aopen+is%3Aissue)\n[![issues](https://img.shields.io/github/issues-closed/ThomasVonWu/SparseEnd2End\n)](https://github.com/ThomasVonWu/SparseEnd2End/issues?q=is%3Aissue+is%3Aclosed)\n\u003cimg src=\"https://img.shields.io/github/repo-size/ThomasVonWu/SparseEnd2End.svg\"/\u003e\n\u003cimg src=\"https://img.shields.io/badge/language-C++/CUDA-red.svg\"/\u003e\n\u003cimg src=\"https://img.shields.io/github/stars/ThomasVonWu/SparseEnd2End.svg\"/\u003e\n\n\u003c/div\u003e\n\n--------------------------------------------------------------------------------\n| [**Blog**](https://zhuanlan.zhihu.com/p/715179777) |  \n\n👋 Hi, I’m ThomasVonWu. I'd like to introduce you to a  simple and practical **deployment repository based on TensorRT** which uses end-to-end perception paradigm with sparse transformer to sense 3D obstacles. This repository has no complex dependency for Training | Inference | Deployment(which means, we don't need to install [MMDetection3d](https://github.com/open-mmlab/mmdetection3d), [mmcv](https://github.com/open-mmlab/mmcv), [mmcv-full](https://github.com/open-mmlab/mmcv), [mmdeploy](https://github.com/open-mmlab/mmdeploy), etc.), so it's easy to install in your local workstation or supercomputing gpu clusters. This repository will also provide x86(NVIDIA RTX  Series GPU) | ARM(NVIDIA ORIN) deployment solutions. Finally, you can deploy your e2e model onborad through this repository happily.  \n👀 I guess you are interested in:  \n- how to define a PyTorch custom operator: DeformableAttentionAggr and register related ONNX node.\n- how to build a custom opertator plugin: DeformableAttentionAggr in TensorRT engine with Makefile or CMake.\n- how to convert ONNX format file with custom opertator to TensorRT engine and make it as  part of the whole  engine.\n- how to validate inference results consistency : PyTorch results vs. ONNX Runtime results vs. TensorRT results.\n- how to convert PyTorch model with temporal fusion transformer head to ONNX.\n- how to locate the TensorRT layer accurately when overflow occurs during using fp16 quantization for model parameter.\n\n## Algorithm Architecture\n\u003ccenter\u003e\n    \u003cimg style=\"border-radius: 0.3125em;\n    box-shadow: 0 2px 4px 0 rgba(34,36,38,.12),0 2px 10px 0 rgba(34,36,38,.08);\" \n    src=\"resources/images/sparse4d_architecture.jpg\" width=\"1000\"\u003e\n    \u003cbr\u003e\n    \u003cdiv style=\"color:orange; border-bottom: 1px solid #d9d9d9;\n    display: inline-block;\n    color: #999;\n    padding: 2px;\"\u003eAlgorithm Framework of Sparse4D, which conforms to an encoder-decoder structure. The inputs mainly consists of three components: multi-view images, newly initialized instances, propagated instances from previous frame. The output is the refined instances (3D anchor boxes and corresponding features), serve as the perception results for the current frame. Additionally, a subset of these refined instances is selected and propagated to the next frame.\u003c/div\u003e\n\u003c/center\u003e\n\n\n## nuScenes Benchmark\n### Results on Validation Split: `ThomasVonWu/SparseEnd2End` v.s. `HorizonRobotics/Sparse4D`\nThese training reproduction experiments were conducted using 4 NVIDIA H20 GPUs with 96 GB memory.\n|model | repository | backbone |pretrain| img size | Epoch | Traning | FPS | NDS | mAP |  AMOTA |AMOTP |IDS| config | ckpt | log | GPU |\n|  :----:  | :---: | :---: | :---: | :---: | :---:| :---:|:---:|:---: | :---: | :----: | :----: | :---: | :----: | :----: | :----: |:----: |\n|Sparse4Dv3|[HorizonRobotics/Sparse4D](https://github.com/HorizonRobotics/Sparse4D)|Resnet50|[ImageNet](https://download.pytorch.org/models/resnet50-19c8e357.pth)|256x704| 100 |22H | 19.8 |0.5637|0.4646|0.477|1.167|456| - | - | - | RTX3090 |\n|Sparse4Dv3|[ThomasVonWu/SparseEnd2End](https://github.com/ThomasVonWu/SparseEnd2End)|Resnet50|[ImageNet](https://download.pytorch.org/models/resnet50-19c8e357.pth)|256x704| 150 |77.5H | - |0.5623|0.4645|0.457|1.196|541| [cfg](dataset/config/sparse4d_temporal_r50_1x4_bs22_256x704.py) | [ckpt](https://drive.google.com/file/d/1sSMNB7T7LPKSr8nD9S_tSiu1mJrFMZ1I/view?usp=sharing) | [log](https://drive.google.com/file/d/1_TkatIdrfGzaZvUT02y3d4ctl2HIQ5oG/view?usp=drive_link) | H20 |\n\n## SparseEnd2End Deployment Experiments Results\n|         **Model**        | **ImgSize** | **Backbone** | **Framework** | **Precision** | **mAP** | **NDS** | **FPS** |                  **GPU**                  | **config**| **ckpt**|**onnx**|**engine**|\n|:----------------------------:|:-------------------:|:------------------------:|:------------------------:|:----------------------:|:--------------:|:-------------:|:-------------:|:----------------:|:----------------:|:----------------:|:----------------:|:----------------:|\n|         Sparse4Dv3      |    256x704     |     Resnet50    |           PyTorch       |            FP32        |     0.4645     |     0.5623    |     15.8     |  RTX 3090 |[config](dataset/config/sparse4d_temporal_r50_1x1_bs1_256x704_mini.py)|[ckpt](https://drive.google.com/file/d/1sSMNB7T7LPKSr8nD9S_tSiu1mJrFMZ1I/view?usp=sharing)|     --     |     --     |\n|         Sparse4Dv3      |    256x704     |     Resnet50    |          TensorRT     |            FP32        |      wait       |     wait      |     wait     |  RTX 3090 |[config](dataset/config/sparse4d_temporal_r50_1x1_bs1_256x704_mini.py)|[ckpt](https://drive.google.com/file/d/1sSMNB7T7LPKSr8nD9S_tSiu1mJrFMZ1I/view?usp=sharing)|[onnx](https://drive.google.com/drive/folders/1dbjnV5AW4-VB0zbYUsUAhGjo0lGm177m?usp=sharing)|[engine](https://drive.google.com/drive/folders/1ZIxTDVsG0QaW9FwSSnrS1JZUKF0_OymG?usp=sharing)|\n|         Sparse4Dv3      |    256x704     |     Resnet50    |          TensorRT     |            FP16        |      wait       |     wait      |     wait     |  RTX 3090 |[config](dataset/config/sparse4d_temporal_r50_1x1_bs1_256x704_mini.py)|[ckpt](https://drive.google.com/file/d/1sSMNB7T7LPKSr8nD9S_tSiu1mJrFMZ1I/view?usp=sharing)|     wait     |     wait     |\n|         Sparse4Dv3      |    256x704     |     Resnet50    |          TensorRT     |    INT8+FP16    |      wait       |     wait      |     wait     |  RTX 3090 |[config](dataset/config/sparse4d_temporal_r50_1x1_bs1_256x704_mini.py)|[ckpt](https://drive.google.com/file/d/1sSMNB7T7LPKSr8nD9S_tSiu1mJrFMZ1I/view?usp=sharing)|     wait     |     wait     |\n|         Sparse4Dv3      |    256x704     |     Resnet50    |          TensorRT     |            FP32        |      wait       |     wait      |     wait     |      NVIDIA ORIN      |[config](dataset/config/sparse4d_temporal_r50_1x1_bs1_256x704_mini.py)|[ckpt](https://drive.google.com/file/d/1sSMNB7T7LPKSr8nD9S_tSiu1mJrFMZ1I/view?usp=sharing)|     wait     |     wait     |\n|         Sparse4Dv3      |    256x704     |     Resnet50    |          TensorRT     |            FP16        |      wait       |     wait      |     wait     |      NVIDIA ORIN      |[config](dataset/config/sparse4d_temporal_r50_1x1_bs1_256x704_mini.py)|[ckpt](https://drive.google.com/file/d/1sSMNB7T7LPKSr8nD9S_tSiu1mJrFMZ1I/view?usp=sharing)|     wait     |     wait     |\n|         Sparse4Dv3      |    256x704     |     Resnet50    |          TensorRT     |    INT8+FP16    |      wait       |     wait      |     wait     |      NVIDIA ORIN      |[config](dataset/config/sparse4d_temporal_r50_1x1_bs1_256x704_mini.py)|[ckpt](https://drive.google.com/file/d/1sSMNB7T7LPKSr8nD9S_tSiu1mJrFMZ1I/view?usp=sharing)|     wait     |     wait     |\n\n\n## News\n* **`24 Sep, 2024`:** I release repository: SparseEnd2End. The complete deployment solution was released. \n* **`25 Aug, 2024`:** I release repository: SparseEnd2End. The complete deployment solution will be released as soon as possible. Please stay tuned! \n\n## Tasklist\n- [X] *Register custom operation : DeformableAttentionAggr and export ONNX and TensorRT engine. **`25 Aug, 2024`***\n- [X] *Verify the consistency of reasoning results : DeformableAttentionAggr  PyToch Implementation  vs. TensorRT plugin Implementation. **`25 Aug, 2024`***  \n- [X] *Export SparseTransFormer Backbone ONNX\u0026TensorRT engine. **`8 Sep, 2024`***\n- [X] *Verify the consistency of reasoning results : SparseTransFormer Backbone PyTorch Implementation vs. ONNX Runtime vs. TensorRT engine. **`8 Sep, 2024`***\n- [X] *Export SparseTransFormer Head ONNX and TensorRT engine. **`24 Sep, 2024`***\n- [X] *Verify the consistency of reasoning results : SparseTransFormer Head PyTorch Implementation vs. TensorRT engine. **`24 Sep, 2024`***\n- [ ] *Reasoning acceleration using CUDA shared memory and CUDA FP16 in DeformableAttentionAggr plugin Implementation.*\n- [ ] *Reasoning acceleration using FlashAttention in replace of MultiheadAttention.*\n- [ ] *Reasoning acceleration using FP16/INT8  in replace of FP32 for TensorRT engine.*\n- [ ] *Reasoning acceleration : Image pre-processing Instancbank Caching and model post-processing Implementation with CUDA.*\n- [ ] *Image pre-processing, Instancbank Caching and model post-processing Implementation with C++.*\n- [ ] *Onboard: Full-link reasoning using CUDA, TensorRT and C++.*\n\n# Introduction\n\u003e SparseEnd2End is a Sparse-Centric paradigm for end-to-end autonomous driving perception.  \n\n## Quick Start\n[Quick Start](QUICK-START.md)\n\n## Citation\nIf you find SparseEnd2End useful in your research or applications, please consider giving me a star \u0026#127775;  \n\n## 🏷 ChangeLog\n\u003e**08/25/2024：** **[v1.0.0]** This repository now supports Training | Inference in NuscenesDataset. It includes: data dump in JSON, Training | Inference  log caching, TensorBoard hooking, and so on.   \n\u003e**11/14/2024：** **[v2.0.0]** Reproduce training results of HorizonRobotics/Sparse4D with FP32. ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FThomasVonWu%2FSparseEnd2End","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FThomasVonWu%2FSparseEnd2End","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FThomasVonWu%2FSparseEnd2End/lists"}