Skip to content
/ MoGuP Public

MoGuP: This repo is the official implementation of "MoGuP: Motion-guided Prediction for Video Anomaly Detection".

Notifications You must be signed in to change notification settings

vt-le/MoGuP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 

Repository files navigation

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

Releases

No releases published

Packages