This repo contains the Pytorch implementation of our paper:
Dual Memory Units with Uncertainty Regulation for Weakly Supervised Video Anomaly Detection
Hang Zhou, Junqing Yu, Wei Yang
We use the extracted I3D features for UCF-Crime and XD-Violence datasets from the following works:
UCF-Crime 10-crop I3D features
You can also use the I3D model to extract features from preprocess.
The following files need to be adapted in order to run the code on your own machine:
- Change the file paths to the download datasets above in
list/XD_Train.list
andlist/XD_Test.list
. - Feel free to change the hyperparameters in
option.py
After the setup, simply run the following command:
start the visdom for visualizing the training phase
python -m visdom.server -p "port"(we use 2022)
Traing and infer for XD dataset
python xd_main.py
python xd_infer.py
Traing and infer for UCFC dataset
python ucf_main.py
python ucf_infer.py
We referenced the repos below for the code.
If you find this repo useful for your research, please consider citing our paper:
@article{URDMU_zh,
title={Dual Memory Units with Uncertainty Regulation for Weakly Supervised Video Anomaly Detection},
author={Zhou, Hang and Yu, Junqing and Yang, Wei},
booktitle = {Proceedings of the AAAI Conference on Artificial Intelligence (AAAI)},
year={2023}
}