- [2025.07.09] π₯ We initiated this project and made both the code and data publicly available as open source.
- [2025.07.06] Our paper was accepted by ACM Multimedia 2025.
This project uses the following datasets for evaluation:
-
UCF-Crime: A large-scale dataset for real-world surveillance video anomaly detection, containing 1900 long untrimmed videos with 13 real-world anomalies.
Download link -
XD-Violence: A large-scale audio-visual dataset for violence detection in videos, comprising 4754 untrimmed videos covering 6 categories of anomalies.
Download link
Place the datasets in the directories specified by the code (e.g., src/event_seg/videos for input videos).
This project requires Python 3.10. It is recommended to use a virtual environment to manage dependencies.
-
Clone the repository:
git clone https://github.com/YihuaJerry/EventVAD.git
-
Install the packages required for event splitting:
conda create -n event_seg python=3.10 conda activate event_seg cd src/event_seg pip install -r requirements.txt -
Install the packages required for video scoring:
conda create -n score python=3.10 conda activate score cd src/score pip install -r requirements.txt
Note: Make sure to activate the virtual environment before installing dependencies. The 'evaluate.py' script relies on the library in 'score'.
To run the entire pipeline, follow these steps:
-
Event Segmentation:
- Navigate to the event segmentation directory:
cd src/event_seg - Run the main script:
conda activate event_seg python main.py
- Navigate to the event segmentation directory:
-
Scoring:
- Navigate to the scoring directory:
cd src/score - Run the scoring script:
conda activate score python event_score.py
- Navigate to the scoring directory:
-
Evaluation:
- Run the evaluation script:
cd src conda activate score python evaluate.py
- Run the evaluation script:
Note: Ensure that the UCF-Crime and XD-Violence datasets are prepared and placed in the appropriate directories (e.g., src/event_seg/videos for input videos).
If you use this code or the EventVAD method in your research, please cite the following paper:
@article{shao2025eventvad,
title={Eventvad: Training-free event-aware video anomaly detection},
author={Shao, Yihua and He, Haojin and Li, Sijie and Chen, Siyu and Long, Xinwei and Zeng, Fanhu and Fan, Yuxuan and Zhang, Muyang and Yan, Ziyang and Ma, Ao and others},
journal={arXiv preprint arXiv:2504.13092},
year={2025}
}.png)
.png)