This is the implementation of our paper "Leveraging Unsupervised and Self-Supervised Learning for Video Anomaly Detection" (VISAPP 2023).
git clone https://github.com/devashishlohani/luss-ae_vad- Python 3.6
- PyTorch >= 1.7.0
- Numpy
- Sklearn
Use conda to install dependencies from requirements.yml
Download the datasets and put into dataset folder, like ./dataset/ped2/, ./dataset/avenue/, ./dataset/shanghai/
python train.py --dataset_type shanghaiSelect --dataset_type from ped2, avenue, or shanghai.
For more details, check train.py
- First fetch the pre-trained models from drive
- Place the model in
expfolder like./exp/shanghai/pre_trained/model_best.pth - Run the test script as shown below
python test.py --test_batch_size 4 --num_workers_test 4 --dataset_type shanghai --model_path exp/shanghai/pre_trained/model_best.pth For more details, check arguments in test.py
@inproceedings{lohani2023leveraging,
title={Leveraging Unsupervised and Self-Supervised Learning for Video Anomaly Detection},
author={Lohani, Devashish and Crispim-Junior, Carlos F and Barth{\'e}lemy, Quentin and Bertrand, Sarah and Robinault, Lionel and Tougne, Laure},
booktitle={18th International Conference on Computer Vision Theory and Applications},
volume={5},
pages={132--143},
year={2023},
organization={SCITEPRESS-Science and Technology Publications}
}