Skip to content

Linkanblomman/Fight_recognition

Repository files navigation

Fight recognition using pre-trained 3D ResNet implemented in PyTorch

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

Surveillance Camera Fight Dataset


Results

Project results using 3D ResNet-50 (fight_reco_3DCNNmodel.pth)

Fight gif noFight gif Fight gif


How to run it

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

  1. Go to Google Colab and sign in
  2. Open "Open Notebook" then go to "GitHub" tab and then search for "Linkanblomman" and choose repository "Linkanblomman/Fight_recognition"
  3. Pick a notebook and run it

Or

  1. Choose a notebook from Github
  2. Press the Colab button button then run it

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)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published