Giter VIP home page Giter VIP logo

code-future-frame-prediction's Introduction

Future Frame Prediction

Pytorch implementation of video anomaly detection paper for CVPR 2018: Future Frame Prediction for Anomaly Detection โ€“ A New Baseline.
Most codes were obtained from the following GitHub page: [Link]
To understand the code, please refer to the Google Colab page (Korean): [Link]

I only trained the ped2 dataset, the result:

AUC USCD Ped2
original implementation 95.4%
this implementation 95.5%

The network pipeline.

ffp_pipe

Environments

PyTorch >= 1.1.
Python >= 3.6.
opencv
sklearn
Other common packages.

Prepare

  • Download the ped2 dataset and put it under the data folder.
USCD Ped2
Google Drive
  • Download the FlowNet2-SD weight and put it under the flownet/pretrained folder.
FlowNet2-SD.pth
Google Drive
  • Download the trained model and put it under the weights folder.
best_model_ped2.pth
Google Drive

Train

# default option.
python train.py --dataset=ped2 
# change 'seed'.
python train.py --dataset=ped2 --manualseed=50
# change 'max iteration'.
python train.py --dataset=ped2 --iters=60000
# change 'model save interval'.
python train.py --dataset=ped2 --save_interval=10000
# change 'validation interval'.
python train.py --dataset=ped2 --val_interval=1000
# Continue training with latest model
python train.py --dataset=ped2 --resume=latest_ped2

Evalution

# default option.
python eval.py --dataset=ped2 --trained_model=best_model_ped2
# change 'show heatmap'.
python eval.py --dataset=ped2 --trained_model=best_model_ped2 --show_heatmap=True
# change 'show roc_curve'.
python eval.py --dataset=ped2 --trained_model=best_model_ped2 --show_curve=True

Results

Validation results can be found on the path resultsby AUC graph.

AUC graph (ped2)
auc_graph

Evaluation results can be found on the path results/ped2/{best_iter} by ROC Curve, Anomaly Score, etc.

ROC Curve with AUC (ped2)
toal_auc_curve
Anomaly Score (ped2-04)
score_graph
Frame Comparison (ped2-04)
ffp_comparision

๐Ÿ“– Lecture Note

  • Frame-Prediction lecture note: [Link] (24.04.18)

code-future-frame-prediction's People

Contributors

skiddieahn avatar

Stargazers

 avatar  avatar Shanghui Deng avatar

Watchers

Kostas Georgiou avatar  avatar

Forkers

ad-yonsei

code-future-frame-prediction's Issues

FlowNetSD Training

Hello, thanks for your excellent work. Could you please tell me about the training method for FlowNet๏ผŸ

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.