This repository is the official implementation of the paper: Cross City Traffic Flow Generation via Retrieval Augmented Diffusion Model
To run the code, you need to create a Python environment and install all dependencies with the following command (for Linux):
conda create -n craft python=3.9
conda activate craft
pip install -r requirements.txt
You can download the processed datasets from
Google Drive
and put them into ./cleared_data directory.
We used datasets from four cities, including Chicago (chi), Washington, D.C. (dc), Toronto (toronto) and New York City (ny). You can specify the source and target cities using the commands below, and complete the entire pipeline of training, generation, and testing.
python main.py --exp_id 0 --src_cities dc toronto ny --trg_cities chi --seq_length 24 --device cuda:0
Some modules in this repository use the following excellent open-source code projects, and we would like to express our heartfelt gratitude here.
