This repo is the implementation of "TA-NET: Empowering Highly Efficient Traffic Anomaly Detection through Multi-Head Local Self-Attention and Adaptive Hierarchical Feature Reconstruction". By Junzhou Chen, Jiajun Pu, Baiqiao Yin, Ronghui Zhang, Jun Jie Wu
The original video data for the TAD dataset and the UCF-crime dataset can be obtained from the following links:
Since our TA-NET focuses on traffic anomaly detection, we constructed a subset of the UCF-crime dataset containing only traffic scenes, named UCF-crime-traffic. The file partitioning for UCF-crime-traffic can be obtained from UCF-crime-traffic index in this project:
Additionally, we also provide video features extracted by UniformerV2:
Note: Due to the limitations of our device, only the first 10 min features of training videos were extracted if it longer than 10 min.
Replace the path of dataset features and training sets in train_config.yaml
with yours.
Then, simply run the following commands:
python Code/train.py
Please find the model weights in the following:
Then, replace the paths of dataset features and model weight in test_config.yaml
with yours.
After the setup, simply run the following commands:
python Code/test.py
If you find this repo useful for your research, please consider citing our paper:
@ARTICLE{10457982,
author={Chen, Junzhou and Pu, Jiajun and Yin, Baiqiao and Zhang, Ronghui and Wu, Jun Jie},
journal={IEEE Transactions on Intelligent Transportation Systems},
title={TA-NET: Empowering Highly Efficient Traffic Anomaly Detection Through Multi-Head Local Self-Attention and Adaptive Hierarchical Feature Reconstruction},
year={2024},
volume={},
number={},
pages={1-13},
keywords={Feature extraction;Anomaly detection;Task analysis;Hidden Markov models;Supervised learning;Benchmark testing;Training;Feature extraction;anomaly detection;traffic anomaly detection;weakly supervised learning;multi-instance learning;transformer},
doi={10.1109/TITS.2024.3365820}}