Skip to content

Latest commit

 

History

History
143 lines (117 loc) · 4.95 KB

README.md

File metadata and controls

143 lines (117 loc) · 4.95 KB

MoGuP

This repository is the official implementation of MoGuP Hits.

MoGuP: Motion-Guided Prediction for Video Anomaly Detection
Viet-Tuan Le, Yong-Guk Kim

Project Website

News

  • [11/24/2023] Pre-trained MoGuP models are released!

Setup

Requirements

pip install -r requirements.txt

We evaluate MoGuP on:

Dataset Link
UCSD Ped2 Google drive
CUHK Avenue Google drive
ShanghaiTech Google drive

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
    └── ...  

Data preprocessing

Evaluation

Please first download the pre-trained model

Dataset Pretrained Model
UCSD Ped2 Google drive
CUHK Avenue Google drive
ShanghaiTech Google drive

Usage

Training

 python hybrid_train.py \
    --cfg <path/to/config/file>

Evaluation

Once the training is done, run inference:

 python hybrid_eval.py \
    --cfg <path/to/config/file>

Visualization

UCSD Ped22 CUHK Avenue

Citation

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},
}