Skip to content

My main goal is to build an innovative technological solution that could detect sexual harassment in real-time, which is much needed to fill in the gap left void by traditional methods, by which I aim to create a safer work environment, overcome reporting hesitancy, support HR and legal management, reduce psychological and physical stress.

Notifications You must be signed in to change notification settings

gangeshbaskerr/Sexual-Harassment-Detection

Repository files navigation

Sexual-Harassment-App image-detection migrated-to-oneapibuilt-by-team-geeks GitHub last commit GitHub watchers


Inspiration

Throughout our lives, we've been exposed to countless reports and stories in newspapers and online platforms, underscoring the distressing prevalence of sexual harassment incidents. What strikes me even more profoundly is the significant reluctance victims often experience when reporting such incidents due to fears of retaliation or social stigma. This reporting hesitancy and the lack of practical technological solutions have intensified my resolve to address this critical issue. The absence of practical tools and measures to combat such behaviour compelled me to develop the "Sexual Harassment Detection at Workplace" project. The driving force behind this endeavour is not only to close the gap between the gravity of the problem and the available solutions but also to contribute to a safer and more inclusive work environment by harnessing the potential of innovative technological advancements.


Problem Statement

My main goal is to build an innovative technological solution that could detect sexual harassment in real-time, which is much needed to fill in the gap left void by traditional methods, by which I aim to create a safer work environment, overcome reporting hesitancy, support HR and legal management, reduce psychological and physical stress and do early detection and prevention.


Introduction

Recognizing and tackling harassment instances can be complex due to victim hesitation prompted by fear or stigma. We aim to develop a CNN-based model to detect workplace harassment, differentiating it accurately from normal behavior's in videos. Our solution leverages a CNN-based model to effectively detect harassment in videos, contributing to a safer workplace and fostering a culture of inclusivity.


Approach

Our model uses a CNN(Convolutional Neural Network) for detection since the dataset uses images using a Deep Learning model to make better detection. A dataset containing images will be used, out of which half will have harassment images, and the other half will show a normal work environment. We will follow an 80:20 split, where 80% of the images will be used for training our model, and the remaining 20% will be reserved for testing the model. To further enhance the accuracy of the detection system, we have implemented Transfer Learning techniques by leveraging pre-trained models such as VGG16, Xception, and others. These models have been trained on large-scale datasets and come with high accuracy levels.


Procedure

1️⃣ Pre-install all the required libraries

   1) OpenCV
   2) Keras
   3) Numpy
   4) Pandas
   5) OS

2️⃣ Understand the dataset

   As no solution was available to this problem before, this project had no existing dataset online.
   So, we had to create the dataset ourselves, which was a tedious process.
   it has 2 folder which are :
   1) yes - having 1000 pictures(Harassment)
   2) no - having 1000 pictures(Healthy work environment)

3️⃣ Data preprocessing

  1. preprocess the images from the yes and no folder.

  2. Resizing all the images to the same dimension (224,224,3)

  3. Convert the images into numpy arrays.

  4. The dataset will be split into training, validation, and testing sets.

4️⃣ Build and train the VGG16 model

The VGG16 model is designed and trained to classify images as either Harassment or Healthy.

5️⃣ Train the model using Intel OneAPI to get better results

How does OneApi provide better performance :

Today’s computer systems are heterogeneous and include CPUs, GPUs, FPGAs, and other accelerators. The different architectures exhibit varied characteristics that can be matched to specific workloads for the best performance. Having multiple types of compute architectures leads to different programming and optimization needs. oneAPI and SYCL provide a programming model, whether through direct programming or libraries, that can be utilized to develop software tailored to each of the architectures.

Advantages of using OneAPI :

  1. We can use Single code for both CPU and GPU (heterogeneous computing)
  2. To implement machine learning based IoT projects easily with less hardwares as the machine learning part happens in cloud
  3. To process files faster ie. it takes less time to run the epochs
  4. OneAPI allows users to transcend Hardware restrictions and provide better performance for low powered computers
  5. Accuracy will improve while using OneAPI

To migrate your project to OneAPI : click here! to get started

For reference : click here!

6️⃣ Save the model

   save the model to calculate the accuracy and loss

Accuracy and Loss

We did 80 epochs, to get a good accuracy from the model i.e. 98% for training accuracy and 97% for validation accuracy.


Output

Harassment

No Harassment


Learnings

  1. Building a CNN model using Intel oneDNN : OneAPI is an open-source software toolkit developed by Intel that simplifies the development of high-performance, heterogeneous applications. It allows developers to write code that can run efficiently on a variety of architectures, including CPUs, GPUs, and FPGAs. oneDNN (Deep Neural Network) is a part of oneAPI and is an optimized library for deep learning. It provides highly optimized building blocks for neural network models that run efficiently on a variety of hardware platforms.

  2. Machine Learning : How to use machine learning for identifiying the facial features from a drivers face to detect drowsiness.

  3. Convolutional Neural Network(CNN) : How to build, train and fine-tune convolutional neural networks for image and video classification.

  4. Preprocessinig the datasets : How to preprocess the data dowloaded from kaggle so that the machine learning could happen in a much better and efficient way.

  5. Team work : Collaborating and communicating effectively in a team to deliver a project.

  6. Understanding the need for a sexual harassment detection system These are just a few examples of the knowledge and skills that i likely gained while building this project. Overall, building a sexual harasssment detection model is a challenging and rewarding experience that requires a combination of technical expertise and knowledge .


Project Deployment

We have built an app using Flutter. Flutter helps Build, test, and deploy beautiful mobile, web, desktop, and embedded apps from a single codebase. It is a cross-platform app development framework by Google which goes hand in hand with the model to help ensure the safety of the user and other commuters.

As soon as the model detects drowsiness, the model will send an API request call to the client app, which notifies the user to take some rest and shows the navigation option to the nearest resting places. If the user isn't drowsy, the app will give 10 seconds buffer time within which the user can confirm that he isn't sleepy by pressing the prompt on the screen. If the user is drowsy he will get a option for getting driving assistance from the nearby driving service providers. If the user has been detected drowsy more than three times within 10 minutes, a notification is sent to the highway patrol and the nearby drivers as a concern for the safety of other drivers and the drowsy driver.


One more thing

  1. EARLY WARNING SYSTEM :

    Through behavioural analysis it predicts non-desirable behavioural patterns and warns potential threats.

  2. EMOTION AND INTENT ANALYSIS :

    Analyzes emotions and intentions in conversations, identifying subtle signs of manipulation, gaslighting, and emotional abuse.

  3. CULTURAL NORMALISATION :

    Adapt the model to different cultural contexts for multinational organizations.

  4. REALTIME ADAPTIVE LEARNING :

    Periodically re-train the model with new data to adapt to evolving and emerging harassment tactics.

  5. ENHANCING SOCIETAL IMPACT :

    Integrating advanced predictive machine learning models with a focus on addressing and resolving societal challenges.

  6. CONTEXTUAL DOMAIN EXPANSION AND ADAPTION :

    Expanding a model's capabilities to detect sexual harassment in various places and environments.


Conclusion

Through this project we can create a safer work environment, Support HR and Legal management, Reduce psychological and physical stress, early detection and prevention and overcome reporting hesitancy. If this project is used efficiently it may also lead to huge decrease in percentage of sexual harassment cases .

To view this project on Intel DevMesh : click here!


About

My main goal is to build an innovative technological solution that could detect sexual harassment in real-time, which is much needed to fill in the gap left void by traditional methods, by which I aim to create a safer work environment, overcome reporting hesitancy, support HR and legal management, reduce psychological and physical stress.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published