Code for paper GSAN: Graph Self-Attention Network for Learning Spatial-Temporal Interaction Representation in Autonomous Driving, which was published on IEEE Internet of Things Journal. And the link is https://ieeexplore.ieee.org/document/9474961.
To reference the code, please cite this publication:
@article{ye2021gsan,
title={GSAN: Graph Self-Attention Network for Learning Spatial-Temporal Interaction Representation in Autonomous Driving},
author={Ye, Luyao and Wang, Zezhong and Chen, Xinhong and Wang, Jianping and Wu, Kui and Lu, Kejie},
journal={IEEE Internet of Things Journal},
year={2021},
publisher={IEEE}
}
- For lane-changing prediction task, we choose the open-source High-way Drone (HighD) Dataset.
- For trajectory prediction task, we choose NGSIM I-80 and US-101 Dataset.
- Datasets(NGSIM us-101, i-80 and HighD) are not included in the repo, please download by yourself from the official website.
-
Install/Update python dependency library
pip install -r requirements.txt
-
Build the directory
python buildfolder.py
-
Get the data
-
Run all cells in
highD_data_process.ipynb
-
Get the data
-
Follow this introduction to pre-process the data and get following files:
- TestSet.mat
- TrainSet.mat
- ValSet.mat
-
Put these 3 files into
data/
folder.
-
Format the data to fit GSAN model
python datapreprocessing.py