VISVESVARAYA TECHNOLOGICAL UNIVERSITY
BELAGAVI – 590018
A Report On
“Stress Detection System Using Deep Learning and Image
Processing”
Submitted in partial fulfilment of the requirements for the award of the degree
of
Bachelor of Engineering
In
Artificial Intelligence and Data Science Submitted
By :
MD ADIL KHATEEB (3DG23AD400)
MD RIZWAN (3DG22AD026)
SHEKH ALEEM (3DG23AD402)
SYED FAHAD (3DG22AD053)
Under the guidance of :
PROF. JAYA DIXIT
Government Engineering College, Bidar -585403
(Affiliated to VTU Belagavi, Recognized by AICTE, New Delhi & Approved by
Government of Karnataka)
2025-26
Government Engineering College Bidar
(Affiliated to VTU Belagavi, Recognized by AICTE, New Delhi & Approved by
Government of Karnataka)
DEPARTMENT OF ARTIFICIAL INTELLIGENCE AND DATA SCIENCE
CERTIFICATE
This is to Certified that the project work entitled “Stress Detection System Using Deep Learning
and Image Processing” carried out by MD ADIL KHATEEB (3DG23AD400) SHEKH ALEEM
(3DG23AD402) ,SYED FAHAD (3DG22AD053),MD RIZWAN (3DG22AD026) a bonafide
students of Government Engineering College Bidar in partial fulfillment for the award of
Bachelor of Engineering in Artificial Intelligence and Data Science in Government Engineering
College Bidar under the Visveswaraya Technological University(VTU), Belagavi during the year
2025-26. It is certified that all corrections indicated for Internal Assessment have been
incorporated in the Report .The project report has been approved as it satisfies the academic
requirements in respect of Project work prescribed for the said Degree.
Prof. Jaya Dixit Prof. Upasana Patil Prof. Jagadevi Methre
Guide Coordinator H.O.D
Abstract
Stress has become a major concern among working professionals, particularly in the IT industry,
where high workloads and tight deadlines often affect mental health. Traditional stress detection
methods such as surveys, questionnaires, and sensor-based systems are either subjective, time-
consuming, or expensive. To overcome these limitations, this project proposes a stress detection
system using deep learning and image processing.
The system uses the FER2013 dataset for training a Convolutional Neural Network (CNN) to
recognize human facial emotions such as happy, sad, angry, fear, and neutral. Detected emotions
are further classified into stress or no stress conditions. A Flask-based web application has been
developed with features like user authentication, dashboard, image upload, and live webcam
detection. Predictions are displayed with percentage confidence, and users can also download a
PDF report of results.
To enhance usability, the system integrates additional modules such as a chatbot for stress
management suggestions, a wellness diary for daily reflections, and motivational prompts when
stress is detected. The backend uses SQLite for storing user history, making the system lightweight
and portable.
This project provides a real-time, non-invasive, and cost-effective solution for stress detection and
wellness support, bridging the gap between manual surveys and expensive hardware-based
methods.
Stress Detection System Using Deep Learning and Image Processing
Table Of Content
Chapter-1 ............................................................................................................... 2
Introduction ........................................................................................................... 2
Chapter-2 ............................................................................................................... 3
Literature Survey ................................................................................................... 3
Chapter-3 ............................................................................................................... 5
Hardware and Software Requirements .................................................................. 5
3.1. Hardware Requirements .................................................................................................. 5
3.2. Software Requirements .................................................................................................... 5
Chapter-4 ............................................................................................................... 6
Problem Statement ................................................................................................ 6
Chapter-5 ............................................................................................................... 7
Methodology & System Design ............................................................................ 7
5.1 Methodology .................................................................................................................... 7
5.2 System Design ................................................................................................................. 7
5.3 System Architecture Diagram.......................................................................................... 8
References ............................................................................................................. 9
List of Figure
Fig. 5.1 System Architecture ..................................................................................................... 8
GEC Bidar 1| P a g e
Stress Detection System Using Deep Learning and Image Processing
Chapter-1
Introduction
Stress is a psychological and physiological response to demanding situations, and it has become a
growing concern in today’s fast-paced world. Among working professionals, particularly those in
the IT industry, stress levels are significantly high due to factors such as workload, deadlines,
irregular schedules, and constant pressure to perform. Long-term exposure to stress can lead to
reduced productivity, health problems, and burnout.
Existing stress detection methods are not very practical in real-world applications. Surveys and
questionnaires are subjective and time-consuming, while sensor-based approaches using EEG,
ECG, or wearables are costly, inconvenient, and require specialized equipment. Basic machine
learning approaches such as KNN or SVM have been tested, but they often fail to provide accurate
results in real-time scenarios.
With the advancement of Deep Learning and Image Processing, facial expression recognition has
emerged as a promising method for emotion and stress detection. Emotions such as happiness,
sadness, anger, fear, and surprise can be automatically detected using Convolutional Neural
Networks (CNNs) trained on large datasets like FER2013. These emotions can then be mapped
into stress or no stress categories.
This project presents a real-time, software-based stress detection system using deep learning and
image processing. It offers a Flask-based web application that allows users to log in, upload an
image, or use a live webcam for emotion detection. The system predicts the user’s emotional state
with percentage confidence and determines whether the user is stressed or not.
To make the solution more practical and user-friendly, additional features such as chatbot-based
guidance, wellness diary, and motivational suggestions have been integrated. Unlike traditional
systems, this project provides a low-cost, non-invasive, and real-time platform for stress detection
and management.
GEC Bidar 2| P a g e
Stress Detection System Using Deep Learning and Image Processing
Chapter-2
Literature Survey
• FER2013 Dataset (Goodfellow et al., 2013)
The FER2013 dataset, introduced by Goodfellow and colleagues, has become one of the
most widely used benchmarks for facial expression recognition. It contains 48×48
grayscale images of human faces labeled across seven emotions such as happiness, sadness,
anger, fear, surprise, disgust, and neutral. This dataset has been adopted by numerous
researchers due to its diversity and scale, but it is not without limitations. The images are
often low-resolution and suffer from variations in pose, lighting, and occlusion, which can
affect model accuracy. Despite these drawbacks, FER2013 provides a real-world challenge
that makes it suitable for testing the robustness of deep learning models.
• CNN Models for FER2013 (Khaireddin & Chen, 2021)
Khaireddin and Chen presented a study highlighting the effectiveness of Convolutional
Neural Networks (CNNs) for emotion recognition using FER2013. By applying deep
CNNs based on architectures such as VGG, the authors achieved significantly higher
accuracy compared to traditional machine learning algorithms like KNN or SVM. Their
findings emphasize that CNNs are better suited for image-based tasks because of their
ability to automatically learn spatial hierarchies of features. However, their work mainly
focused on improving classification accuracy on FER2013 and did not extend into building
real-time, user-friendly systems.
• Multimodal Stress Detection (Zhang et al., 2022)
Zhang and colleagues conducted research on multimodal stress detection, where multiple
inputs such as facial expressions, ECG signals, and voice features were combined. Their
experiments demonstrated that fusing different modalities improved accuracy and
robustness of stress detection systems. This highlights the potential of combining
physiological and behavioral signals to achieve better performance. However, the main
drawback is the requirement of expensive sensors and specialized hardware, which makes
the system less practical for everyday users or workplaces.
• Physiological Signal-Based Stress Detection (Mateos-García et al., 2023)
Another direction in stress research has been the use of physiological signals such as ECG
(electrocardiogram) and GSR (galvanic skin response). Mateos-García et al. explored
stress detection in drivers and found that physiological indicators are highly reliable for
capturing stress levels in real-time. Machine learning models trained on these signals
achieved strong performance. However, their limitation is the intrusiveness of wearable
devices and the difficulty of deploying them in non-medical, daily-use environments. This
further strengthens the case for camera-based, non-contact methods.
• Advances in Deep Learning for FER (Kopalidis et al., 2024)
Kopalidis and colleagues provided a comprehensive survey of recent advances in deep
learning models for facial emotion recognition. Their work reviewed architectures such as
ResNet, MobileNet, and attention-based CNNs, along with challenges in datasets like
FER2013. They concluded that while accuracy has improved drastically with deep CNNs,
there are still open issues such as sensitivity to illumination, pose variations, and
generalization across diverse populations. Importantly, they noted that most research is
limited to experimental benchmarks, with fewer works addressing real-world deploymen
• Emotion Recognition Surveys (Pereira et al., 2024)
GEC Bidar 3| P a g e
Stress Detection System Using Deep Learning and Image Processing
In their systematic review, Pereira et al. examined various image- and video-based emotion
recognition techniques. They discussed the full pipeline of detection, face alignment,
feature extraction, and classification, highlighting that deep CNN-based approaches
dominate the field. While their survey outlined strong progress in algorithmic accuracy,
they identified a gap: most works stop at classification and do not provide meaningful,
actionable feedback for end-users. This observation aligns with the need for integrated
applications that not only classify emotions but also assist in stress management.
GEC Bidar 4| P a g e
Stress Detection System Using Deep Learning and Image Processing
Chapter-3
Hardware and Software Requirements
Hardware Requirements
• Processor: Intel i5 / AMD Ryzen 5 or higher (for faster training and inference)
• RAM: Minimum 8 GB (16 GB recommended for smoother training)
• Storage: At least 20 GB free space (for datasets, models, and project files)
• Graphics Card (Optional but recommended): NVIDIA GPU with CUDA support (e.g.,
GTX 1650 or above) to accelerate deep learning model training
• Webcam: Integrated or external USB webcam for live emotion capture
• Monitor: Standard display to visualize results and reports
Software Requirements
• Operating System: Windows 10 / 11 (64-bit) or Linux (Ubuntu recommended for deep
learning training)
• Programming Language: Python 3.9+ (project developed using Python 3.13 in testing)
• Libraries / Frameworks:
• TensorFlow / Keras → For building and training CNN models
• OpenCV → For image preprocessing and webcam integration
• Scikit-learn → For baseline models like KNN and evaluation metrics
• NumPy, Pandas, Matplotlib → For data handling and visualization
• Flask → For web application development (user login, dashboard, integration)
• Flask-Login, SQLAlchemy → For authentication and database management
• ReportLab → For generating PDF reports of predictions
• Database: SQLite (lightweight, integrated database for storing user history and results)
• Editor/IDE: VS Code / PyCharm / Jupyter Notebook
• Browser: Chrome / Edge / Firefox (to run and test the Flask app UI)
GEC Bidar 5| P a g e
Stress Detection System Using Deep Learning and Image Processing
Chapter-4
Problem Statement
• Stress has become a significant concern in modern workplaces, especially in the IT sector
where employees face high workloads, tight deadlines, and irregular schedules. Prolonged
exposure to stress not only decreases efficiency and productivity but also leads to serious
mental health issues such as anxiety, depression, and burnout.
• Traditional stress detection methods have several limitations. Survey and questionnaire-
based approaches are subjective, time-consuming, and rely heavily on individual honesty.
Sensor-based techniques such as EEG, ECG, and wearable devices provide accurate
measurements but are costly, intrusive, and not feasible for large-scale or daily use. On the
other hand, classical machine learning methods such as K-Nearest Neighbor (KNN) and
Support Vector Machines (SVM) have been applied to stress detection but generally result
in lower accuracy and limited real-time performance.
• Hence, there is a clear gap for a real-time, software-based solution that is non-invasive,
cost-effective, and user-friendly. The proposed system aims to leverage deep learning and
image processing to automatically recognize emotions from facial expressions and
classify them into stress or no-stress categories. Additionally, the system should provide
meaningful outputs such as reports, recommendations, and interactive support to assist
users in managing stress more effectively.
GEC Bidar 6| P a g e
Stress Detection System Using Deep Learning and Image Processing
Chapter-5
Methodology & System Design
The proposed system for stress detection integrates deep learning models, image processing
techniques, and a web-based application to provide a complete, real-time solution. The
methodology is divided into the following steps:
5.1 Data Collection
• The FER2013 dataset is used for training and testing.
• The dataset contains grayscale facial images (48×48 pixels) labeled into seven emotions:
Happy, Sad, Angry, Fear, Disgust, Surprise, and Neutral.
• These emotions are later mapped to Stress or No Stress categories.
5.2 Preprocessing
• Input images are converted to grayscale to reduce complexity.
• Images are resized to 48×48 pixels for uniform input to the model.
• Pixel values are normalized (0–1 range) for faster training convergence.
• OpenCV Haar Cascade Classifier is used for face detection during live webcam capture.
5.3 Model Development
• A Convolutional Neural Network (CNN) is designed and trained on the FER2013 dataset.
• The CNN extracts spatial features of faces and classifies them into different emotions.
• A baseline KNN classifier was also implemented for comparison but showed lower
accuracy than CNN.
• The trained CNN model is saved as an .h5 file for integration with the Flask application.
5.4 Stress Classification
• Detected emotions are mapped into stress categories:
o Stress: Angry, Sad, Fear, Disgust
o No Stress: Happy, Neutral, Surprise
• A probability score is generated for each class, and the highest probability determines the
final output.
GEC Bidar 7| P a g e
Stress Detection System Using Deep Learning and Image Processing
5.5 Web Application (Flask)
• A Flask-based web app is developed with the following features:
o User authentication (login/register)
o Dashboard for uploading images or capturing webcam input
o Prediction results with percentage confidence
o Option to download PDF reports for personal records
o SQLite database integration to store user history
5.6. Additional Features
• Chatbot integration to provide stress-relief tips and suggestions.
• Wellness diary for users to log their mood daily.
• Motivational prompts for encouraging positive emotional states.
5.7. System Design
Fig. 5.1 System Architecture
GEC Bidar 8| P a g e
Stress Detection System Using Deep Learning and Image Processing
References
1. Goodfellow, I., Erhan, D., Carrier, P. L., Courville, A., Mirza, M., Hamner, B., … &
Bengio, Y. (2013). Challenges in representation learning: A report on three machine
learning contests. Neural Networks, 64, 59–63. (FER2013 dataset introduction)
2. Khaireddin, R., & Chen, Z. (2021). Facial Emotion Recognition: State of the Art
Performance on FER2013. arXiv preprint arXiv:2105.03588.
3. Zhang, J., Yin, Z., Chen, P., & Nichele, S. (2022). Emotion recognition using multimodal
data and machine learning techniques: A survey. Information Fusion, 59, 103–126.
4. Mateos-García, D., Villena-González, M., & Rodriguez-Bermudez, G. (2023). Driver
stress detection using physiological signals: A machine learning approach. IEEE
Transactions on Affective Computing.
5. Kopalidis, K., Papakostas, G. A., & Chamzas, C. (2024). Advances in deep learning-based
facial emotion recognition: A survey. Electronics, 13(2), 253.
6. Pereira, J. R., Silva, R. A., & Santos, M. M. (2024). Facial emotion recognition: A
systematic review of image- and video-based approaches. Computers, 13(7), 165.
GEC Bidar 9| P a g e