/Accurate-Interpretable-VAD

Attribute-based Representations for Accurate and Interpretable Video Anomaly Detection

Primary LanguagePythonOtherNOASSERTION

Attribute-based Representations for Accurate and Interpretable Video Anomaly Detection

Official PyTorch Implementation of "Attribute-based Representations for Accurate and Interpretable Video Anomaly Detection".

PWC

PWC

PWC

interpretable VAD

1. Dependencies

python==3.7
torch==1.12.0+cu102

Download this file (195 MB npy file) and place it in the following path: ./data/shanghaitech/train/pose.npy.

2. Usage

2.1 Data download and Preparation

To download the evaluation datasets, please follow the instructions.

2.2 Data preparation

The training and testing datasets should be preprocessed according to the these instructions.

2.3 Feature Extraction

For extracting velocity and deep representations, run the following command:

python feature_extraction.py [--dataset_name]

Pose representations have already been provided by us.

2.4 Score calibration

To compute calibration parameters for each representation, run the following command:

python score_calibration.py [--dataset_name]

2.4 Evaluation

Finally, you can evaluate by running the following command:

python evaluate.py [--dataset_name] [--sigma]

We usually use --sigma=3 for Ped2 and Avenue, and --sigma=7 for ShanghaiTech.

You can download our set of representations for Ped2, Avenue and ShanghaiTech datasets from here.

3. Results

UCSD Ped2 CUHK Avenue ShanghaiTech
99.1% 93.6% 85.9%

Citation

If you find this useful, please cite our paper:

@article{reiss2022attribute,
  title={Attribute-based Representations for Accurate and Interpretable Video Anomaly Detection},
  author={Reiss, Tal and Hoshen, Yedid},
  journal={arXiv preprint arXiv:2212.00789},
  year={2022}
}