0% found this document useful (0 votes)
4 views9 pages

Stress Detection Using Machine Learning and Image Processing

This document discusses a study on stress detection using machine learning and image processing techniques to identify stress levels in individuals, particularly in workplace settings. The proposed system aims to enhance stress management by incorporating live detection and periodic analysis, utilizing physiological markers such as heart rate and facial expressions. The research highlights the importance of addressing stress in the workforce to improve overall well-being and productivity.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views9 pages

Stress Detection Using Machine Learning and Image Processing

This document discusses a study on stress detection using machine learning and image processing techniques to identify stress levels in individuals, particularly in workplace settings. The proposed system aims to enhance stress management by incorporating live detection and periodic analysis, utilizing physiological markers such as heart rate and facial expressions. The research highlights the importance of addressing stress in the workforce to improve overall well-being and productivity.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Vol 13, Issue 03, MARCH/2022

ISSN NO:0377-9254
STRESS DETECTION USING MACHINE LEARNING
AND IMAGE PROCESSING
E. PADMA1, TALAPANENI PRAVEEN2and SHAIK KARIMULLA3
1
Assistant Professor, Computer Science and Engineering, SCSVMV, Kanchipuram
2
B.E Graduate (IV year), Computer Science and Engineering, SCSVMV, Kanchi-
puram
3
B.E Graduate (IV year), Computer Science and Engineering, SCSVMV, Kanchi-
puram

Abstract— The major goal of this one of the most used methods for detect-
study is to use vivid Machine Learning ing stress. This technique relies primari-
and Image Processing methods to identi- ly on individual responses; people will
fy stress in the human body. Our system be hesitant to communicate whether or
is an upgraded version of previous stress not they are worried. Automatically de-
detection systems that did not include tecting stress lowers the likelihood of
live detection or personal counselling, health problems and improves society's
but this system includes live detection well-being. This involves the creation of
and periodic analysis of employees, as a scientific approach for assessing stress
well as detecting physical and mental levels in people using physiological
stress levels in them and providing markers. Since stress is such a signifi-
proper stress management remedies via cant societal contribution, a variety of
a survey form. Our method is primarily approaches for detecting it have been
focused on stress management and cre- investigated. It enhances people's quality
ating a healthy and spontaneous work of life, according to Ghaderi Tal. Stress
environment for workers in order to get was assessed using data from respira-
the most out of them during working tion, heart rate (HR), face electromyog-
Hours. raphy (EMG), Galvanic skin response
Keywords— Facial Expressions, K- (GSR) foot, and GSR hand, with the
Nearest Neighbor Classifier, Stress, finding that parameters related to the
Stress prediction respiratory process are critical in stress
1. INTRODUCTION detection. Maria Viqueira et al. present a
Stress management systems are neces- method for anticipating mental stress
sary for detecting stress levels that affect that relies only on GSR as a physiologi-
our socio-economic situation. According cal sensor and uses a standalone stress
to the World Health Organization, stress detecting device. Electrocardiograms
is a mental health disorder that affects alone were utilized by David Liu and
one out of every four people (WHO). colleagues to predict stress levels
Mental and financial troubles, as well as (ECG). The effectiveness of multimodal
a lack of clarity at work, bad working sensors in detecting stress in working
relationships, despair, and, in extreme individuals is investigated experimental-
situations, death, are all symptoms of ly. Sensor data from pressure distribu-
human stress. This necessitates the pro- tion, heart rate, blood volume pulse
vision of therapy to help stressed people (BVP), and electro dermal activity is
manage their stress. While it is impossi- used in this investigation (EDA). In ad-
ble to totally eliminate stress, taking dition, an eye tracker sensor is used,
preventative measures may help you which analyses eye movements in con-
cope. Only medical and nection with stressors such as the Stroop
physiological peoples can now deter- word test and information regarding
mine whether or not someone is de- pick-up tasks.
pressor (stressed). A questionnaire is

www.jespublication.com Page No:417


Vol 13, Issue 03, MARCH/2022
ISSN NO:0377-9254
Nowadays, the IT industry is terns not visible in the image. This cate-
creating a new standard in the market by gory includes image processing, data
introducing new technology and goods. mining, machine learning, and datasets.
Employee stress levels were also found According to conservative estimates in
to set the bar high in this research. De- medical literature, stress is the cause of
spite the fact that many companies pro- 50-80 percent of all physical diseases.
vide mental health benefits to their Stress is regarded to be the major cause
workers, the problem remains out of of cardiovascular disease. Stress is asso-
control. In this study, we attempt to go ciated to diabetes, ulcers, asthma, mi-
further into the topic by attempting to graine headaches, skin issues, epilepsy,
identify stress patterns in working em- and sexual dysfunction. Each of these
ployees in businesses. We plan to use conditions, as well as a slew of others,
image processing and machine learning has a psychosomatic basis (i.e., induced
methods to analyse stress patterns and or exacerbated by mental factors like
narrow down the elements that greatly stress). There are three impacts of stress:
influence stress levels. Machine learning
approaches such as KNN classifiers are  Guilt, humiliation, anxiety, an-
used to categorise stress. The employee's ger, and frustration are some of
picture is snapped by the camera, which the subjective symptoms of
acts as input, and image processing is stress. Individuals may also ex-
employed at the first step for detection. perience fatigue, tenseness,
Picture processing is used to improve an nervousness, irritability, moodi-
image or extract relevant information ness, or loneliness.
from it by converting the image to digi-  Behavioural impacts of stress
tal form and executing operations on it. indicate visible changes in a
By taking a picture from video frames as person's behaviour. Increased
input and producing an image or attrib- accidents, drug or alcohol usage,
utes related with that image as output. out-of-context laughing, outra-
geous or argumentative behav-
Image processing consists of three phas- iour, extremely excitable
es: moods, and/or excessive eating
or drinking are all signs of be-
 Importing the image using photo havioural stress.
capture software
 Cognitive stress may cause a
 Analysing and altering the pic- decline in mental capacity, poor
ture judgment, impulsive choices,
 As a result of the output, a pic- forgetfulness, and/or hypersen-
ture that has been modified or a sitivity to criticism.
report based on image analysis.
Machine learning, which is an ap- 1.1 LITERATURE SURVEY
plication of artificial intelligence, gives 1. Detecting stress and anxiety in films
the system the capacity to autonomously using facial clues
learn and develop from self-experiences
without being explicitly designed (Arti- AUTHORS: G. Giannakakis, D.
ficial Intelligence). Machine Learning Manousos, F. Chiarugi
creates computer programs that can ac-
cess data and utilize it to learn for them- Through video-recorded face
selves. Explicit programming produces a clues, this research creates a framework
mathematical model based on "training for detecting and analyzing
data" to accomplish the work based on stress/anxiety emotional states. Through
predictions or judgments using Machine a range of external and internal stresses,
Learning. Image mining is a technique a complete experimental methodology
for extracting hidden data, associating was designed to produce systematic di-
picture data, and discovering new pat- versity in emotional states (neutral,

www.jespublication.com Page No:418


Vol 13, Issue 03, MARCH/2022
ISSN NO:0377-9254
calm, and stressed/anxious). In order to us to train a model and compare differ-
measure emotion expression more ob- ences in feature prediction. Theano is a
jectively, the study focused mostly on Python framework aimed at speeding up
non-voluntary and semi-voluntary facial the execution and development of the
signals. Eye-related events, mouth activ- linear regression model, which is em-
ity, head motion characteristics, and ployed as a deep learning technique in
heart rate assessed via camera-based this case. The results of the experiments
photo-plethysmography were also inves- reveal that the devised method works
tigated. In each experimental phase, a effectively with a generic model of all
feature selection technique was used to ages.
pick the most robust characteristics, fol-
lowed by classification algorithms that 3. Techniques for Predicting Stress in
discriminated between stress/anxiety Working Employees Using Machine
and neutral states with reference to a Learning
relaxed condition. In addition, a ranking AUTHORS: U. S. Reddy, A. V. Thota
transformation based on self-reports was and A. Dharun
presented to study the relationship be-
tween face attributes and a participant's Stress problems are a wide-
reported stress/anxiety level. Specific spread problem among today's working
facial signals generated from eye, IT professionals. Employees are more
mouth, head, and camera-based cardiac likely to experience stress when their
activity acquire excellent accuracy and lifestyles and work environments
are acceptable as discriminative markers change. Despite the fact that many sec-
of stress and anxiety, according to the tors and corporations provide mental
findings. health-related programs and attempt to
improve the office environment, the
2. Detection of Stress Using Image Pro- problem remains out of Control. In this
cessing and Machine Learning Tech- research, we will use machine learning
niques approaches to examine stress patterns in
AUTHORS: Nisha Raichur, Nidhi working people and to identify the ele-
Lonakadi, Priyanka Mural ments that have a significant impact on
stress levels. Data from the OSMI men-
Stress is an uncomfortable state tal health survey 2017 answers of work-
of emotional arousal that individuals ing professionals in the IT sector were
feel in settings such as sitting in front of used to help with this. After proper data
a computer for lengthy periods of time. cleaning and pre-processing, we used a
Computers have become a way of life; variety of Machine Learning approaches
we spend so much of our time on them to train our model. The accuracy of the
that we are more impacted by the ups models mentioned above was deter-
and downs they create. One cannot total- mined and compared. Among the mod-
ly avoid using computers for work, but els used, boosting had the best accuracy.
one should at least limit his or her use if Gender, family history, and the availa-
he or she is concerned about being bility of health benefits in the job were
stressed at a certain moment. Monitor- found as key characteristics that impact
ing a person's mental state while work- stress using Decision Trees. With these
ing in front of a computer for an extend- findings, businesses may focus their ef-
ed period of time is critical for their forts on reducing stress and providing a
safety. This research uses real-time non- more pleasant working environment for
intrusive movies to assess a person's their workers.
emotional state by analyzing their facial
expression. Each video frame contains a 4. A sternal ECG is used to classify
distinct feeling, and the stress level is acute stress using linear and non-linear
determined in the hours after the video heart rate variability analyses.
recording. We use a method that enables

www.jespublication.com Page No:419


Vol 13, Issue 03, MARCH/2022
ISSN NO:0377-9254
AUTHORS: Tanev, G., Saadi, D.B., meant to promote formal self-reporting
Hoppe, K., Sorensen, H.B and give data for our model. In a small-
scale user research, we gather wearable
The diagnosis of chronic stress sensing data in an office setting to assess
is crucial in predicting and lowering the our technology. Our trials have shown
risk of cardiovascular disease. This pro- encouraging results, enabling us to accu-
ject is pilot research with the goal of rately distinguish different types of emo-
establishing a technique for identifying tions.
short-term psychophysiological altera-
tions using HRV properties. The goal of 2. Project Description
this pilot project is to identify and ac-
quire insight into a collection of charac- 2.1 Problem Statement
teristics that might be utilized to detect
psychophysiological alterations associ- Image capturing is automated, so it col-
ated with chronic stress. Images, noises, lects photographs whenever a typical
mental activities, and rest were used to behavior occurs. The detecting of sys-
evoke four distinct forms of arousal, tem will be fooled. If the picture is dis-
which were then identified using linear torted while being captured, the system
and non-linear HRV characteristics from will provide incorrect findings. Contin-
electrocardiograms (ECG) obtained by ued picture capture results in massive,
the wireless wearable ePatch® recorder. useless datasets. Detection will become
Sample entropy, detrended fluctuation more time demanding or incorrect as a
analysis, and normalized high frequency result of the auto collected picture da-
features were used to get the greatest tasets.
identification rates for the neutral stage
2.2 Existing System
(90 percent), acute stress stage (80 per-
cent), and baseline stage (80 percent). It Work on stress detection in the present
was discovered that standardizing non- system is based on digital signal pro-
linear HRV variables for each partici- cessing, which takes into account of
pant was a crucial component in improv- galvanic skin reaction, blood volume,
ing classification outcomes. pupil dilation, and skin temperature.
Other research on this topic relies on a
5. Healthy Office: Using smartphones
variety of physiological signals and vis-
and wearable sensors, employees may
ual aspects (eye closure, head move-
recognize their moods at work.
ment) to assess a person's stress levels
AUTHORS: Zenonos, A., Khan, A., while they are at work. These measures,
Kalogridis, G., Vatsikas, S., Lewis, T., on the other hand, are obtrusive and un-
Sooriyabandara comfortable in practice. Every sensor
reading is compared to a stress index,
Workplace stress, anxiety, and which is a number that is used to deter-
depression are detrimental to employees' mine the amount of stress.
health and productivity, and they are
costly. Sensor technologies, such as Disadvantages of Existing System
smartphones and wearables with physio-
logical and movement sensors, have  Non-stationary temporal per-
been the focus of recent research in this formance commonly pigeon-
field. In this paper, we look at the feasi- holes physiological signals for
bility of deploying such gadgets for analysis, and the extracted char-
mood detection in the workplace. Every acteristics explicitly reveal the
two hours, we propose a new mood de- physiological signals' stress in-
tection framework that can recognize dex
five intensity levels for eight distinct  Different individuals may react
kinds of emotions. We also propose a or express differently under
smartphone app ('Healthy Office') that is stress, therefore it is difficult to

www.jespublication.com Page No:420


Vol 13, Issue 03, MARCH/2022
ISSN NO:0377-9254
discover a uniform pattern to  User:
characterize the stress emotion.
 The ECG signal is immediately The first may be registered by
analysed using the frequently the user. For future contact, he
used peak j48 technique. needed a valid user email and
cell phone number while regis-
tration. After the user has regis-
2.3 Proposed system tered, the customer may be acti-
vated by the administrator. After
To categorize stress, the suggested Sys-
the customer has been activated
tem Machine Learning techniques, such
by the admin, the user may log
as KNN classifiers, are used. The em-
into our system. The user must
ployee's picture is provided by the
first provide the system with an
browser, which acts as input, and Image
image as input. The image's at-
Processing is employed at the first step
tributes and relevant emotion
for detection. Picture processing is used
will be extracted using the Py-
to improve an image or extract relevant
thon package. It is also feasible
information from it by converting the
to recognize many faces in a
image to digital form and executing op-
same picture. The stress level
erations on it. By taking an image as
will be shown by facial expres-
input and producing an image or image-
sions such as sadness, anger,
related qualities as output. On the
and so on. After the picture pro-
rounder box, the emotions are represent-
cessing is complete, we will
ed. Angry, Disgusted, Fearful, and Sad
begin the live feed. We can also
are all stress indicators.
see the face expressions of
Advantages of Proposed System many people on the live broad-
cast. TensorFlow live stream is
 The output of image analysis is more accurate and faster than
a transformed image or a report. tensor flow live stream. After
 By providing proactive stress that, we'll import the dataset in
management solutions, the order to calculate the KNN clas-
Stress Detection System assists sification accuracy precession
workers in dealing with chal- scores.
lenges that cause stress.
 We'll take pictures of staff at  Admin: With his credentials, the
regular intervals, and then give administrator can log in. He
them the traditional survey may activate the users after log-
forms. ging in. Only the activated user
may access our apps. The admin
2.4 Module Description may dynamically set the pro-
ject's training and testing data in
The following modules are used in this the code. In a hidden frame, the
admin may see all of the users'
project:
identified results. He can dis-
cern the emotions of the photos
 User by clicking a hyperlink on the
 Admin screen. The results of the K-
 Data Pre-process nearest neighbor classification
 Machine Learning (K-Nearest discovered may also be seen by
Neighbour Classification) the admin. The spreadsheet with
 Here, we will use haarcas- the data. We may extend the da-
taset size based on fictitious
cade_frontalface_default.xml
values by allowing authorized
(classifier) people to do so.

www.jespublication.com Page No:421


Vol 13, Issue 03, MARCH/2022
ISSN NO:0377-9254
 Data Pre-process: Dataset con-
tains a grid view of an existing
dataset with numerous proper-
ties; however, Property Extrac- Fig.1 Architecture
tion produces a newly designed
dataset with only numerical in-
put variables as a result of Prin-
cipal Component Analysis fea-
ture selection, which transforms
to six principal components:
Condition (No stress, Time
pressure, Interruption), Stress,
Physical Demand, Performance,
and Frustration.
 Machine Learning: K-Nearest
Neighbour (KNN) is a classifi-
cation and regression analysis
algorithm. It's a supervised
learning system for determining
whether or not a person need Fig. 2 Data Flow Diagram (DFD)
therapy. The dependent variable
is classified by KNN based on  A bubble chart is another name for
how similar it is to a comparable a DFD. It is a basic graphical for-
instance from previously col- malism that may be used to depict a
lected data. KNN A statistical system in terms of the data it re-
model with a binary dependent ceives, the processing it does on
variable is known as classifica- that data, and the data it generates
as output.
tion. KNN is used to estimate
 The data flow diagram is one of the
the parameters of a KNN model most important modelling tools
in classification analysis. A bi- (DFD). It's used to symbolize the
nary KNN model, mathemati- numerous parts of the system.
cally, contains a dependent vari- These components include the sys-
able with two potential values, tem process, the data used by the
which is represented by an indi- process, an external entity that in-
cator variable, with the two val- teracts with the system, and the in-
ues labelled "0" and "1". formation flows in the system.
 DFD depicts how data flows
3. Project Design and Analysis through the system and is trans-
formed by a sequence of transfor-
mations. It's a graphical representa-
3.1 Architecture
tion of data flow and the changes
that occur when data goes from in-
put to output.
 DFD is sometimes referred to as a
bubble chart. At any level of ab-
straction, a DFD may be used to
depict a system. DFD may be di-
vided into levels, each representing
a different degree of information
flow and functional detail.

Algorithm:
1) Start

www.jespublication.com Page No:422


Vol 13, Issue 03, MARCH/2022
ISSN NO:0377-9254
2) Using a camera, capture the input  It is accomplished by designing
image/object. user-friendly data input panels
3) If the image/object is clear, it may that can manage enormous
be used as input, or it can be told to
amounts of data. The purpose of
be rechecked.
4) After the input picture has been
input design is to make data en-
recognized, it displays the ob- tering simpler and error-free.
ject/stress images in the form of The data entering panel is set up
emotions such as joyful, sad, furi- in such a manner that you may
ous, and so on. execute all of the data manipula-
5) Stop tions. It also allows you to see
your records.
3.2 Input Design  It will validate the data after it
The information system and the users has been input. Screens may be
are linked via the input design. It entails used as v input information.
defining data preparation criteria and Appropriate messages are sent
procedures for turning transaction data when required, ensuring that the
into a format that may be used. Pro- user is never caught off guard.
cessing may be done in one of two As a result, the goal of input de-
ways: by scanning a computer for data sign is to produce an easy-to-
from a written or printed document, or follow input layout.
by having individuals manually enter the 3.3 Output Design
data into the system. The goals of input
design are to decrease the quantity of A quality output is one that satisfies the
data needed, control mistakes, reduce end user's needs and shows information
delays, remove superfluous steps, and clearly. Any system's processing results
simplify the process. The input is meant are conveyed to users and other systems
to give security and convenience while through outputs. In output design, it's
maintaining confidentiality. The follow- decided how information will be dis-
ing aspects were considered by Input placed for immediate use, as well as the
Design: format. hard copy output. It is the most
 What data should be given as important and direct source information
input? to a user. The system's relationship with
 How should the data be orga- the user is improved via efficient and
nized or coded? intelligent output design.
 A conversation to assist opera-  Computer output should be built
tional people in offering feed- in an orderly, well-thought-out
back. manner; the proper output must
 How to prepare input valida- be generated while ensuring that
tions and what to do if a mistake each output part is designed in
occurs. such a way that users will find
the system easy to use. They
Objectives of input Design
should identify the exact output
 The process of translating a us- that is required to satisfy the cri-
er-oriented description of an in- teria while analysing and de-
put into a computer-based sys- signing computer output.
tem is known as input design.  Decide on how you'll deliver the
This design is critical for avoid- data.
ing data entry mistakes and di-  Create a paper, report or other
recting management in the right document that includes the in-
way for collecting accurate in- formation from the system.
formation from the computer-
ized system.

www.jespublication.com Page No:423


Vol 13, Issue 03, MARCH/2022
ISSN NO:0377-9254
An information system's output form References
should achieve one or more of the fol-
lowing goals. [1] Dharan, "Machine Learning
 Disseminate information regard- Techniques for Stress Predic-
ing previous actions, present tion in Working Employees,"
status, or future estimates. Madurai, 2018 IEEE Interna-
tional Conference on Compu-
 Alert people to significant
tational Intelligence and
events, opportunities, challeng-
Computing Research (IC-
es, or warnings.
CIC), Madurai, India, 2018,
 Initiate a reaction.
pp. 1-4
 Verify a decision. [2] Bhattacharyya, R., & Basu, S.
(2018). Retrieved from ‘The
4. CONCLUSION Economic Times’.
The Tension Detection System monitors [3] "Detection of Stress Using
collected photographs of authorized us- Image Processing and Ma-
ers to forecast stress in workers, making chine Learning Techniques,"
the system safe. When the authenticated by Nisha Raichur, Nidhi Lo-
user logs in, the picture capture is done nakadi, and Priyanka Mural,
automatically depending on a time peri- vol.9, no. 3S, July 2017.
od. Based on certain common conver- [4] "Stress and anxiety detection
sion and image processing processes, the using facial cues from vide-
acquired pictures are utilized to deter- os," Biomedical Signal Pro-
mine the user's stress. The system will cessing and Control, vol. 31,
then use Machine Learning algorithms pp. 89-101, January 2017. G.
to analyze the stress levels, resulting in Giannakakis, D. Manousos, F.
more efficient outcomes. Chiarugi
[5] Zenonos, A., Khan, A., Ka-
5. Future Enhancement logridis, G., Vatsikas, S.,
Lewis, T., Sooriyabandara,
In the health-care industry, biomedical M.
wearable sensors combined with Internet [6] Healthy office: Using
of Things technologies have shown to be smartphones and wearable
a winning combo. The advantages of sensors, employees may rec-
employing such gadgets have had a fa- ognize their moods at work.
vorable influence on both patients and In: Pervasive Computing and
clinicians. Early detection of medical Communication Workshops
issues, quicker medical aid through Re- (PerCom Workshops), 2016
mote Monitoring and Telecommunica- IEEE International Confer-
tion, an emergency alarm system to in- ence on. IEEE; 2016, p. 1–6.
form the caregiver and personal physi- [7] OSMI Mental Health in Tech
cian, and so on are only a few of its ben- Survey Dataset, 2017.
efits. By continuously monitoring and [8] Ghaderi, A., Frounchi, J.,
delivering frequent feedback on stress Farnam, A. Machine learning-
levels, the suggested work on constructing based signal processing using
a multimodal IoT system ensures to be a physiological signals for
better health aid for a person. In the future, it stress detection. In: 2015
would be interesting to expand on this work 22nd Iranian Conference on
by integrating additional physiological char- Biomedical Engineering (IC-
acteristics, such as an activity identification BME). 2015, p. 93–98.
system, and using machine learning ap- [9] Liu, D., Ulrich, M. Listen to
proaches to the construction of a stress de- your heart: Stress prediction
tection model.

www.jespublication.com Page No:424


Vol 13, Issue 03, MARCH/2022
ISSN NO:0377-9254
using consumer heart rate daily work. In: ´ International
sensors 2015; Symposium on Pervasive
[10] Nakashima, Y., Kim, J., Computing Paradigms for
Flutura, S., Seiderer, A., An- Mental Health. Springer;
dre, E., Stress recognition in 2015, p. 23–33.

www.jespublication.com Page No:425

You might also like