xmfcx commited on
Commit
e1bf164
·
verified ·
1 Parent(s): ed26342

feat: add bevfusion v2.0 artifacts (from awf.ml.dev.web.auto/perception/models/bevfusion/t4base_120m/v2)

Browse files
.gitignore ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ # Auto-generated TensorRT artifacts, built locally by Autoware from the ONNX
2
+ # files (see autoware_tensorrt_common). They are environment-specific
3
+ # (GPU arch + TensorRT version) and must not be committed to this repo.
4
+ *.engine
5
+ *.json
README.md ADDED
@@ -0,0 +1,144 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ pipeline_tag: object-detection
4
+ tags:
5
+ - autoware
6
+ - ros2
7
+ - autonomous-driving
8
+ - lidar
9
+ - camera
10
+ - point-cloud
11
+ - 3d-object-detection
12
+ - bevfusion
13
+ - tensorrt
14
+ - onnx
15
+ ---
16
+
17
+ # BEVFusion for Autoware (`bevfusion`)
18
+
19
+ 3D object detection models for LiDAR-only and camera-LiDAR fusion, used by the
20
+ [`autoware_bevfusion`](https://github.com/autowarefoundation/autoware_universe/tree/main/perception/autoware_bevfusion)
21
+ node in [Autoware](https://github.com/autowarefoundation/autoware).
22
+
23
+ The models follow the **BEVFusion** [1] architecture (MIT Han Lab) and run with TensorRT inside Autoware.
24
+ They are exported as ONNX so they can be deployed across hardware; Autoware builds the TensorRT engines from
25
+ the ONNX files on first launch. The sparse convolution backend corresponds to
26
+ [spconv](https://github.com/traveller59/spconv), executed at inference time through the
27
+ [spconv_cpp](https://github.com/autowarefoundation/spconv_cpp) TensorRT plugins that Autoware installs
28
+ automatically in its setup script.
29
+
30
+ ## Model overview
31
+
32
+ | | |
33
+ | --- | --- |
34
+ | Task | 3D object detection (oriented bounding boxes) from a LiDAR point cloud, optionally fused with multi-camera images |
35
+ | Architecture | BEVFusion (sparse-convolution LiDAR encoder, optional camera-to-BEV branch, transformer detection head) |
36
+ | Variant family | `t4base_120m` |
37
+ | Detected classes | `CAR`, `TRUCK`, `BUS`, `BICYCLE`, `PEDESTRIAN` |
38
+ | Runtime | TensorRT (FP16 by default) via the `autoware_bevfusion` ROS 2 node, with `autoware_tensorrt_plugins` for sparse convolution |
39
+ | Format | ONNX (Autoware builds the TensorRT engines locally on first launch) |
40
+ | License | Apache-2.0 |
41
+
42
+ ## Variants in this repository
43
+
44
+ | Variant | Modality | ONNX files used | Cameras |
45
+ | --- | --- | --- | --- |
46
+ | `bevfusion_lidar` | LiDAR only | `bevfusion_lidar.onnx` | 0 |
47
+ | `bevfusion_camera_lidar` | Camera-LiDAR fusion | `bevfusion_camera_lidar.onnx` + `bevfusion_image_backbone.onnx` | 6 (raw 1440x1080, ROI 576x384) |
48
+
49
+ Common model parameters for both variants (from the `ml_package_*.param.yaml` files): point cloud range
50
+ `[-122.4, -122.4, -3.0, 122.4, 122.4, 5.0]` m (roughly 120 m detection radius, matching the `t4base_120m`
51
+ family name), voxel size `[0.17, 0.17, 0.2]` m, `max_points_per_voxel: 10`, `num_proposals: 500`,
52
+ `out_size_factor: 8`, `use_intensity: false`.
53
+
54
+ Pre-processing (voxelization, multi-frame densification, optional image undistortion) and post-processing
55
+ (circle NMS, IoU NMS, yaw normalization, distance-based score thresholding, area-based class remapping) run in
56
+ the node, not in the ONNX graphs.
57
+
58
+ ## Files
59
+
60
+ | File | Description |
61
+ | --- | --- |
62
+ | `bevfusion_lidar.onnx` | Main network, `bevfusion_lidar` variant |
63
+ | `bevfusion_camera_lidar.onnx` | Main network, `bevfusion_camera_lidar` variant |
64
+ | `bevfusion_image_backbone.onnx` | Image backbone, used by `bevfusion_camera_lidar` |
65
+ | `ml_package_bevfusion_lidar.param.yaml` | Model parameters for `bevfusion_lidar` |
66
+ | `ml_package_bevfusion_camera_lidar.param.yaml` | Model parameters for `bevfusion_camera_lidar` |
67
+ | `detection_class_remapper.param.yaml` | Area-based class remapping (e.g. large car to truck/trailer) |
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 (or via `build_only:=true`).
73
+
74
+ ## Inputs and outputs (as used by the node)
75
+
76
+ **Inputs**
77
+
78
+ | Topic | Type | Description |
79
+ | --- | --- | --- |
80
+ | `~/input/pointcloud` | `sensor_msgs/msg/PointCloud2` | Input point cloud, `PointXYZIRC` layout as defined in `autoware_point_types` |
81
+ | `~/input/image*` | `sensor_msgs/msg/Image` | Input images (RGB8), camera-lidar variant only |
82
+ | `~/input/camera_info*` | `sensor_msgs/msg/CameraInfo` | Camera intrinsics, camera-lidar variant only |
83
+
84
+ **Output** is `~/output/objects` (`autoware_perception_msgs/msg/DetectedObjects`): oriented 3D boxes with class
85
+ and score. The node also publishes per-stage processing-time debug topics.
86
+
87
+ ## Usage in Autoware
88
+
89
+ The node expects these artifacts in `$HOME/autoware_data/ml_models/bevfusion/` and launches with, e.g.:
90
+
91
+ ```bash
92
+ ros2 launch autoware_bevfusion bevfusion.launch.xml \
93
+ model_name:=bevfusion_lidar \
94
+ model_path:=$HOME/autoware_data/ml_models/bevfusion
95
+ ```
96
+
97
+ `model_name` selects the variant (`bevfusion_lidar`, the default, or `bevfusion_camera_lidar`). Add
98
+ `build_only:=true` to build the TensorRT engines from the ONNX files as a one-off pre-task.
99
+ See the [package README](https://github.com/autowarefoundation/autoware_universe/tree/main/perception/autoware_bevfusion)
100
+ for the full parameter reference.
101
+
102
+ ## Training
103
+
104
+ The models were trained on TIER IV's internal database; the training data is not publicly available. The
105
+ consuming package README documents training on roughly 35k LiDAR frames for 30 epochs. Version-specific
106
+ training details for this `t4base_120m/v2` release are not publicly documented.
107
+
108
+ Related training and inference resources:
109
+
110
+ - Sparse convolution: <https://github.com/traveller59/spconv>
111
+ - Sparse convolution TensorRT plugins used by Autoware: <https://github.com/autowarefoundation/spconv_cpp>
112
+
113
+ ## Limitations
114
+
115
+ - Trained on TIER IV's internal sensor configurations; accuracy on a different LiDAR or camera setup (mounting
116
+ positions, beam count, camera count and resolution) can drop without fine-tuning.
117
+ - Only the five classes above are detected. Other road users fall outside the label set.
118
+ - The input point cloud must follow the `PointXYZIRC` layout defined in `autoware_point_types`.
119
+ - The consuming package notes that full integration of the camera-LiDAR fusion mode into the Autoware pipeline
120
+ is still future work; the model can be employed without changes as a LiDAR-only detector.
121
+
122
+ ## Provenance
123
+
124
+ | | |
125
+ | --- | --- |
126
+ | Original source | `https://awf.ml.dev.web.auto/perception/models/bevfusion/t4base_120m/v2/` |
127
+ | Hugging Face tag | `v2.0` |
128
+
129
+ ## Citation
130
+
131
+ ```bibtex
132
+ @inproceedings{liu2023bevfusion,
133
+ title = {BEVFusion: Multi-Task Multi-Sensor Fusion with Unified Bird's-Eye View Representation},
134
+ author = {Liu, Zhijian and Tang, Haotian and Amini, Alexander and Yang, Xinyu and Mao, Huizi and Rus, Daniela and Han, Song},
135
+ booktitle = {IEEE International Conference on Robotics and Automation (ICRA)},
136
+ year = {2023}
137
+ }
138
+ ```
139
+
140
+ ## References
141
+
142
+ - [1] Liu et al., "BEVFusion: Multi-Task Multi-Sensor Fusion with Unified Bird's-Eye View Representation", ICRA 2023, arXiv:2205.13542.
143
+ - [2] spconv, sparse convolution library: <https://github.com/traveller59/spconv>
144
+ - [3] spconv_cpp, Autoware's sparse convolution TensorRT plugin implementation: <https://github.com/autowarefoundation/spconv_cpp>
bevfusion_camera_lidar.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:aa78d2f219146cb1423287643bbef81666d429ddcde4432a2e51db3f212a7c68
3
+ size 44005211
bevfusion_image_backbone.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:799af1e486b5c1245c8e2783bc77522d49e4a6535320ae77eba1b0f829385797
3
+ size 136518191
bevfusion_lidar.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5c29087963bf2c4dc02bf45c29d459303be602d63f9b6adff22a75c9cfb459a6
3
+ size 33739070
deploy_metadata.yaml ADDED
@@ -0,0 +1 @@
 
 
1
+ version: v2.0
detection_class_remapper.param.yaml ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**:
2
+ ros__parameters:
3
+ allow_remapping_by_area_matrix:
4
+ # NOTE(knzo25): We turn all vehicles into trailers if they go over 3x12 [m^2].
5
+ # NOTE(knzo25): We turn cars into trucks if they have an area between 2.2 x 5.5 and 3.0 * 12.0 [m^2]
6
+ # row: original class. column: class to remap to
7
+ #UNKNOWN, CAR, TRUCK, BUS, TRAILER, MOTORBIKE, BICYCLE,PEDESTRIAN
8
+ [0, 0, 0, 0, 0, 0, 0, 0, #UNKNOWN
9
+ 0, 0, 1, 0, 1, 0, 0, 0, #CAR
10
+ 0, 0, 0, 0, 1, 0, 0, 0, #TRUCK
11
+ 0, 0, 0, 0, 1, 0, 0, 0, #BUS
12
+ 0, 0, 0, 0, 0, 0, 0, 0, #TRAILER
13
+ 0, 0, 0, 0, 0, 0, 0, 0, #MOTORBIKE
14
+ 0, 0, 0, 0, 0, 0, 0, 0, #BICYCLE
15
+ 0, 0, 0, 0, 0, 0, 0, 0] #PEDESTRIAN
16
+
17
+ min_area_matrix:
18
+ #UNKNOWN, CAR, TRUCK, BUS, TRAILER, MOTORBIKE, BICYCLE, PEDESTRIAN
19
+ [ 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, #UNKNOWN
20
+ 0.000, 0.000, 12.100, 0.000, 36.000, 0.000, 0.000, 0.000, #CAR
21
+ 0.000, 0.000, 0.000, 0.000, 36.000, 0.000, 0.000, 0.000, #TRUCK
22
+ 0.000, 0.000, 0.000, 0.000, 36.000, 0.000, 0.000, 0.000, #BUS
23
+ 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, #TRAILER
24
+ 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, #MOTORBIKE
25
+ 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, #BICYCLE
26
+ 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000] #PEDESTRIAN
27
+
28
+
29
+ max_area_matrix:
30
+ #UNKNOWN, CAR, TRUCK, BUS, TRAILER, MOTORBIKE, BICYCLE, PEDESTRIAN
31
+ [ 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, #UNKNOWN
32
+ 0.000, 0.000, 36.000, 0.000, 999.999, 0.000, 0.000, 0.000, #CAR
33
+ 0.000, 0.000, 0.000, 0.000, 999.999, 0.000, 0.000, 0.000, #TRUCK
34
+ 0.000, 0.000, 0.000, 0.000, 999.999, 0.000, 0.000, 0.000, #BUS
35
+ 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, #TRAILER
36
+ 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, #MOTORBIKE
37
+ 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, #BICYCLE
38
+ 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000] #PEDESTRIAN
ml_package_bevfusion_camera_lidar.param.yaml ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**:
2
+ ros__parameters:
3
+ class_names: ["CAR", "TRUCK", "BUS", "BICYCLE", "PEDESTRIAN"]
4
+ voxels_num: [1, 128000, 256000] # [min, opt, max]
5
+ point_cloud_range: [-122.4, -122.4, -3.0, 122.4, 122.4, 5.0] # [x_min, y_min, z_min, x_max, y_max, z_max]
6
+ voxel_size: [0.17, 0.17, 0.2] # [x, y, z]
7
+ num_proposals: 500
8
+ out_size_factor: 8
9
+ max_points_per_voxel: 10
10
+ use_intensity: false
11
+
12
+ d_bound: [1.0, 134.0, 1.4]
13
+ x_bound: [-122.4, 122.4, 0.68]
14
+ y_bound: [-122.4, 122.4, 0.68]
15
+ z_bound: [-10.0, 10.0, 20.0]
16
+ num_cameras: 6
17
+ raw_image_height: 1080
18
+ raw_image_width: 1440
19
+ img_aug_scale_x: 0.4
20
+ img_aug_scale_y: 0.4
21
+ roi_height: 384
22
+ roi_width: 576
23
+ features_height: 48
24
+ features_width: 72
25
+ num_depth_features: 95
26
+ image_feature_channel: 256
ml_package_bevfusion_lidar.param.yaml ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**:
2
+ ros__parameters:
3
+ class_names: ["CAR", "TRUCK", "BUS", "BICYCLE", "PEDESTRIAN"]
4
+ voxels_num: [1, 128000, 256000] # [min, opt, max]
5
+ point_cloud_range: [-122.4, -122.4, -3.0, 122.4, 122.4, 5.0] # [x_min, y_min, z_min, x_max, y_max, z_max]
6
+ voxel_size: [0.17, 0.17, 0.2] # [x, y, z]
7
+ num_proposals: 500
8
+ out_size_factor: 8
9
+ max_points_per_voxel: 10
10
+ use_intensity: false
11
+
12
+ d_bound: [1.0, 166.2, 1.4]
13
+ x_bound: [-122.4, 122.4, 0.68]
14
+ y_bound: [-122.4, 122.4, 0.68]
15
+ z_bound: [-10.0, 10.0, 20.0]
16
+ num_cameras: 0
17
+ raw_image_height: 0
18
+ raw_image_width: 0
19
+ img_aug_scale_x: 0.0
20
+ img_aug_scale_y: 0.0
21
+ roi_height: 0
22
+ roi_width: 0
23
+ features_height: 0
24
+ features_width: 0
25
+ num_depth_features: 0
26
+ image_feature_channel: 0