This repository contains the official code for Controllable Collision Scenario Generation via Collision Pattern Prediction, a method for controllable collision scenario generation in autonomous driving.
Authors: Pin-Lun Chen, Chi-Hsi Kung, Che-Han Chang, Wei-Chen Chiu, Yi-Ting Chen
Affiliation: National Yang Ming Chiao Tung University
We introduce Collision Pattern, a compact and interpretable representation of the relative configuration between ego-attacker at the collision moment. Given a safe scenario, the user specifies collision type and time-to-accident (TTA) to predict collision pattern. This pattern guides the quintic motion planner to generate a feasible attacker trajectory that realizes the specified collision.
-
Linux ( Tested on Ubuntu 18.04 )
-
Python3 ( Tested on Python 3.8 )
-
PyTorch ( Tested on PyTorch 1.8.0 )
-
CUDA ( Tested on CUDA 11.1 )
-
GPU ( Tested on Nvidia RTX3090Ti )
-
CPU ( Tested on Intel Core i7-12700, 12-Core 20-Thread )
To preprocess our COLLIDE data into vectorized representation:
bash scripts/preprocessing_data.bash
To train the condition collision scenario generation model with COLLIDE:
bash scripts/train.bash
To generate prediction results:
python test.py
To generate video result based on .csv files created in the inference stage:
python plot_and_metric.py
@article{chen2025controllable,
title={Controllable Collision Scenario Generation via Collision Pattern Prediction},
author={Chen, Pin-Lun and Kung, Chi-Hsi and Chang, Che-Han and Chiu, Wei-Chen and Chen, Yi-Ting},
journal={arXiv preprint arXiv:2510.12206},
year={2025}
}
