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.
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.
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.
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.
1) OpenCV
2) Keras
3) Numpy
4) Pandas
5) OS
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)
-
preprocess the images from the yes and no folder.
-
Resizing all the images to the same dimension (224,224,3)
-
Convert the images into numpy arrays.
-
The dataset will be split into training, validation, and testing sets.
The VGG16 model is designed and trained to classify images as either Harassment or Healthy.
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 :
- We can use Single code for both CPU and GPU (heterogeneous computing)
- To implement machine learning based IoT projects easily with less hardwares as the machine learning part happens in cloud
- To process files faster ie. it takes less time to run the epochs
- OneAPI allows users to transcend Hardware restrictions and provide better performance for low powered computers
- Accuracy will improve while using OneAPI
To migrate your project to OneAPI : click here! to get started
For reference : click here!
save the model to calculate the 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.
![](https://private-user-images.githubusercontent.com/130077430/264636145-7dde241e-e9cd-4a49-8977-dcae1e12da3c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM4MjM2MjUsIm5iZiI6MTcyMzgyMzMyNSwicGF0aCI6Ii8xMzAwNzc0MzAvMjY0NjM2MTQ1LTdkZGUyNDFlLWU5Y2QtNGE0OS04OTc3LWRjYWUxZTEyZGEzYy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODE2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgxNlQxNTQ4NDVaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1iNjUyNjc1MTUwM2VkM2UxMmViY2RkNWU2MjQ0NmI2NGYzYmZmZDA0NWIyMDAyYTdlNTBjMWRhMmE5M2U1MGFiJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.hdguKFAJS5kTlg5xVlM1aNuVB8g-kVg-cEyhriwYGjI)
-
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.
-
Machine Learning : How to use machine learning for identifiying the facial features from a drivers face to detect drowsiness.
-
Convolutional Neural Network(CNN) : How to build, train and fine-tune convolutional neural networks for image and video classification.
-
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.
-
Team work : Collaborating and communicating effectively in a team to deliver a project.
-
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 .
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.
-
EARLY WARNING SYSTEM :
Through behavioural analysis it predicts non-desirable behavioural patterns and warns potential threats.
-
EMOTION AND INTENT ANALYSIS :
Analyzes emotions and intentions in conversations, identifying subtle signs of manipulation, gaslighting, and emotional abuse.
-
CULTURAL NORMALISATION :
Adapt the model to different cultural contexts for multinational organizations.
-
REALTIME ADAPTIVE LEARNING :
Periodically re-train the model with new data to adapt to evolving and emerging harassment tactics.
-
ENHANCING SOCIETAL IMPACT :
Integrating advanced predictive machine learning models with a focus on addressing and resolving societal challenges.
-
CONTEXTUAL DOMAIN EXPANSION AND ADAPTION :
Expanding a model's capabilities to detect sexual harassment in various places and environments.
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!