Real life Violenece Detection with oneAPI

Yokesh V

Yokesh V

Chennai, Tamil Nadu

This Project is for Real-Time Violence Detection deployed with oneAPI ...learn more

Project status: Concept

oneAPI, Artificial Intelligence

Intel Technologies
oneAPI

Code Samples [1]Links [1]

Overview / Usage

Machine learning is evolving day by day and is solving many real life problems that are life changing. One such application is violence detection which uses machine learning model trained with lots of videos including violence to detect violence in live stream and/or in pre-recorded video. Violence detection includes detection of physical beating, stabbing, robbery, firing of gun, riot, hijack, terrorist attack, etc. By developing a machine learning model to detect violence in videos and in live stream, we can assist emergency services like police, ambulance, fire engine, etc., in identifying potentially dangerous situations.

Methodology / Approach

Violence detection using transfer learning involves using a pre-trained Convolutional Neural Network (CNN) on a large dataset, such as ImageNet, and re-purposing it for the task of violence detection. The methodology involves fine-tuning the pre-trained model on a smaller dataset of violent and non-violent videos, and then testing the model on new, unseen videos. _**Transfer learning **_can significantly reduce the time and resources required for model training, as it leverages the pre-existing knowledge of the pre-trained CNN.

  • Dataset collection: Gather a dataset of videos containing both violent and non-violent scenes. The dataset should be balanced and diverse, containing videos with different lighting conditions, camera angles, and types of violence.
  • Data pre-processing: Convert the videos to a suitable format and resize them to a fixed resolution. Extract individual frames from the videos and create a dataset of images. Apply pre-processing techniques such as normalisation, resizing, and augmentation to improve the performance of the transfer learning model.
  • Selecting a pre-trained model: Choose a pre-trained model that has been trained on a large dataset of images or videos. Ideally, the pre-trained model should be designed for video analysis, such as the Two-Stream Convolutional Neural Network or the Temporal Segment Network.
  • Model customisation: Remove the last few layers of the pre-trained model and replace them with new layers that are designed for the specific task of violence detection. Freeze the weights of the pre-trained layers and only train the weights of the new layers. This process is known as fine-tuning.
  • Model training: Train the customised model on the pre-processed dataset. The model should have multiple convolutional layers followed by pooling and activation functions. The output of the final layer should be a binary classification of violence or non-violence.

Technologies Used

  • Transfer Learning
  • Keras
  • Numpy
  • Pandas
  • Scikit-learn
  • OpenCV

Repository

https://github.com/LalithNarayanan/real-life-violence-detection.git

Collaborators

There are no people to show.

Comments (0)