Action Recognition Model to detect Suspicious activities through Surveillance videos. Developed for the project "Armed, Injured and other Suspicious Activity Recognition using Drone Surveillance"1 as part of the internship at Bennet University (Leadingindia.ai).
https://www.kaggle.com/mateohervas/dcsass-dataset
Delete the second DCSASS Dataset folder and Labels folder
Python 3.10
ffmpeg
opencv-python==4.6.0.66
keras==2.8.0
numpy==1.24.2
pandas==1.4.1
matplotlib==3.5.1
scikit-learn==1.0.2
tensorflow==2.8.0
- First extract the dataset folder to the same folder as the repository
- The
utils
folder contains 3 python scripts to run - run
python utilties/resort_dataset.py
- run
python utilties/create_normal_class.py
- run
python utilties/preprocess.py
The train_set.ipynb
contains all functions needed to train model. Run all cells and adjust parameters in main()
function for training.
For our experiment we used slowfast model with batch size 8
, img_size 224
and frames 25
.
Our slowfast model trained on above settings for 100
epochs can be found here https://www.mediafire.com/file/8cupxxdo9kk936c/slowfast_finalmodel.hdf5/file.
- First load model or use existing model after training.
- Run
predictions()
giving the video to predict as input. We have provided some sample videos intest/
. You can also directly runprediction.py
, after manually changing input variable paths.
3DCNN : https://github.com/dipakkr/3d-cnn-action-recognition
Slowfast : https://github.com/facebookresearch/SlowFast
Keras - Slowfast : https://github.com/xuzheyuan624/slowfast-keras
Keras - i3D - https://github.com/dlpbc/keras-kinetics-i3d