An Tensorflow Re-Implement Trial (Not Official) of CVPR 2019 "Object-centric Auto-Encoders and Dummy Anomalies for Abnormal Event Detection in Video" Paper Link
Recently, I haven't got the results as awesome as the paper mentioned .(maybe any porblem in the code, I will be appreciated that if you point it out!)
Something may need to be modified, but I have no time to do that
tensorflow >=1.5.0 ( I use tensorflow 1.10.0 )
scikit-learn
cyvlfeat ("conda install -c menpo cyvlfeat" recommended)
protoc (you should cd the project dir and them "protoc ./object_detection/protos/string_int_label_map.proto --python_out=." before you train/test)
cffi (if you want to use cffi to link the dynamic library
matlab (If you want to use matlab engie. I am using matalb r2018b, you should make sure the python API works)
vlfeat (If you want to use cffi/matlab, you should download(install) it before.)
Considering the author finish the work on Matlab with Vlfeat, there is no complete python version of version available now. So I
You can also
The Score below is calculated on the score files offered by the author.
AUC type | As the author | As Liu et.al |
---|---|---|
Avenue | 90.4% | 86.56% |
ShanghaiTech | 84.9% | 78.5645% |
The framework include Three Parts:
Use K OVC SVMs to calculate the anomaly score.
You can get the download link from github.com/StevenLiuWen/ano_pred_cvpr2018
Several paths you need to set as below:
PATH_FOR_SUMMARY_FOR_TENSORBOARD
Training process includes 3 steps:
python inference.py --gpu GPU --dataset avenue --dataset_folder YOUR_PATH_TO_FRAMES_FOLDER --frozen_graph YOUR_PATH_TO_OBJECT_DETECTION_MODEL_FROZEN_GRAPH --box_imgs_npy_path PATH_TO_STORE_FILE
python train.py --gpu GPU --dataset avenue --train CAE --box_imgs_npy_path PATH_TO_STORE_FILE --dataset_folder YOUR_PATH_TO_FRAMES_FOLDER
clustering and train the SVMs
python train.py --gpu GPU --dataset avenue --train SVM -box_imgs_npy_path PATH_TO_STORE_FILE --dataset_folder YOUR_PATH_TO_FRAMES_FOLDER --class_add True/False --norm 2/1/0
python test.py --gpu GPU --dataset avenue --model_path YOUR_CAE_MODEL_PATH --dataset_folder YOUR_PATH_TO_FRAMES_FOLDER --svm_model YOUR_PATH_TO_SVM_MODEL --class_add True/False --norm 2/1/0 --graph_path PATH_TO_FROZEN_GRAPH
The project is based on the paper of "Object-centric Auto-encoders and Dummy Anomalies for Abnormal Event Detection in Video"
If you find this useful, please cite works as follows:
misc{object_centrci_VAD,
author = {Jia-Chang Feng},
title = { A Implementation of {Obejct-Centric VAD} Using {Tensorflow}},
year = {2019},
howpublished = {\url{https://github.com/fjchange/object_centric_VAD}}
}