Skip to content

This project contains the source code and data for the paper titled "Adaptive Safety Performance Testing for Autonomous Vehicles with Adaptive Importance Sampling".

License

Notifications You must be signed in to change notification settings

THU-AI-Testing/Adaptive-Testing-AIS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Adaptive Safety Performance Testing for Autonomous Vehicles with Adaptive Importance Sampling

Introduction

This project contains the source code and data for the paper titled "Adaptive Safety Performance Testing for Autonomous Vehicles with Adaptive Importance Sampling".

Code Structure

Note that data/ and results/ are publicly available on the Hugging Face Hub.

|- data/
|- figures/
|- results/
    |- example_results/
|- utils/
    |- __init__.py
    |- comb_coef.py
    |- config.py
    |- evaluation.py
    |- extnp.py
    |- importance_function.py
    |- index.py
    |- state.py
    |- surrogate_model.py
    |- test.py
    |- train.py
analyze_wall_clock_time.py
bootstrap_ADRL.py
bootstrap_NADE.py
bootstrap_NDE.py
find_dangerous_states.py
generate_NADE.py
README.md
requirements.txt
results_analysis_left_turn.ipynb
results_analysis_overtaking.ipynb
run_left_turn.sh
run_overtaking.sh
run_test.sh
run_time.sh
test_ADRL_time.py
test_ADRL.py
test_NADE.py
test_NDE.py

Installation

Please create a new environment via conda and install the required packages as follows. Note that this project can be used on both Windows and Linux.

conda create -n adrl python=3.10
conda activate adrl
pip install -r requirements.txt

Then install a CUDA version of PyTorch, e.g.,

pip install torch==2.0.1+cu117 torchvision==0.15.2+cu117 torchaudio==2.0.2+cu117 --index-url https://download.pytorch.org/whl/cu117

Usage

Testing and Evaluation in Overtaking Scenarios

bash run_overtaking.sh

Testing and Evaluation in Unprotected Left-Turn Scenarios

bash run_left_turn.sh

Analyzing Running Time of the ADRL algorithm

bash run_time.sh

Quick Check of the Pipeline

For development, to quickly check the pipeline, please use

bash run_test.sh

Results Analysis

Please run results_analysis_overtaking.ipynb for results analysis of overtaking scenarios and results_analysis_left_turn.ipynb for unprotected left-turn scenarios, respectively. The example results are provided in results/.

Contributing

Any contributions are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Citation

Yang, J., Wang, Z., Wang, D., Zhang, Y., Lu, Q., & Feng, S. (2025). Adaptive safety performance testing for autonomous vehicles with adaptive importance sampling. Transportation Research Part C: Emerging Technologies, 179, 105256. https://www.doi.org/10.1016/j.trc.2025.105256

@article{yang2025adaptive,
  title={Adaptive safety performance testing for autonomous vehicles with adaptive importance sampling},
  author={Yang, Jingxuan and Wang, Zihang and Wang, Daihan and Zhang, Yi and Lu, Qiujing and Feng, Shuo},
  journal={Transportation Research Part C: Emerging Technologies},
  volume={179},
  pages={1--19},
  year={2025},
  publisher={Elsevier}
}

License

This code is licensed under the PolyForm Noncommercial License 1.0.0.

Developers

Jingxuan Yang ([email protected])

For help or issues using the code, please create an issue for this repository or contact Jingxuan Yang ([email protected]).

Contact

For general questions about the paper, please contact Shuo Feng ([email protected]).

About

This project contains the source code and data for the paper titled "Adaptive Safety Performance Testing for Autonomous Vehicles with Adaptive Importance Sampling".

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published