Flow Gated Network module based on Violence Detection project
model
- exported model in tf formatplots
- images with traning historytestset
- samples videos for testing
numpy==1.19.5
opencv-python==4.5.1.48
tensorflow==2.4.0
To evaluate/train model, you will need to download the required dataset:
If you want to evaluate/train model on different dataset, you will have to create directory structure as below:
├── dataset
│ ├── train
│ │ ├── Fight
│ │ │ ├── video0.avi
│ │ │ ├── video1.avi
│ │ │ ...
│ │ └── NonFight
│ │ ├── video0.avi
│ │ ├── video1.avi
│ │ ...
│ └── val
│ ├── Fight
│ │ ├── video0.avi
│ │ ├── video1.avi
│ │ ...
│ └── NonFight
│ ├── video0.avi
│ ├── video1.avi
│ ...
Training using our settings:
python train.py -m model_name -d path//to//dataset//dir//
Example of training with different settings:
python train.py -m model_name -d path//to//dataset//dir// -size 224 -frame_number 32 -epoch 100 --batch_size 16 --workers_number 8
Prediction using our trained weights:
python predict.py -m model_final --show
Prediction of first batch of the video:
python predict_on_batch.py -m model_final --source <source of the video>