Robotics
TensorRT
ONNX
autoware
ros2
autonomous-driving
motion-prediction
trajectory-prediction
simpl
Instructions to use AutowareFoundation/simpl_prediction with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- TensorRT
How to use AutowareFoundation/simpl_prediction with TensorRT:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
feat: add simpl_prediction v0.1 artifacts (from awf.ml.dev.web.auto/perception/models/simpl/v0.1.0)
Browse files- .gitignore +5 -0
- README.md +149 -0
- deploy_metadata.yaml +1 -0
- simpl.onnx +3 -0
.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,149 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
pipeline_tag: robotics
|
| 4 |
+
tags:
|
| 5 |
+
- autoware
|
| 6 |
+
- ros2
|
| 7 |
+
- autonomous-driving
|
| 8 |
+
- motion-prediction
|
| 9 |
+
- trajectory-prediction
|
| 10 |
+
- simpl
|
| 11 |
+
- tensorrt
|
| 12 |
+
- onnx
|
| 13 |
+
---
|
| 14 |
+
|
| 15 |
+
# SIMPL for Autoware (`simpl_prediction`)
|
| 16 |
+
|
| 17 |
+
Multi-agent motion prediction model for autonomous driving, used by the
|
| 18 |
+
[`autoware_simpl_prediction`](https://github.com/autowarefoundation/autoware_universe/tree/main/perception/autoware_simpl_prediction)
|
| 19 |
+
node in [Autoware](https://github.com/autowarefoundation/autoware).
|
| 20 |
+
|
| 21 |
+
The model follows the **SIMPL** [1] architecture (A Simple and Efficient Multi-agent Motion Prediction
|
| 22 |
+
Baseline for Autonomous Driving) and runs with TensorRT inside Autoware. It is exported as ONNX so it can be
|
| 23 |
+
deployed across hardware; Autoware builds the TensorRT engine from the ONNX file on first launch.
|
| 24 |
+
|
| 25 |
+
## Model overview
|
| 26 |
+
|
| 27 |
+
| | |
|
| 28 |
+
| --- | --- |
|
| 29 |
+
| Task | Multi-modal trajectory prediction for tracked traffic agents |
|
| 30 |
+
| Architecture | SIMPL [1] |
|
| 31 |
+
| Predicted agent classes | `VEHICLE`, `PEDESTRIAN`, `MOTORCYCLIST`, `CYCLIST`, `LARGE_VEHICLE` |
|
| 32 |
+
| Runtime | TensorRT (FP32 by default) via the `autoware_simpl_prediction` ROS 2 node |
|
| 33 |
+
| Format | ONNX (Autoware builds the TensorRT engine locally on first launch) |
|
| 34 |
+
| License | Apache-2.0 |
|
| 35 |
+
|
| 36 |
+
Autoware object labels are mapped to the model's agent classes as follows: `CAR` to `VEHICLE`, `PEDESTRIAN`
|
| 37 |
+
to `PEDESTRIAN`, `BICYCLE` to `CYCLIST`, `MOTORCYCLE` to `MOTORCYCLIST`, and `TRUCK` / `TRAILER` / `BUS` to
|
| 38 |
+
`LARGE_VEHICLE`. Only agents whose mapped label is listed in the node's `preprocess.labels` parameter are
|
| 39 |
+
predicted and published.
|
| 40 |
+
|
| 41 |
+
The following dimensions are fixed at ONNX export time (dynamic shape inference is not supported yet), and
|
| 42 |
+
the default node configuration matches them:
|
| 43 |
+
|
| 44 |
+
| Parameter | Symbol | Value |
|
| 45 |
+
| --- | --- | --- |
|
| 46 |
+
| Maximum number of agents | N | 50 |
|
| 47 |
+
| Past history length | T_past | 8 |
|
| 48 |
+
| Maximum number of map polylines | K | 300 |
|
| 49 |
+
| Maximum points per polyline | P | 10 |
|
| 50 |
+
| Number of prediction modes | M | 6 |
|
| 51 |
+
| Future horizon length | T_future | 80 |
|
| 52 |
+
|
| 53 |
+
## Files
|
| 54 |
+
|
| 55 |
+
| File | Description |
|
| 56 |
+
| --- | --- |
|
| 57 |
+
| `simpl.onnx` | SIMPL motion prediction network (ONNX) |
|
| 58 |
+
| `deploy_metadata.yaml` | Deployment metadata recording the artifact version of this repository |
|
| 59 |
+
|
| 60 |
+
> **TensorRT engines are not distributed here.** TensorRT engines are specific to the GPU architecture and
|
| 61 |
+
> TensorRT version they are built on and are not portable, so Autoware builds them locally from the ONNX file
|
| 62 |
+
> on first launch (or via `build_only:=true`).
|
| 63 |
+
|
| 64 |
+
## Inputs and outputs
|
| 65 |
+
|
| 66 |
+
**Network inputs**
|
| 67 |
+
|
| 68 |
+
- Agent histories: `N x D_agent x T_past` (past states of the tracked agents)
|
| 69 |
+
- Map points: `K x P x D_map` (lanelet map polylines)
|
| 70 |
+
- Relative pose encoding: `(N + K) x (N + K) x D_rpe`
|
| 71 |
+
|
| 72 |
+
**Network outputs**
|
| 73 |
+
|
| 74 |
+
- Predicted scores: `N x M` (confidence per agent and mode)
|
| 75 |
+
- Predicted trajectories: `N x M x T_future x D_trajectory`, where `D_trajectory` is `(x, y, vx, vy)` in the
|
| 76 |
+
agent local coordinate frame
|
| 77 |
+
|
| 78 |
+
**Node topics (as used by `autoware_simpl_prediction`)**
|
| 79 |
+
|
| 80 |
+
| Topic | Type | Direction |
|
| 81 |
+
| --- | --- | --- |
|
| 82 |
+
| `~/input/objects` | `autoware_perception_msgs/msg/TrackedObjects` | input |
|
| 83 |
+
| `~/input/vector_map` | `autoware_map_msgs/msg/LaneletMapBin` | input |
|
| 84 |
+
| `/localization/kinematic_state` | `nav_msgs/msg/Odometry` | input |
|
| 85 |
+
| `~/output/objects` | `autoware_perception_msgs/msg/PredictedObjects` | output |
|
| 86 |
+
|
| 87 |
+
Pre-processing (agent history accumulation, lanelet-to-polyline conversion) and post-processing (mode score
|
| 88 |
+
thresholding) run in the node, not in the ONNX graph.
|
| 89 |
+
|
| 90 |
+
## Usage in Autoware
|
| 91 |
+
|
| 92 |
+
The node expects the artifacts under `~/autoware_data/ml_models/simpl_prediction/` and launches with:
|
| 93 |
+
|
| 94 |
+
```bash
|
| 95 |
+
ros2 launch autoware_simpl_prediction simpl.launch.xml
|
| 96 |
+
```
|
| 97 |
+
|
| 98 |
+
Add `build_only:=true` to build the TensorRT engine from the ONNX as a one-off pre-task. The default
|
| 99 |
+
parameters (`config/simpl.param.yaml`) point to `simpl.onnx` in the data directory and use `fp32` precision.
|
| 100 |
+
See the [package README](https://github.com/autowarefoundation/autoware_universe/tree/main/perception/autoware_simpl_prediction)
|
| 101 |
+
for the full parameter reference.
|
| 102 |
+
|
| 103 |
+
## Training
|
| 104 |
+
|
| 105 |
+
The SIMPL architecture and reference training code originate from the upstream project:
|
| 106 |
+
|
| 107 |
+
- Original implementation: <https://github.com/HKUST-Aerial-Robotics/SIMPL>
|
| 108 |
+
- Paper: "SIMPL: A Simple and Efficient Multi-agent Motion Prediction Baseline for Autonomous Driving",
|
| 109 |
+
arXiv:2402.02519
|
| 110 |
+
|
| 111 |
+
An Autoware library to train and deploy SIMPL and other motion prediction models is work in progress, as
|
| 112 |
+
noted in the package README. The training data and training configuration used to produce the released
|
| 113 |
+
`simpl.onnx` weights are not publicly documented.
|
| 114 |
+
|
| 115 |
+
## Limitations
|
| 116 |
+
|
| 117 |
+
- The number of predictable agents is fixed at export time (`max_num_agent: 50`); dynamic shape inference is
|
| 118 |
+
not supported yet.
|
| 119 |
+
- Only agents whose label is contained in `preprocess.labels` are published; other road users are ignored.
|
| 120 |
+
- Predicted modes with a confidence score below `postprocess.score_threshold` are filtered out. If all modes
|
| 121 |
+
of an object are filtered, the published object contains no path, and the remaining mode confidences are
|
| 122 |
+
not guaranteed to sum to 100%.
|
| 123 |
+
- Agent history that is no longer observed in incoming callbacks is dropped, which resets prediction context
|
| 124 |
+
for reappearing agents.
|
| 125 |
+
|
| 126 |
+
## Provenance
|
| 127 |
+
|
| 128 |
+
| | |
|
| 129 |
+
| --- | --- |
|
| 130 |
+
| Original artifact source | `https://awf.ml.dev.web.auto/perception/models/simpl/v0.1.0/simpl.onnx` |
|
| 131 |
+
| Source version string | `simpl/v0.1.0` |
|
| 132 |
+
| Tag in this repository | `v0.1` (normalized from `v0.1.0`) |
|
| 133 |
+
| `simpl.onnx` SHA-256 | `ad5e03983193c4d188432f314334697d6a216e7ffc91fb651eee5d6e4c42f492` |
|
| 134 |
+
|
| 135 |
+
## Citation
|
| 136 |
+
|
| 137 |
+
```bibtex
|
| 138 |
+
@article{zhang2024simpl,
|
| 139 |
+
title = {SIMPL: A Simple and Efficient Multi-agent Motion Prediction Baseline for Autonomous Driving},
|
| 140 |
+
author = {Zhang, Lu and Li, Peiliang and Liu, Sikang and Shen, Shaojie},
|
| 141 |
+
journal = {arXiv preprint arXiv:2402.02519},
|
| 142 |
+
year = {2024}
|
| 143 |
+
}
|
| 144 |
+
```
|
| 145 |
+
|
| 146 |
+
## References
|
| 147 |
+
|
| 148 |
+
- [1] Zhang et al., "SIMPL: A Simple and Efficient Multi-agent Motion Prediction Baseline for Autonomous Driving", arXiv:2402.02519, 2024.
|
| 149 |
+
- [2] Original implementation: <https://github.com/HKUST-Aerial-Robotics/SIMPL>
|
deploy_metadata.yaml
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
version: v0.1
|
simpl.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ad5e03983193c4d188432f314334697d6a216e7ffc91fb651eee5d6e4c42f492
|
| 3 |
+
size 10762674
|