This is the official Pytorch implementation of our paper: "Inter-clip Feature Similarity based Weakly Supervised Video Anomaly Detection via Multi-scale Temporal MLP".
We use the extracted CLIP and I3D features for ShanghaiTech, UCF-Crime and XD-Violence datasets from the following works:
CLIP features for ShanghaiTech, UCF-Crime and XD-Violence
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
ucf-clip-test-10crop.list
anducf-clip-train-10crop.list
. -
Feel free to change the hyperparameters in
option.py
After the setup, simply run the following commands:
#train
python main.py --feature_extractor [clip/i3d] --dataset [shanghai/ucf/xd] --gpus 0
#test
python test_main.py --feature_extractor [clip/i3d] --dataset [shanghai/ucf/xd] --gpus 0