This repo is created for reproducibility and sharing the codes used for the paper, Traffic Anomaly Detection Via Conditional Normalizing Flow, published on The 25th IEEE International Conference on Intelligent Transportation Systems (IEEE ITSC 2022).
cite the paper:
@inproceedings{kang2022traffic,
title={Traffic Anomaly Detection Via Conditional Normalizing Flow},
author={Kang, Zhuangwei and Mukhopadhyay, Ayan and Gokhale, Aniruddha and Wen, Shijie and Dubey, Abhishek},
booktitle={2022 IEEE 25th International Conference on Intelligent Transportation Systems (ITSC)},
pages={2563--2570},
year={2022},
organization={IEEE}
}
All code for the paper is in the form of python file and are in the root directory. File descriptions:
Configurations:
- model configuration file: configs.json
- synthtetic test configuration file: ./config/syn_config.json
Data:
- pre-process the INRIX dataset (private): preprocess_inrix.py
- generate synthetic testing set based on ground-truth data: synthetic_gen.py
- functions related to data operations (e.g, load and preprocess data): load_data.py
Model:
- road segments clustering: clustering.py
- LSTM Encoder Decoder model: lstm_models.py
- conditional RealNVP: CondRealNVP.py
- Multi-layer perceptron classification: mlpclassifier.py
- Edit the configs.json and config/syn_config.json files to secify model and experiment configurations, then run
python experiment.py
- Trained model will be saved in the
experiments/Inrix/models/CondRealNVP/OPTICS/<cluster_id>
folder, evaluation metrics will be saved inexperiments/Inrix/logs/CondRealNVP/run1/OPTICS/<cluster_id>
. - Jupyter notebook for process and visualize experimental results is: experiments/process.ipynb
Existing experimental results for individual clusters can be found here. Please download, uncompress and the place the Inrix folder in experiments
, then you can visualize the results using the same process.ipynb notebook.