Ijraset Journal For Research in Applied Science and Engineering Technology
Authors: Pesaru Sreenidhi Reddy, Gandu Srijan, Siripurapu Sai Srimanth, M. Varalakshmi
DOI Link: https://doi.org/10.22214/ijraset.2024.62072
Certificate: View Certificate
Current stress detection systems mostly rely on sensors and survey forms. Sensors are expensive. Survey forms can be inaccurate. To solve these problems our system tries to predict stress from face using deep learning. Our system also predicts heart rate using camera.
I. INTRODUCTION
Stress is defined as a condition that arises due to pressure situations faced by human sin their day to day lives. Stress affects both the mind and the body. As World Health Organization (WHO) says(from [1]), It is a mental health issue which shows significant affect 25 percent of US citizens.
According to Palmer(from [2]), "Stress is defined as a complex psychological and behavioral condition when the person's demands are imbalanced and the way demands are met. "Also, the American Institute of Stress found that 80% of workers experience stress in their day-to-day work and need to manage stress. Stress handling must be given pivotal importance in today’s world. As symptoms of stress can range between minute to serious health conditions and from short term to chronic in many cases. It is reported that stress can lead to many health issues like anxiety, panic attacks, migraine, gut health issues, physical strain in various parts of the body, skin diseases and toll on blood pressure. Stress can affect a human internally and it is one of the most neglected issue in urban life.
The conventional method of measuring stress is by employing sensors or questionnaire that can be given to humans. Questionnaire is found to be ineffective in many cases around the world. So, there is a need in present order of the day to build a stress tracking and relieving system. To do such we need medical expertise and sensors. But it is time consuming and expensive to arrange the equipment.
The major drawback with sensors is the assembling of the system and the maintenance that is required for these sensors in order to collect values. On the other hand, using sensor to detect stress for large group of people is equally time consuming process. It requires a lot of effort and expert medical advice to use these sensors. So a more simplified and digital stress detection system is required to detect stress in an effortless manner.
Stress tracking and relieving system is a stress detection and heart rate prediction system which detects stress condition of a human by using stress model and deep learning techniques to detect heart rate.
II. LITERATURE SURVEY
In this work, Facial expression is used for stress discovery. The system is non-intrusive and is suitable to run in real- time.
A camera is employed to record a close anterior perspective of an individual as they work in front of the computer. Videotape captured is divided into three section sets of equal number of image frames are uprooted from each section similarly and are analysed.
The image analysis includes the computation of the variation in the position of the eyebrow from its mean position. The relegation of eyebrow from its position is calculated by surveying the image for the eyebrow coordinates. still, a determination is made regarding the discovery of stress for a person working at a computer, If an individual constantly exhibits signs of stress during successive time intervals preliminarily delineated. These images were processed in order to extract a feature (Eyebrow). The obtained results from image processing with suitable inputs were used to train linear regression model. The model is tested by the testing dataset.
The model now predicts the stress condition of the user. Hence, the user can now minimize the health risks in future.
2. “Stress detection using machine learning and deep learning” by K.V. Acharyulu, N. Sampath Kumar, K. Paavan Sampath, B. Yaswanth Reddy , G. Guna Sekhar from [4]
The system proposes three methods: eye blink detection, eye brow detection and Face emotion recognition. It also calculates the Eye Aspect Ratio (EAR), which is generally a numerical value when the eye is open and tends to zero when the eye closes. After the successful counting of the number of eye blinks, we take the number of eye blinks per minute and compare it with the normal human eye blinks per minute. Based on the comparison of the values with the threshold value, we determine whether the person is stressed or not.
Eye brow detection: System detects user’s eyebrow by capturing a live input image with the OpenCV library and using hyper parameters in the NumPy library we detect the eyebrow's structure. We identify the user's left and right eyebrows and compare them to the average position of the user's eyebrow in normal form. The thicker the brows, the easier the job to detect the eyebrow more efficiently and it leads to detect more accurate results, because the thickness of the eyebrows generally increases the detection rate efficiently calculates stress level by measuring the contraction and displacement of the brows from their normal position.
Face emotion detection: Facial emotion recognition generally involves predicting the stress level of the user by considering all eye, eyebrow, and facial structures.
Training, testing, and validation are critical steps in the machine learning workflow. A separate data set is required for each step. As a result, the entire data set is divided into training, validation and testing these will gradually produce the accurate results.
Numerous OpenCV and Keras functions were tested during the validation phase. The video frame is initially stored in a video object. By using NumPy, greyscale images are created. This resized image is used to feed the predictor. The maximum argument is printed. The schematic results are highly accurate after successfully training the algorithm and test the output with multiple faces for greater accuracy.
As the stress is the most important factor in human it is detected in three ways are eye blink method detects the blinks of an eye and calculated eyebrow detection of stress and indication of the person is stressed or not stressed.
3. “Stress detection using deep learning and IoT” by D. K. Yashaswini , Sachin S. Bhat , Y. S. Sahana , M. S. Shama Adiga , Shashank G. Dhanya from [5]
In this work, stress is detected based on the analysis of facial expression and the stress level using the pulse sensor. It makes use of a technique that allows us to train a model and analyze differences in predicting the features. The system uses a deep learning algorithm to achieve the expected results in the areas such as computer vision. A camera is used to capture the frontal view of the person while he/she is working in front of the computer. To detect an individual emotion in a picture frame and the decision on the stress level is captured. The captured image is then analyzed according to the variation in the position of the eyebrow from its mean position. Here, Convolutional Neural Network (CNN), a deep learning algorithm is used for automatic classification of images. It uses two models:
Convolutional Layer: When the input data enters a convolutional layer, the layer convolves each filter throughout the spatial dimensionality of the input which produces a 2D activation map. The scalar product for every value in the Kernel is calculated, as we glide through the input data.
IoT: Components used: The components used in this project are described in the following:
Arduino Mega: It is a microcontroller board which is based on AT mega 2560 micro-controller. It consists of 54 I/O digital pins along with 16 Analog pins. Out of 54 I/O pins, 15 are PWM (Pulse Width Modulation) pins.
Pulse Sensor: This module is used to detect the pulse rate of the body which can be used to find out the heart rate of a person.
Wi-Fi Module: A Wi-Fi module is a self-contained SOC which contains TCP/IP protocol stack which helps to give any micro-controller access to any Wi-Fi network.
4. “GSR based generic stress prediction system” By Divyanshu Jaiswal, Debatri Chatterjee, Arpan Pal, Ramesh Kumar Ramakrishnan, Mithun B S from [6]
In previous works to this work, GSR based person and task independent stress prediction model giving comparable accuracy across individuals was created. In this work, the size of the training dataset was increased and different set of features were selected through a voting based approach.
In total, they had 64 participants data for developing the stress prediction model.
To train the model, the fluctuation of the GSR reading was taken into consideration for the known data. Different users have different readings on the same GSR scale.
The mean GSR value was taken into consideration. Selected GSR signals were filtered using 4Hz low pass FIR filter as most of the useful information is contained within this band. Filtered signals were subdivided into number of non-overlapping windows of duration 30 seconds. A set of time domain, frequency domain and statistical features were calculated on each of these windows. Thus, minimum, maximum and number of peaks of these components were considered as features. Most important features were selected using Maximal Information Coefficient (MIC) algorithm. The training data was subdivided into training and validation sets using 75-25 split. Based on the MIC values, the features were arranged in descending order of magnitudes. Then by selecting top N features, the prediction accuracy, F-score and precision were calculated on the validation set.
Algorithms like Gradient boosted Trees (GBT), Random forest (RF) and AdaBoost classifiers are tried. Parameter tuning for these classifiers were performed and the model performance was judged through 10-fold cross validation on training data. It is observed that sensitivity was high for GBT classifier, whereas specificity was high for RF and Adaboost. To incorporate the advantages from all 3 classifiers, they adopted Voting approach. Model was evaluated across all the different weight combinations and the combination with maximum F-score were selected as final weights, which were [0.1, 0.3, 0.6] for GBT, RF and Adaboost respectively. observed that Voting2 approach provides a maximum accuracy and hence, we used this classifier for all further evaluations presented in the paper. In Voting2, the weights for the individual classifiers were obtained via grid search over the weight matrix with a resolution of 0.1 interval.
After applying the model on unseen data, results are obtained.
III. METHODOLGY
A. Proposed System
The stress tracking and relieving system aims at tracking stress and heart rate of the user without the use of any sensors. It uses a web cam for live detection and can capture image to find whether the user is stressed or not stressed. By using the option of live detection user can track their stress and heart rate simultaneously. Finally when the user obtains stress update and heart rate a health tip is given to the user by the system.
B. Proposed Algorithm
The system uses CNN for stress model and FFT(Fast Fourier transform) to detect heart rate.
2. Key components of CNN
a. Convolutional Layers: These layers apply convolutional operations to input images, using filters (also known as kernels) to detect features such as edges, textures, and more complex patterns. Convolutional operations help preserve the spatial relationships between pixels.
b. Pooling Layers: Pooling layers downsample the spatial dimensions of the input, reducing the computational complexity and the number of parameters in the network. Max pooling is a common pooling operation, selecting the maximum value from a group of neighboring pixels
c. Activation Functions: Non-linear activation functions, such as Rectified Linear Unit (ReLU), introduce non-linearity to the model, allowing it to learn more complex relationships in the data.
d. Fully Connected Layers: These layers are responsible for making predictions based on the high-level features learned by the previous layers. Each neuron in one layer is linked to every neuron in the following layer
e. FFT(Fast Fourier Transform): A Fast Fourier Transform (FFT) is an algorithm that computes the Discrete Fourier Transform (DFT) of a sequence, or its inverse (IDFT). Fourier analysis transforms a signal from its initial domain, typically time or space, into the frequency domain, and can also perform the reverse transformation. The technique, particularly through the use of Fast Fourier Transforms (FFT), finds extensive application across various disciplines of education.
f. Flask: Flask is a web framework that allows developers to build lightweight web applications quickly and easily with Flask Libraries. It was developed by Armin Ronacher, leader of the International Group of Python Enthusiasts(POCCO). It is basically based on the WSGI toolkit and Jinja2 templating engine. Flask is used in the system to integrate user interface with the models(backend).
Stress Tracking and Relieving System is built to predict stress in humans by monitoring images and live detection of users. The images and live detection videos are used to detect the stress of the user using machine Learning algorithm to detect stress. And also, heart rate is measured by the system and in addition to the healthcare suggestion is given by our system.
[1] WHO, www.WHO.com [2] Palmer S 1989 The Health and Safety Practitioner, 8 16-18 [3] Detection of Stress Using Image Processing and Machine Learning Techniques by Nisha Raichur, Nidhi Lonakadi, Priyanka Mural (International Journal of Engineering and Technology (IJET)) [4] Stress detection using machine learning and deep learning by K.V. Acharyulu, N. Sampath Kumar, K. Paavan Sampath, B. Yaswanth Reddy, G. Guna Sekhar(JETIR 2023 JETIR February 2023, Volume 10, Issue 2). [5] D. K. Yashaswini , Sachin S. Bhat , Y. S. Sahana , M.S. Shama Adiga, Shashank G. Dhanya, Stress detection using deep learning and IoT(IJRESM Volume-2, Issue-8, August-2019). [6] GSR based generic stress prediction system by Divyanshu Jaiswal, Debatri Chatterjee, Arpan Pal, Ramesh Kumar Ramakrishnan, Mithun B S (Conference: UbiComp/ISWC \'23: The 2023 ACM International Joint Conference on Pervasive and Ubiquitous Computing).
Copyright © 2024 Pesaru Sreenidhi Reddy, Gandu Srijan, Siripurapu Sai Srimanth, M. Varalakshmi. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
Paper Id : IJRASET62072
Publish Date : 2024-05-14
ISSN : 2321-9653
Publisher Name : IJRASET
DOI Link : Click Here