Using pre-trained models from 3D-ResNets-PyTorch and training them on Surveillance Camera Fight Dataset
Surveillance Camera Fight Dataset (Link)
- There are 300 videos in total as 150 fight + 150 non-fight
- Videos are 2-second long
- Only the fight related parts are included in the samples
Project results using 3D ResNet-50 (fight_reco_3DCNNmodel.pth)
Folder structure
fight_recognition
│
├── input
│ ├── test_data
│ └── video_data
│ ├── fight (directory of fight video files)
│ └── nofight (directory of nofight video files)
├── outputs
│ ├── model_prediction_on_video
│ └── snapshots
└── pretrained_models (directory of pre-trained models)
Run code
- Go to Google Colab and sign in
- Open "Open Notebook" then go to "GitHub" tab and then search for "Linkanblomman" and choose repository "Linkanblomman/Fight_recognition"
- Pick a notebook and run it
Or
NOTE! In order to access data in folder structure, Google Drive need to be mounted ("Mount Drive") in Colab. Also the path to the files need to be changed for each Colab notebook (current example path in colab notebooks: "/content/drive/My Drive/Colab_Notebooks/fight_recognition/")
GPU usage (change CPU to GPU): Runtime -> Change runtime type -> Hardware accelerator -> GPU
For more pre-trained models go to 3D-ResNets-PyTorch and then download from Pre-trained models section (Direct Google Drive link)