This repository is the official implementation of MoGuP .
MoGuP: Motion-Guided Prediction for Video Anomaly Detection
Viet-Tuan Le,
Yong-Guk Kim
- [11/24/2023] Pre-trained MoGuP models are released!
pip install -r requirements.txt
We evaluate MoGuP
on:
Dataset | Link |
---|---|
UCSD Ped2 | |
CUHK Avenue | |
ShanghaiTech |
A dataset is a directory with the following structure:
$ tree data
ped2/avenue
├── training
│ └── frames
│ ├── ${video_1}$
│ │ ├── 000.jpg
│ │ ├── 001.jpg
│ │ └── ...
│ ├── ${video_2}$
│ │ ├── 00.jpg
│ │ └── ...
│ └── ...
├── testing
│ └── frames
│ ├── ${video_1}$
│ │ ├── 000.jpg
│ │ ├── 001.jpg
│ │ └── ...
│ ├── ${video_2}$
│ │ ├── 000.jpg
│ │ └── ...
│ └── ...
└── ped2/avenue.mat
shanghaitech
├── training
│ └── frames
│ ├── ${video_1}$
│ │ ├── 000.jpg
│ │ ├── 001.jpg
│ │ └── ...
│ ├── ${video_2}$
│ │ ├── 00.jpg
│ │ └── ...
│ └── ...
├── testing
│ └── frames
│ ├── ${video_1}$
│ │ ├── 000.jpg
│ │ ├── 001.jpg
│ │ └── ...
│ ├── ${video_2}$
│ │ ├── 000.jpg
│ │ └── ...
│ └── ...
└── test_frame_mask
├── 01_0014.npy
├── 01_0015.npy
└── ...
- Object detecion: Cascade R-CNN
- Extracting optical flow frames: FlowNet2.0
Please first download the pre-trained model
Dataset | Pretrained Model |
---|---|
UCSD Ped2 | |
CUHK Avenue | |
ShanghaiTech |
python hybrid_train.py \
--cfg <path/to/config/file>
Once the training is done, run inference:
python hybrid_eval.py \
--cfg <path/to/config/file>
UCSD Ped22 | CUHK Avenue | |
If you make use of our work, please cite our paper.
@article{le2024mogup,
title={MoGuP: Motion-guided Prediction for Video Anomaly Detection},
author={Le, Viet-Tuan and Kim, Yong-Guk},
}