Authors: Chaewon Park, MyeongAh Cho, Minhyeok Lee, Sangyoun Lee
This repository contains the official implementation of FastAno (2022 WACV) [Paper link]
The inference code and our pre-trained weights are available.
We propose spatial rotation transformation (SRT) and temporal mixing transformation (TMT) to generate irregular patch cuboids within normal frame cuboids in order to enhance the learning of normal features. Additionally, the proposed patch transformation is used only during the training phase, allowing our model to detect abnormal frames at fast speed during inference. Our model is evaluated on three anomaly detection benchmarks, achieving competitive accuracy and surpassing all the previous works in terms of speed.
Our inference speed is obtained by running FP32 model using a single Nvidia GeForce RTX 3090 without GPU warm-up. The FPS was computed by measuring the time from data preprocessing to calculating AUROC after all data had passed through the model, and then dividing it by the total number of frames in the test data folder. This process is found in the code.- conda environment
git clone https://github.com/codnjsqkr/FastAno_official.git
conda create -n fastano python=3.7.9
conda activate fastano
pip install -r requirements.txt
- Create [data] folder inside FastAno_official
- Download UCSD Ped2 dataset from this website and place it in [data] folder.
- The folder structure should look like this:
| Fastano_official
|---data
|-------ped2
|----------testing
|----------training
|----------ped2.mat
|---weights
- Pre-trained weights trained on UCSD Ped2 is located in FastAno_official/weights/ped2_best.pth
- Inference code
python main.py
Cite below if you find this repository helpful to your project:
@InProceedings{Park_2022_WACV,
author = {Park, Chaewon and Cho, MyeongAh and Lee, Minhyeok and Lee, Sangyoun},
title = {FastAno: Fast Anomaly Detection via Spatio-Temporal Patch Transformation},
booktitle = {Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision (WACV)},
month = {January},
year = {2022},
pages = {2249-2259}
}