Complete Execution steps involved in this project
Chuttyboy opened this issue · 1 comments
AnomalyDetectionCVPR2018-Pytorch
Pytorch version of - https://github.com/WaqasSultani/AnomalyDetectionCVPR2018
Known Issues:
-
AUC is not exactly as reported in the paper (0.70 vs 0.75) - might be affected by the weights of C3D
-
Error happens while using python3 with anaconda ( I recommend you to use pipenv )
C3D Weights
I couldn't upload here the weights for the C3D model because the file is too big, but it can be found here:
https://github.com/DavideA/c3d-pytorch
Dataset (Optional)
Can be downloaded from:
https://www.dropbox.com/sh/75v5ehq4cdg5g5g/AABvnJSwZI7zXb8_myBA0CLHa?dl=0
Download it and save it as a " data " folder
Precomputed Features
Can be downloaded from:
https://drive.google.com/drive/folders/1rhOuAdUqyJU4hXIhToUnh5XVvYjQiN50?usp=sharing
Download and save it as " anomaly_features "
Execution steps :
1.Feature Extraction :
way 1: Download dataset from the above-given link
way 2: Extracting feature from dataset to run this command
Arguments:
- dataset_path - path to the directory containing videos to extract features for (the dataset is available for download above)
- model_type - which type of model to use for feature extraction (necessary in order to choose the correct pre-processing)
- pretrained_3d - path to the 3D model to use for feature extraction
python feature_extractor.py --dataset_path "path-to-dataset" --model_type "fe-model-eg-c3d" --pretrained_3d "path-to-pretrained-fe"
Run this command :
python feature_extractor.py --dataset_path data --model_type c3d --pretrained_3d pretrained/c3d.pickle
2.Training :
Arguments:
- features_path - path to the directory containing the extracted features (pre-computed features are available for download above, or supply your own features extracted from the previous stage)
- annotation_path - path to the annotations file (Available in this repository as
Train_annotations.txt
python TrainingAnomalyDetector_public.py --features_path "path-to-dataset" --annotation_path "path-to-train-annos"
Run this command :
python TrainingAnomalyDetector_public.py --features_path anomaly_features --annotation_path Train_Annotation.txt
Closing this as it is a copy of README.md