xmfcx commited on
Commit
1539e85
·
verified ·
1 Parent(s): 8999f0f

feat: add tensorrt_vad v0.1 artifacts (from awf.ml.dev.web.auto/planning/models/tensorrt_vad/carla_tiny/v0.1)

Browse files
.gitignore ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ # Auto-generated TensorRT artifacts, built locally by Autoware from the ONNX
2
+ # files. They are environment-specific (GPU arch + TensorRT version) and must
3
+ # not be committed to this repo.
4
+ *.engine
README.md ADDED
@@ -0,0 +1,170 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ pipeline_tag: robotics
4
+ tags:
5
+ - autoware
6
+ - ros2
7
+ - autonomous-driving
8
+ - e2e
9
+ - planning
10
+ - vad
11
+ - carla
12
+ - simulation
13
+ - tensorrt
14
+ - onnx
15
+ ---
16
+
17
+ # VAD for Autoware (`tensorrt_vad`)
18
+
19
+ End-to-end autonomous driving model (variant `carla_tiny`) used by the
20
+ [`autoware_tensorrt_vad`](https://github.com/autowarefoundation/autoware_universe/tree/main/e2e/autoware_tensorrt_vad)
21
+ node in [Autoware](https://github.com/autowarefoundation/autoware).
22
+
23
+ The model follows the **VAD (Vectorized Autonomous Driving)** [1] architecture and was optimized for TensorRT
24
+ deployment with NVIDIA's [DL4AGX](https://github.com/NVIDIA/DL4AGX) workflow. It replaces the traditional
25
+ localization, perception, and planning modules with a single neural network: 6 surround-view camera images go in,
26
+ an ego trajectory comes out, with predicted objects and map elements as auxiliary outputs.
27
+
28
+ > **Simulation only.** This model is trained exclusively on CARLA simulation data from the
29
+ > [Bench2Drive](https://github.com/Thinklab-SJTU/Bench2Drive) benchmark [2]. It is intended for use with the
30
+ > CARLA simulator and is **not suitable for real-vehicle deployment**.
31
+
32
+ ## Model overview
33
+
34
+ | | |
35
+ | --- | --- |
36
+ | Task | End-to-end driving: camera images to ego trajectory, with predicted objects and map elements as auxiliary outputs |
37
+ | Architecture | VAD (vectorized scene representation), split into an image backbone and planning heads |
38
+ | Variant | `carla_tiny` (trained on Bench2Drive CARLA data) |
39
+ | Object classes | `car`, `van`, `truck`, `bicycle`, `traffic_sign`, `traffic_cone`, `traffic_light`, `pedestrian`, `others` |
40
+ | Map classes | `Broken`, `Solid`, `SolidSolid`, `Center`, `TrafficLight`, `StopSign` |
41
+ | Runtime | TensorRT (FP16 backbone, FP32 heads by default) via the `autoware_tensorrt_vad` ROS 2 node |
42
+ | Format | ONNX (Autoware builds the TensorRT engines locally on first launch) |
43
+ | Compatibility | `autoware_tensorrt_vad` >= 0.1.0, TensorRT >= 8.6, CUDA >= 11.4 |
44
+ | License | Apache-2.0 |
45
+
46
+ The network is split into three ONNX sub-models, matching how the node consumes them:
47
+
48
+ 1. **Backbone** (`vad-carla-tiny_backbone.onnx`): image feature extraction from the 6 camera images,
49
+ run in FP16 by default.
50
+ 2. **Head** (`vad-carla-tiny_head.onnx`): temporal planning head that consumes the backbone features
51
+ (`mlvl_feats.0`) together with previous-frame history, run in FP32 by default.
52
+ 3. **Head, no history** (`vad-carla-tiny_head_no_prev.onnx`): planning head used for the first frame,
53
+ when no temporal history exists yet, run in FP32 by default.
54
+
55
+ Key architecture parameters (from `vad-carla-tiny.param.json`): 640x384 model input per camera with ImageNet
56
+ RGB normalization, 106x200 (height x width) BEV grid with 256 feature channels, 3 transformer decoder layers, 300 object queries
57
+ (9 classes, 6 predicted trajectory modes over 6 timesteps), 100 map queries (6 classes, 20 points per polyline),
58
+ and 6 ego planning commands over 6 timesteps.
59
+
60
+ ## Files
61
+
62
+ | File | Description |
63
+ | --- | --- |
64
+ | `vad-carla-tiny_backbone.onnx` | Image feature extraction backbone |
65
+ | `vad-carla-tiny_head.onnx` | Temporal planning head (uses previous-frame history) |
66
+ | `vad-carla-tiny_head_no_prev.onnx` | Planning head for the first frame (no history) |
67
+ | `vad-carla-tiny.param.json` | Model package parameters: architecture, normalization, class definitions |
68
+ | `deploy_metadata.yaml` | Deployment metadata recording the artifact version of this repository |
69
+
70
+ > **TensorRT engines are not distributed here.** TensorRT engines are specific to the GPU architecture and
71
+ > TensorRT version they are built on and are not portable, so Autoware builds them locally from the ONNX files
72
+ > on first launch and caches them next to the ONNX files.
73
+
74
+ ## Inputs and outputs (as used by the node)
75
+
76
+ **Inputs**
77
+
78
+ | Topic | Message type | Description |
79
+ | --- | --- | --- |
80
+ | `~/input/image0..5` | `sensor_msgs/msg/Image` (raw or compressed) | Camera images in training order: FRONT, BACK, FRONT_LEFT, BACK_LEFT, FRONT_RIGHT, BACK_RIGHT |
81
+ | `~/input/camera_info0..5` | `sensor_msgs/msg/CameraInfo` | Camera calibration for cameras 0-5 |
82
+ | `~/input/kinematic_state` | `nav_msgs/msg/Odometry` | Vehicle odometry |
83
+ | `~/input/acceleration` | `geometry_msgs/msg/AccelWithCovarianceStamped` | Vehicle acceleration |
84
+
85
+ **Outputs**
86
+
87
+ | Topic | Message type | Description |
88
+ | --- | --- | --- |
89
+ | `~/output/trajectory` | `autoware_planning_msgs/msg/Trajectory` | Selected ego trajectory |
90
+ | `~/output/trajectories` | `autoware_internal_planning_msgs/msg/CandidateTrajectories` | All 6 candidate trajectories |
91
+ | `~/output/objects` | `autoware_perception_msgs/msg/PredictedObjects` | Predicted objects with future trajectories |
92
+ | `~/output/map` | `visualization_msgs/msg/MarkerArray` | Predicted map elements |
93
+
94
+ The camera order is fixed by the training data and must not be changed. The node remaps the CARLA object classes
95
+ to Autoware classes via `object_class_remapper_carla_tiny.param.yaml` (`car`/`van` to `CAR`, `truck` to `TRUCK`,
96
+ `bicycle` to `BICYCLE`, `pedestrian` to `PEDESTRIAN`, static classes and `others` to `UNKNOWN`).
97
+
98
+ ## Usage in Autoware
99
+
100
+ Autoware downloads these artifacts to `~/autoware_data/ml_models/vad/` (note: the local directory is named
101
+ `vad`, not `tensorrt_vad`), and the node loads them from `$(var model_path)/v0.1/` as configured in
102
+ `config/vad_carla_tiny.param.yaml`.
103
+
104
+ After setting up CARLA following the `autoware_carla_interface` instructions, launch the end-to-end VAD system
105
+ with:
106
+
107
+ ```bash
108
+ ros2 launch autoware_launch e2e_simulator.launch.xml \
109
+ map_path:=$HOME/autoware_data/maps/Town01 \
110
+ vehicle_model:=sample_vehicle \
111
+ sensor_model:=carla_sensor_kit \
112
+ simulator_type:=carla \
113
+ use_e2e_planning:=true
114
+ ```
115
+
116
+ The node itself is started via `vad_carla_tiny.launch.xml`, which defaults `model_path` to
117
+ `$HOME/autoware_data/ml_models/vad`. On first run it builds the TensorRT engines from the ONNX files, optimized
118
+ for the local GPU, and caches them for subsequent runs.
119
+ See the [package README](https://github.com/autowarefoundation/autoware_universe/tree/main/e2e/autoware_tensorrt_vad)
120
+ for the full parameter reference.
121
+
122
+ ## Training
123
+
124
+ The model was trained on CARLA simulation data from the Bench2Drive benchmark and deployed with NVIDIA's
125
+ DL4AGX TensorRT workflow:
126
+
127
+ - Architecture: [VAD](https://github.com/hustvl/VAD) (Jiang et al., arXiv:2303.12077)
128
+ - Training data / benchmark: [Bench2Drive](https://github.com/Thinklab-SJTU/Bench2Drive) (Jia et al., arXiv:2406.03877)
129
+ - Deployment / TensorRT optimization: [DL4AGX](https://github.com/NVIDIA/DL4AGX)
130
+
131
+ Initial release (v0.1) date: 2025-11-04. Further training details (epochs, exact frame counts) are not
132
+ publicly documented.
133
+
134
+ ## Limitations
135
+
136
+ - **Simulation-only training**: the model is trained exclusively on CARLA simulator data, which does not
137
+ capture the full complexity and variability of real-world driving. Do not deploy it on a real vehicle.
138
+ - **No dynamic mission control**: the current implementation lacks a high-level command interface, so the model
139
+ cannot switch driving behaviors (for example from "follow lane" to "turn right at the next intersection") at
140
+ runtime. The default command is `LANE_FOLLOW`.
141
+
142
+ ## Provenance
143
+
144
+ | | |
145
+ | --- | --- |
146
+ | Original source | `https://awf.ml.dev.web.auto/planning/models/tensorrt_vad/carla_tiny/v0.1/` |
147
+ | This repository | `AutowareFoundation/tensorrt_vad`, tag `v0.1` |
148
+
149
+ ## Citation
150
+
151
+ ```bibtex
152
+ @inproceedings{jiang2023vad,
153
+ title = {VAD: Vectorized Scene Representation for Efficient Autonomous Driving},
154
+ author = {Jiang, Bo and Chen, Shaoyu and Xu, Qing and Liao, Bencheng and Chen, Jiajie and Zhou, Helong and Zhang, Qian and Liu, Wenyu and Huang, Chang and Wang, Xinggang},
155
+ booktitle = {ICCV},
156
+ year = {2023}
157
+ }
158
+ @article{jia2024bench2drive,
159
+ title = {Bench2Drive: Towards Multi-Ability Benchmarking of Closed-Loop End-To-End Autonomous Driving},
160
+ author = {Jia, Xiaosong and Yang, Zhenjie and Li, Qifeng and Zhang, Zhiyuan and Yan, Junchi},
161
+ journal = {arXiv preprint arXiv:2406.03877},
162
+ year = {2024}
163
+ }
164
+ ```
165
+
166
+ ## References
167
+
168
+ - [1] Jiang et al., "VAD: Vectorized Scene Representation for Efficient Autonomous Driving", arXiv:2303.12077, 2023. Code: <https://github.com/hustvl/VAD>
169
+ - [2] Jia et al., "Bench2Drive: Towards Multi-Ability Benchmarking of Closed-Loop End-To-End Autonomous Driving", arXiv:2406.03877, 2024. Code: <https://github.com/Thinklab-SJTU/Bench2Drive>
170
+ - [3] NVIDIA DL4AGX, TensorRT optimization for autonomous driving workloads: <https://github.com/NVIDIA/DL4AGX>
deploy_metadata.yaml ADDED
@@ -0,0 +1 @@
 
 
1
+ version: v0.1
vad-carla-tiny.param.json ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "major_version": 0,
3
+ "minor_version": 1,
4
+ "model_name": "vad-carla-tiny",
5
+ "training_dataset": "Bench2Drive CARLA",
6
+ "release_date": "2025-11-04",
7
+ "description": "VAD model trained on Bench2Drive CARLA dataset with 6-camera surround view",
8
+
9
+ "image_normalization": {
10
+ "mean": [123.675, 116.28, 103.53],
11
+ "std": [58.395, 57.12, 57.375],
12
+ "format": "RGB",
13
+ "note": "ImageNet normalization statistics"
14
+ },
15
+
16
+ "input_specs": {
17
+ "target_image_width": 640,
18
+ "target_image_height": 384,
19
+ "num_cameras": 6,
20
+ "camera_order": ["FRONT", "BACK", "FRONT_LEFT", "BACK_LEFT", "FRONT_RIGHT", "BACK_RIGHT"]
21
+ },
22
+
23
+ "class_definitions": {
24
+ "map_classes": ["Broken", "Solid", "SolidSolid", "Center", "TrafficLight", "StopSign"],
25
+ "object_classes": ["car", "van", "truck", "bicycle", "traffic_sign", "traffic_cone", "traffic_light", "pedestrian", "others"]
26
+ },
27
+
28
+ "network_architecture": {
29
+ "bev": {
30
+ "height": 106,
31
+ "width": 200,
32
+ "feature_dim": 256,
33
+ "downsample_factor": 32
34
+ },
35
+ "transformer": {
36
+ "num_decoder_layers": 3
37
+ },
38
+ "prediction": {
39
+ "num_queries": 300,
40
+ "num_classes": 9,
41
+ "bbox_pred_dim": 10,
42
+ "trajectory_modes": 6,
43
+ "timesteps": 6,
44
+ "bbox_format": "[cx, cy, w, l, cz, h, sin, cos, vx, vy]"
45
+ },
46
+ "planning": {
47
+ "ego_commands": 6,
48
+ "timesteps": 6
49
+ },
50
+ "map": {
51
+ "num_queries": 100,
52
+ "num_classes": 6,
53
+ "points_per_polyline": 20
54
+ },
55
+ "vehicle_state": {
56
+ "can_bus_dim": 18
57
+ }
58
+ },
59
+
60
+ "model_files": {
61
+ "backbone": "vad-carla-tiny_backbone.onnx",
62
+ "head": "vad-carla-tiny_head.onnx",
63
+ "head_no_prev": "vad-carla-tiny_head_no_prev.onnx"
64
+ },
65
+
66
+ "compatibility": {
67
+ "autoware_tensorrt_vad_version": ">= 0.1.0",
68
+ "tensorrt_version": ">= 8.6",
69
+ "cuda_version": ">= 11.4"
70
+ }
71
+ }
vad-carla-tiny_backbone.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:04b925f2750fd1c4adf16b5aae9c149d0baa39185e99d141232ebe20bddba4da
3
+ size 98422204
vad-carla-tiny_head.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:31f49a592a764ce82bbe6e26d0bfc99dc8a9613628884dc73dd5e67521ff3e9e
3
+ size 149881872
vad-carla-tiny_head_no_prev.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6a89d479e0717b1e526f1aa3a1137c631a9ef854e810d0328a035aae11818c2a
3
+ size 149883556