This is a Computer Vision project which aims to classify images containing violence.
Major Tech Stack:
->TensorFlow 2.1.0
->OpenCV
Note: To maintain the ennvironments, I highly recommend using conda.
git clone https://github.com/aitikgupta/violence_detection.git
cd violence_detection
conda env create -f environment.yml
conda activate {environment name, for eg. conda activate cv}
jupyter notebook Training_Model.ipynb {or you can use my trained model, link is below}
jupyter notebook Violence_Detection.ipynb
https://drive.google.com/file/d/1ib6zg_8kWmRQhkVFRszi3Y6r1fB5jR1a/view?usp=sharing
Note: If you choose to download my trained model, place the model.h5 file in the root directory.
The model is built using TensorFlow 2.1.0 with 1.5 hours training on GeForce GTX-1650 GPU. Last 4 layers of the VGG16 pretrained network were fine tuned, along with fully-connected layers.
Given image → find object name in the image It can detect any one of 1000 images It takes input image of size 224 * 224 * 3 (RGB image) Built using:
Convolutions layers (used only 33 size ) Max pooling layers (used only 22 size) Fully connected layers at end Total 16 layers
528MB
Visual Geometry Group VGG Homepage
Convolution using 64 filters
Convolution using 64 filters + Max pooling
Convolution using 128 filters
Convolution using 128 filters + Max pooling
Convolution using 256 filters
Convolution using 256 filters
Convolution using 256 filters + Max pooling
Convolution using 512 filters
Convolution using 512 filters
Convolution using 512 filters + Max pooling
Convolution using 512 filters
Convolution using 512 filters
Convolution using 512 filters + Max pooling
Fully connected with 4096 nodes
Fully connected with 4096 nodes
Output layer with Softmax activation with 1000 nodes