Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
24 views49 pages

Engineering Students' Depression Detection

Uploaded by

gaurav
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)
24 views49 pages

Engineering Students' Depression Detection

Uploaded by

gaurav
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/ 49

PROJECT REPORT ON

Automatic Depression Level Detection


SUBMITTED TO THE SAVITRIBAI PHULE PUNE UNIVERSITY,
PUNE IN THE PARTIAL FULFILLMENT FOR THE AWARD OF THE
DEGREE

BACHELOR OF ENGINEERING
IN
INFORMATION TECHNOLOGY
BY

Ms. Jagruti Vijay Katkhede B190428525


Mr. Aakash Sunil Patil B190428545
Ms. Vaishnavi Nagnath Patil B190428547
Mr. Tejas Mohan Puri B190428566

Under The Guidance of

PROF. ANURADHA P. KULKARNI

DEPARTMENT OF INFORMATION
TECHNOLOGY STES’s

SINHGAD INSTITUTE OF TECHNOLOGY,


LONAVALA,410401

2022-23
SINHGAD INSTITUTE OF TECHNOLOGY, LONAVALA

DEPARTMENT OF INFORMATION TECHNOLOGY

CERTIFICATE
This is to certify that the Project Entitled

Automatic Depression Level Detection

Submitted by
Ms. Jagruti Vijay Katkhede B190428525
Mr. Aakash Sunil Patil B190428545
Ms. Vaishnavi Nagnath Patil B190428547
Mr. Tejas Mohan Puri B190428566

is a bonafide work carried out by them under the supervision of Prof. Anuradha Kulkarni
and it is approved for the partial fulfillment of the requirement of Savitribai Phule Pune
University for the award of the Degree of Bachelor of Engineering (Information Technology)

This project report has not been earlier submitted to any other Institute or University for the
award of any degree or diploma.

Prof. Anuradha Kulkarni Dr. R. V. Babar


Internal Guide H.O.D
Dept. of Information Technology Dept. of Information Technology

Dr. M. S. Gaikwad
External Examiner Principal
Date: Sinhgad Institute of Technology,
Lonavala

Place:
Date:
Abstract

Depression is the most comprehensive mood ailment that has a notable influence on mental
health as well as hindrances in daily life. Machine learning models have contributed to the
field of emotion detection in all areas including audio, visual and internet based text data. The
idea directs at developing a machine learning based model utilizing images and video or live
footage as an input, to analyze the level of depression among users. Based on the analyzed
features the individual will be classified into either of the following depression categories:
Minimal, Mild, Moderate, Severe and that is measured by how much percentage predicted for
an individual. In the process of depression level detection, the two crucial components are
video input and the Beck Depression Inventory II. The solution generates as a result of the
correlation between emotion vector and inventory vector represented using visual graphics.

II
Acknowledgement

It gives us great pleasure in presenting the preliminary project report on ‘Automatic Depression
Level Detection’.
I would like to take this opportunity to thank my internal guide Prof. Anuradha Kulkarni
forgiving me all the help and guidance I needed. I am really grateful to them for their kind
support. Their valuable suggestions were very helpful.
I am also grateful to Dr. R. V. Babar, Head of Department, Information Technology, Sinhgad
Institute of Technology, for his indispensable support, suggestions.
In the end our special thanks to Dr. M. S. Gaikwad, Principal, Sinhgad Institute of
Technology, STES Campus, Lonavala, for his constant support throughout this project.

Thank you all for your encouragement!

Ms. Jagruti Vijay Katkhede


Mr. Aakash Sunil Patil
Ms. Vaishnavi Nagnath Patil
Mr. Tejas Mohan Puri

III
SPONSORSHIP LETTER

IV
INDEX
CERTIFICATE I
ABSTRACT II
ACKNOWLEDGEMENT III
SPONSERSHIP LETTER IV
INDEX V
LIST OF FIGURES & TABLES VII

1 INTRODUCTION 1
1.1 OVERVIEW 1
1.1.1 MOTIVATION 2
1.1.2 OBJECTIVE 2

2 LITERATURE SURVEY 3
2.1 STUDY OF RESEARCH PAPER 3
2.2 INCLUSION AND EXCLUSION CRITERIA 5

3 PROBLEM STATEMENT 6
3.1 PROBLEM STATEMENT DEFINITION 6

4 PROJECT REQUIREMENT 7
4.1 EXTERNAL INTERFACE REQUIREMENT 7
4.1.1 USER INTERFACE 7
4.1.2 HARDWARE INTERFACES 7
4.1.3 SOFTWARE INTERFACES 8
4.2 NONFUNCTIONAL REQUIREMENT 9
4.2.1 PERFORMANCE REQUIREMENTS 9
4.2.2 SAFETY REQUIREMENT 9
4.2.3 SOFTWARE QUALITY ATTRIBUTES 10

5 SYSTEM ANALYSIS 11
5.1 SYSTEM ARCHITECTURE 11
5.1.1 CONVOLUTIONAL NEURAL NETWORK 12

V
5.2 DATA FLOW DIAGRAM 16

5.3 UML DIAGRAMS 17


6 SOFTWARE INFORMATION 20

7 PROJECT PLAN 22

7.1 SYSTEM IMPLEMENTATION PLAN 22


7.2 PROJECT TIMELINE 23

8 RESULTS 24

8.1 TEST CASES 24

8.2 RESULTS AND PREDICTION 26

9 9 CONCLUSION AND FUTURE SCOPE 28


REFERENCES 29

PUBLICATIONS 30

VI
LIST OF FIGURES
5.1 System Architecture ......................................................................................... 11
5.2 Convolutional Neural Netwok................................................................................... 15
5.3 Data Flow (0) diagram...................................................................................... 16
5.4 Data Flow (1) diagram ..................................................................................... 16
5.5 Data Flow (2) diagram...................................................................................... 16
5.6 Class Diagram .................................................................................................. 17
5.7 Use case Diagram ............................................................................................. 17
5.8 Activity Diagram .............................................................................................. 18
5.9 Sequence Diagram ........................................................................................... 19
Result after Prediction ............................................................................................ 26
8.1 Main page ...................................................................................................................26
8.2 Registration Page........................................................................................................26
8.3 Login Page .................................................................................................................26
8.4 Prediction Page...........................................................................................................27
8.5 Live Camera Interface ................................................................................................27
8.6 Live Camera Interface ................................................................................................27

LIST OF TABLES
7.1 Project Implementation Plan ……………………………………………………22

7.2 Project Timeline Chart…………………………………………………………23

8.1 GUI Test Case………………………………………………………………………...24

8.2 Login Test Case………………………………………………………………………24

8.3 Registration Test Case…………………………………………………………………25

8.4 System Test Case………………………………………………………………………26

VII
CHAPTER 1

INTRODUCTION
Automatic Depression Level Detection

1 INTRODUCTION

1.1 OVERVIEW

Depression and anxiety disorders are highly prevalent worldwide. Attention to the
adverse effects of depression on patient health, as well as its associated economic burden has
been warranted. To support objective depression assessment, the affective computing
community engaged signal processing, computer vision and machine learning approaches for
analyzing verbal and nonverbal behavior of depressed patients and made predictions about
what patterns should be indicative of depressed state. These studies have analysed the
relationship between objective measures of voice, speech, non-verbal behavior and clinical
subjective ratings of severity of depression for the purpose of automatic depression
assessment. Despite major advances have been achieved in recent years, there are still several
open research directions to be solved in the study of depression: Audio and video features
from individual only concern the paralinguistic information, such as speaking rate, facial
action units(AUs), etc, rather than the linguistic information from the speaking content, which
can reflect the sleep status, emotional status, feeling and other life status of the individual. It
is important to explore more effective audio, visual, linguistic and other multi-modal features,
and design multi- modal fusion framework for depression recognition.
Due to the privacy issues, only limited depression datasets are currently available, and
there are barely pre-training models for depression. Moreover, these common- used
depression datasets also lack consistency. They have different languages, different durations,
different data types and different targets, which make them difficult to be combined to
increase the number of samples, therefore difficult to take advantage of deep models.
Adopting some data augmentation approaches to increase the number of samples are requisite
to improve the model performance.
Depression is a state of low mood and aversion to activity. From this perspective, the
study of depression should be closely related to affective state. However, the current
researches on depression and affective state are relatively independent. We hypothesize that
combining depression estimation and dimensional affective analysis simultaneously would
yield more powerful depression analysis

1
Sinhgad Institute of Technology, Lonavala – Information Technology (2022-2023)
Automatic Depression Level Detection

1.1.1 MOTIVATION

The Machine learning and artificial intelligence combined with mathematical modelling
are increasingly being used in mental health research to solve problems.
With the use of human-machine interaction, machine-based health estimate systems may
effortlessly follow a person's depressive level online.
Visual-based expression is crucial in developing an effective and practical depression detection
system and people can efficiently communicate their feelings by using facial expression.

1.1.2 OBJECTIVE

To Design and Implement Automatic Depression Level Detection Using Deep learning.
The following objectives have been identified to fulfil the aim of this thesis work:
• The aim of the system we propose is to continuously track human Depression level
and try to contain it within normal levels.
• To predict mood level or activity based on score with class label.
• To successfully implement the test model based on training set as deep learning approach.
• To execute the proposed system maximum accuracy.
• The main goal of this project is to detect Depressed of person or NOT

2
Sinhgad Institute of Technology, Lonavala – Information Technology (2022-2023)
CHAPTER 2

LITERATURE SURVEY
Automatic Depression Level Detection

2.1 STUDY OF RESEARCH PAPER

A research paper is a document of a scientific article that contains relevant ex- per- tise, including
substantive observations, and also references to a specific subject of philosophy and technique. Use-
secondary references are reviewed in literature and no current or initial experimental work is
published.

1. Paper Name : A Study and Comparison of Prediction Algorithms for Depression Detection among
Millennials : A Machine Learning Approach
Author :Madhurima Hooda,Aashie Roy Saxena.
Methodology :—Depression is a critical problem that can affect people in diverse ways. Various
treatment are there to treat people suffering from depression but challenge here is to predict those who
doesn’t even know that they are suffering from depression. So, to predict depression among people
certain models are prepared of which overview of three major models are given in this article: a) Using
Machine learning classifiers and WEKA, b) Using Imaging and Machine learning methods, c) Using
the Risk factors. Depressive disorder makes people unfit not only physically but men- tally also. In
future other methods can be tried for this prediction of depression for better accuracy.

2. Paper Name : Detection Possibilities of Depression and Parkinson’s disease Based on the Ratio of
Transient Parts of the Speech.
Author : Ga´bor Kiss, Artu´r Bendegu´z Taka´cs, Da´vid Sztaho´, Kla´ra Vicsi
Methodology : In this study it was investigated how the ratio of transient parts is affected in case of
depression and Parkinson’s disease. Overall 321 speech samples were examined from
healthy, depressed and Parkinson’s diseased speakers. The transient parts were detected in their speech
using an auto- matic transient detection method, and based on the detection, the ratio of the transient
parts (RoT) were calculated.

3. Paper Name: Clinical Depression Detection in Adolescent by Face


Author: Prajakta Bhalchandra Kulkarni, Minakshee M. Patil
Methodology : In our paper we introduces the method of depression detection which is harmless , easy
and more accurate without the help of a psychi- atrist. For implementation of a depression detection
method , two algorithms were used named as Fisher vector algorithm and LTrP. This method gives the
classification result in ‘Depressed’ or ‘Not depressed’ form.

3
Sinhgad Institute of Technology, Lonavala – Information Technology (2022-2023)
Automatic Depression Level Detection

4. Paper Name:Multimodal Spatiotemporal Representation for Automatic Depression Level Detection


Author:Mingyue Niu, Student Member, IEEE, Jianhua Tao, Senior Member, IEEE, Bin Liu, Member,
IEEE, Jian Huang, Student Member, IEEE, and Zheng Lian
Methodology :Physiological studies have shown that there are some differences in speech and facial
activities between depressive and healthy individuals. Based on this fact, we propose a novel Spatio-
Temporal Attention (STA) network and a Multi- modal Attention Feature Fusion (MAFF) strategy to
obtain the multimodal represen- tation of depression cues for predicting the individual depression
level. Experimental results on the AVEC2013 and AVEC2014 depression databases illustrate the
effectiveness of our method.

5. Paper Name:A novel depression detection method based on pervasive EEG and EEG splitting
criterion
Author : Jian Shen1,, Shengjie Zhao1, Yuan Yao1, Yue Wang1, Lei Feng
Methodology : Due to the highly complexity, nonlinearity and non-stationarity of
electroencephalogram (EEG) data in nature, we present a novel method for pervasive EEGbased
detection and di- agnosis of depression with the resting state eye-closed EEG data of Fp1, Fpz and Fp2
locations of scalp electrodes, which are closely related to emotion, collected through three-electrode
pervasive EEG collection device in this paper.

6. Paper Name : Multi-Modal Depression Detection and Estimation


Author:Le Yang
Methodology : The current work contains two parts: 1) In order to mitigate the impact of lack of data
on training depression deep models, we utilize Generative Adversarial Network (GAN) to augment
depression audio features, so as to improve depression severity estimation performance. 2) We
propose a novel FACS3DNet to integrate 3D and 2D convolution network for facial Action Unit
(AU)detection.

7. Paper Name :Quantification of depression disorder using EEG signal


Author : Mojtaba Hajian,Mohammad Hassan Moradi.
Methodology : This paper presents a method that estimates the beck’s index of each subject by
extracting specific features from the patient’s EEG signal. In order to quantify depression, an
algorithm has been designed and implemented that uses membership values obtained from the fuzzy
classifier and the support vector ma- chine(SVM).

4
Sinhgad Institute of Technology, Lonavala – Information Technology (2022-2023)
Automatic Depression Level Detection

8. Paper Name : Prediction of depression from EEG signal using (LSTM)


Author : S.Dhananjay Kumar,Subha DP .
Methodology : In this paper, LSTM (Long- short term memory) deep learning models are used in the
prediction of trends of depression for the next time instants, based on the features extracted. The
statisti- cal time-domain feature encompassing the mean of amplitude of the data is extracted
employing moving window segmentation from the acquired EEG signals.
9. Paper name : Automatic depression detection via facial expressions using multiple instance learning.
Author : Yanfei Wang , Jie Ma , Bibo Hao , Pengwei Hu , Xiaoqian Wang , Jing Mei
, Shaochun Li
Methodology : In this paper, we pro- pose a method that automatically detects depression using only
landmarks of facial expressions, which are easy to collect with less privacy exposure. We deal with the
coarse-grained labels i.e. one final label for the long-time series video clips, which is the common
cases in applications, through the integration of feature manipulation and multiple instance learning.
The effectiveness of our method is compared to other visual based methods, and our method even
outperforms multi-modal methods that use multiple modalities.

2.2 INCLUSION AND EXCLUSION CRITERIA

The following inclusion and exclusion criteria have been followed while collecting thearticles
for the literature review:

• Only those articles that discussed about depression detection/recognition and deeplearning
models have been included.
• Only the articles published between the years 2020 and 2022 have been included, as they reflect the
most recent research conducted in this area.
• Only the journal articles, conference papers, magazines and reviews have been included.
• Only the articles written in English language have been included for understandability purposes.
• Abstracts and PowerPoint presentations have been excluded.

5
Sinhgad Institute of Technology, Lonavala – Information Technology (2022-2023)
CHAPTER 3

PROBLEM STATEMENT
Automatic Depression Level Detection

3.1 PROBLEM STATEMENT DEFINITION

To create an automated depression level detection system to prevent the current generation
from being the victim of depression which can cause significant losses in the number of
situations including social, educational, financial, and equity systems. The World Health
Organization lists depression as the fourth most serious cause of capacity shortages (WHO).
Suicide risk is 30 times higher in depressed people than in the general population.

6
Sinhgad Institute of Technology, Lonavala – Information Technology (2022-2023)
CHAPTER 4

PROJECT REQUIREMENT
Automatic Depression Level Detection

4.1 EXTERNAL INTERFACE REQUIREMENT

4.1.1 USER INTERFACE :


Application Based Stress Detection

4.1.2 HARDWARE INTERFACES :


• RAM : 8GB
• As we are using Machine Learning Algorithm and Various High Level Libraries
Laptop RAM minimum required is 8 GB.
• Hard Disk : 40GB
• Data Set is to be used hence minimum 40 GB Hard Disk memory is required.
• Processor : Intel i5 Processor
• Pycharm IDE that Integrated Development Environment is to be used and data
loading should be fast hence Fast Processor isrequired
• IDE :Pycharm
• Best Integrated Development Environment as it gives possible suggestions at the
time of typing code snippets that makes typing feasible and fast.
• Coding Language : Python Version3.5
• Highly specified Programming Language for Machine Learning because of
availability of High Performance Libraries.
• Operating System : Windows10
• Latest Operating System that supports all type of installation and development.

4.1.3 SOFTWARE INTERFACES


• Operating System: Windows10
• IDE: Spyder
• Programming Language :Python

Python has been selected as the programming languages, it is a high-level programming language,
which is easy to learn and code, making it the widely used programming language for developing
machine learning as well as deep learning algorithms
Install Python on your computer system.
Prepare the setup of Spyder IDE.
Install dependencies like TensorFlow, NumPy, Pandas, OpenCV, Scikit-learn, Matplotlib, Tkinter etc.

Steps to be followed:

1) Download and install Python version 3 from official Python Language website

7
Sinhgad Institute of Technology, Lonavala – Information Technology (2022-2023)
Automatic Depression Level Detection

https://www.python.org/

2) Install the following dependencies via pip :

i. TensorFlow :

TensorFlow is an open-source software library for dataflow and differentiable programming across a
range of tasks. It is a symbolic math library, and is also used for machine learning application such as
neural networks, etc.
It is used for both research and production by Google. TensorFlow is developed by the Google Brain
team for internal Google use. TensorFlow is Google Brain's second-generation system.

While the reference implementation runs on single devices, TensorFlow can run on multiple CPU’s
and GPU (with optional CUDA and SYCL extensions for general-purpose computing on graphics
processing units).
TensorFlow is available on various platforms such as64-bit Linux, macOS, Windows, and mobile
computing platforms including Android and iOS.
The architecture of TensorFlow allows the easy deployment of computation across a variety of
platforms (CPU’s, GPU’s, TPU’s), and from desktops - clusters of servers to mobile and edge devices.
TensorFlow computations are expressed as stateful dataflow graphs. The name TensorFlow derives
from operations that such neural networks perform on multidimensional data arrays, which are
referred to as tensors.

pip install TensorFlow -command

ii. Numpy :

NumPy is library of Python programming language, adding support for large, multi- dimensional array
and matrices, along with large collection of high-level mathematical function to operate over these
arrays. The ancestor of NumPy, Numeric, was originally created by Jim Hugunin with contributions
from several developers. In 2005 Travis Olphant created NumPy by incorporating features of
computing Numarray into Numeric, with extension modifications. NumPy is open-source software
and has many contributors.

pip install numpy -command

iii. Scikit-Learn :

Scikit-learn (Sklearn) is the most useful and robust library for machine learning in Python. It provides
a selection of efficient tools for machine learning and statistical modeling including classification,
regression, clustering and dimensionality reduction via a consistence interface in Python. This library,
which is largely written in Python, is built upon NumPy, SciPy and Matplotlib.

pip install -U scikit-learn

iv. OpenCV :

OpenCV is an library of programming functions mainly aimed on real time computer vision.
originally developed by Intel, it is later supported by Willow Garage then Itseez. The library is a
cross-platform and free to use under the open-source BSD license.

pip install opencv-python -command

8
Sinhgad Institute of Technology, Lonavala – Information Technology (2022-2023)
Automatic Depression Level Detection

v. Pillow :

Python Imaging Library is a free Python programming language library that provides support to open,
edit and save several different formats of image files. Windows, Mac OS X and Linux are available
for this.

pip install pillow -command

vi. Matplotlib :

Matplotlib is a Python programming language plotting library and its NumPy numerical math
extension. It provides an object-oriented API to use general-purpose GUI toolkits such as Tkinter,
wxPython, Qt, or GTK+ to embed plots into applications.

pip install matplotlib – command

vii. Keras :

Keras is an open-source neural-network library written in Python. It is capable of running on top of


TensorFlow, Microsoft Cognitive Toolkit, Theano, or PlaidML. Designed to enable fast
experimentation with deep neural networks, it focuses on being user-friendly, modular, and extensible.

pip install keras

4.2 NONFUNCTIONAL REQUIREMENT

4.2.1 PERFORMANCE REQUIREMENTS

The performance of the functions and every module must be well. The overall performance of
the software will enable the users to work efficiently. Performance of encryption of data
should be fast. Performance of the providing virtual environment should be fast Safety
Requirement
• The application is designed in modules where errors can be detected and indexed easily. This
makes it easier to install and update new functionality if required.

4.2.2 SAFETY REQUIREMENT


The application is designed in modules where errors can be detected and fixed easily.This
makes it easier to install and update new functionality if required

9
Sinhgad Institute of Technology, Lonavala – Information Technology (2022-2023)
Automatic Depression Level Detection

4.2.3 SOFTWARE QUALITY ATTRIBUTES:


Our software has many quality attribute that are given below:-
1. Adaptability: This software is adaptable by all users.
2. Availability: This software is freely available to all users. The availability of the software is
easy for everyone.
3. Maintainability: After the deployment of the project if any error occurs then it can be
easily maintained by the software developer. B.E.(IT) 13 Sinhgad Institute of Technology,
Lonavala
4. Reliability: The performance of the software is better which will increase the reliability of
the Software.
5. User Friendliness: Since, the software is a GUI application; the output generated is much
user friendly in its behavior.
6. Integrity: Integrity refers to the extent to which access to software or data by unauthorized
persons can be controlled.
7. Security: User s are authenticated using many security phases reliable security is provided.
8. Test ability: The software will be tested considering all the aspects.

10
Sinhgad Institute of Technology, Lonavala – Information Technology (2022-2023)
CHAPTER 5

SYSTEM ANALYSIS
Automatic Depression Level Detection

5.1 SYSTEM ARCHITECTURE

Figure 5.1: System Architecture

5.1.1 CONVOLUTIONAL NEURAL NETWORK

Image classification is the process of taking an input ( like a picture) and


outputting its class or probability that the input is a particular class. Neural networks
are applied in the following steps:
1) One hot encode the data: A one-hot encoding can be applied to the integer
representation. This is where the integer encoded variable is removed and a new
binary variable is added for each unique integer value.

11
Sinhgad Institute of Technology, Lonavala – Information Technology (2022-2023)
Automatic Depression Level Detection

2) Define the model: A model said in a very simplified form is nothing but a
function that is used to take in certain input, perform certain operation to its beston the
given input (learning and then predicting/classifying) and produce the suitable output.
3) Compile the model: The optimizer controls the learning rate. We will be using
‘adam’ as our optmizer. Adam is generally a good optimizer to use for many cases.
The adam optimizer adjusts the learning rate throughout training. The learning rate
determines how fast the optimal weights for the model are calculated. A smaller
learning rate may lead to more accurate weights (up to a certain point), but the time it
takes to compute the weights will be longer. 4)Train the model: Training a model
simply means learning (determining) good values for all the weights and the bias from
labeled examples. In supervised learning, a machine learning algorithm builds a model
by examining many examples and attempting to find a model that minimizes loss; this
process is called empirical risk minimization.
5) Test the model

A convolutional neural network convolves learned featured with input data and uses
2D convolution layers.
Convolution Operation:

In purely mathematical terms, convolution is a function derived from two given


functions by integration which expresses how the shape of one is modified by the
other.
Convolution formula:

(𝑓 ∗ 𝑔)(𝑡) ≝ ∫ 𝑓(𝜏)𝑔(𝑡 − 𝜏)𝑑𝜏 1
−∞

Here are the three elements that enter into the convolution operation:
• Input image
• Feature detector
• Feature map

12
Sinhgad Institute of Technology, Lonavala – Information Technology (2022-2023)
Automatic Depression Level Detection

Steps to apply convolution layer:


• You place it over the input image beginning from the top-left corner within the
borders you see demarcated above, and then you count the number of cells in which
the feature detector matches the input image.
• The number of matching cells is then inserted in the top-left cell of the feature
map
• You then move the feature detector one cell to the right and do the same thing.
This movement is called a and since we are moving the feature detector one cell at
time, that would be called a stride of one pixel.
• What you will find in this example is that the feature detector's middle-left cell
with the number 1 inside it matches the cell that it is standing over inside the input
image. That's the only matching cell, and so you write “1” in the next cell in the
feature map, and so on and so forth.
• After you have gone through the whole first row, you can then move it over to
the next row and go through the same process.
There are several uses that we gain from deriving a feature map. These are the most
important of them: Reducing the size of the input image, and you should know that the
larger your strides (the movements across pixels), the smaller your feature map.
Relu Layer:
Rectified linear unit is used to scale the parameters to non negativevalues.We get pixel
values as negative values too . Inthis layer we make them as 0’s. The purpose of
applying the rectifier function is to increase the non-linearity in our images. The
reason we want to do that is that images are naturally non-linear. The rectifier serves
to break up the linearity even further in order to make up for the linearity that we
might impose an image when we put it through the convolution operation. What the
rectifier function does to an image like this is remove all the black elements from it,
keeping only those carrying a positive value (the grey and white colors).The essential
difference between the non-rectified version of the image and the rectified one is the
progression of colors. After we rectify the image, you will find the colors changing

13
Sinhgad Institute of Technology, Lonavala – Information Technology (2022-2023)
Automatic Depression Level Detection

more abruptly. The gradual change is no longer there. That indicates that the linearity
has been disposed of.

Pooling Layer:
The pooling (POOL) layer reduces the height and width of the input. It helps reduce
computation, as well as helps make feature detectors more invariant to its position in
the input This process is what provides the convolutional neural network with the
“spatial variance” capability. In addition to that, pooling serves to minimize the size of
the images as well as the number of parameters which, in turn, prevents an issue of
“overfitting” from coming up. Overfitting in a nutshell is when you create an
excessively complex model in order to account for the idiosyncracies we just
mentioned The result ofusing a pooling layer and creating down sampled or pooled
feature maps is a summarized version of the features detected in the input. They are
useful as small changes in the location of the feature in the input detected by the
convolutional layer will result in a pooled feature map with the feature in the same
location. Thiscapability added by pooling is called the model’s invariance to local
translation.

Fully Connected Layer:


The role of the artificial neural network is to take this data and combine the features
into a wider variety of attributes that make the convolutional network more capable of
classifying images, which is the whole purpose from creating a convolutional neural
network. It has neurons linked to each other ,and activates if it identifies patterns and
sends signals to output layer .the outputlayer gives output class based on weight
values, For now, all you need to know is that the loss function informs us of how
accurate our network is, which we then use in optimizing our network in order to
increase its effectiveness. That requires certain things to be altered in our network.
These include the weights (the blue lines connecting the neurons, which are basically
the synapses), and the feature detector since the network often turns out to be looking

14
Sinhgad Institute of Technology, Lonavala – Information Technology (2022-2023)
Automatic Depression Level Detection

for the wrong features and has to be reviewed multiple times for the sake of
optimization.
This full connection process practically works as follows:
• The neuron in the fully-connected layer detects a certain feature; say, a nose.
• It preserves its value.
• It communicates this value to the classes trained images.

Figure 5.2 Convolutional Neural Network:

15
Sinhgad Institute of Technology, Lonavala – Information Technology (2022-2023)
Automatic Depression Level Detection

5.2 Data Flow Diagram:

In Data Flow Diagram, we Show that flow of data in our system in DFD0 we show
that base DFD in which rectangle present input as well as output and circle show our system,
In DFD1 we show actual input and actual output of system input of our system is text or
image and output is rumor detected likewise in DFD 2 we present operation of user as well as
admin.

Figure 5.3: Data Flow (0) diagram.


In DFD0, the rectangle represents the input as well as the output, and the circle
represents the system.

Figure 5.4: Data Flow (1) diagram.

In DFD1, we see actual input and output given to the system. The input is in the form of
image and output is a binary image

Figure 5.5: Data Flow (2) diagram.

In DFD2, we present the operations of the user as well as the admin.

16
Sinhgad Institute of Technology, Lonavala – Information Technology (2022-2023)
Automatic Depression Level Detection

UML DIAGRAMS

Figure 5.6: Class Diagram.

Figure 5.7: Use case Diagram


17
Sinhgad Institute of Technology, Lonavala – Information Technology (2022-2023)
Automatic Depression Level Detection

Figure 5.8: Activity Diagram

18
Sinhgad Institute of Technology, Lonavala – Information Technology (2022-2023)
Automatic Depression Level Detection

Figure 5.9: Sequence Diagram

19
Sinhgad Institute of Technology, Lonavala – Information Technology (2022-2023)
CHAPTER 6

SOFTWARE INFORMATION
Automatic Depression Level Detection

Python:

Python is an interpreted, high-level and general-purpose programming language.


Created by Guido van Rossum and first released in 1991, Python’s design philosophy
emphasizes code readability with its notable use of significant whitespace. Its language
constructs and object-oriented approach aim to help programmers write clear, logical code for
small and large-scale projects.

Python is dynamically typed and garbage-collected. It supports multiple programming


paradigms, including structured (particularly, procedural), object- oriented, and functional
programming. Python is often described as a “batteries included” language due to its
comprehensive standard library.

Python was created in the late 1980s as a successor to the ABC language. Python 2.0, released in
2000, introduced features like list comprehensions and a garbage collection system with
reference counting.

Python 3.0, released in 2008, was a major revision of the language that is not completely
backward-compatible, and much Python 2 code does not run unmodifiedon Python 3.

The Python 2 language was officially discontinued in 2020 (first planned for 2015), and “Python
2.7.18 is the last Python 2.7 release and therefore the last Python 2 release. No more security
patches or other improvements will be released forit. With Python 2’s end-of-life, only Python
3.6.x and later are supported.

Python interpreters are available for many operating systems. A global com- munity of
programmers develops and maintains CPython, a free and open-source reference
implementation. A non-profit organization, the Python Software Foundation, manages and
directs resources for Python and CPython development.

Python was conceived in the late 1980s by Guido van Rossum at Centrum Wiskunde Informatica
(CWI) in the Netherlands as a successor to the ABC language (itself inspired by SETL), capable
of exception handling and interfacing with the Amoeba operating system. Its implementation

20
Sinhgad Institute of Technology, Lonavala – Information Technology (2022-2023)
Automatic Depression Level Detection

began in December 1989. Van Rossum shouldered sole responsibility for the project, as the lead
developer, until 12 July 2018, when he announced his “permanent vacation” from his
responsibilities as Python’s Benevolent Dictator for Life, a title the Python community
bestowed upon him to reflect his long-term commitment as the project’s chief decision-maker.He
now shares his leadership as a member of a five-person steering council. In January 2019, active
Python core developers elected Brett Cannon, Nick Coghlan, Barry Warsaw, Carol Willing and
Van Rossum to a five-member “Steering Council” to lead the project.

Spyder IDE:

Spyder is an open-source cross-platform IDE. The Python Spyder IDE is written completely in
Python. It is designed by scientists and is exclusively for scientists, data analysts, and engineers.
It is also known as the Scientific Python Development IDE and has a huge set of remarkable
features which are discussed below.

Features of Spyder
Some of the remarkable features of Spyder are:

 Customizable Syntax Highlighting


 Availability of breakpoints (debugging and conditional breakpoints)
 Interactive execution which allows you to run line, file, cell, etc.
 Run configurations for working directory selections, command-line options, current/
dedicated/ external console, etc
 Can clear variables automatically ( or enter debugging )
 Navigation through cells, functions, blocks, etc can be achieved through the Outline Explorer
 It provides real-time code introspection (The ability to examine what functions, keywords,
and classes are, what they are doing and what information they contain)
 Automatic colon insertion after if, while, etc
 Supports all the IPython magic commands
 Inline display for graphics produced using Matplotlib
 Also provides features such as help, file explorer, find files, etc

21
Sinhgad Institute of Technology, Lonavala – Information Technology (2022-2023)
CHAPTER 7

PROJECT PLAN
Automatic Depression Level Detection

In this chapter we are going to have an overview about how much time it takes to complete each
task like- Preliminary Survey Introduction and Problem Statement, Literature Survey, Project
Statement, Software Requirement and Specification, System Design, Partial Report Submission,
Architecture Design, Implementation, Deployment, Testing, Paper Publish, Report Submission
and etcetera. This chapter also gives focus on stakeholder list which gives information about
project type, customer of the proposed system, user and project member who developed the
system.

7.1 SYSTEM IMPLEMENTATION PLAN


The System Implementation plan table, shows the overall schedule of tasks compilation and
time duration required for each task.
Sr. No. Name/Title Start Date End Date
1 Preliminary Survey 01/06/2022 25/06/2022

2 Introduction and Problem 25/06/2022 25/06/2022


Statement
3 Literature Survey 19/06/2022 01/07/2022

4 Project Statement 01/07/2022 01/07/2022

5 Software Requirement And 01/08/2022 01/09/2022


Specifi-
cation
6 System Design 01/09/2022 01/10/2022

7 Partial Report Submission 29/11/2022 29/11/2022

8 Architecture Design 01/09/2022 01/10/2022

9 Implementation 01/12/2023 02/02/2023

1 Deployement 02/02/2023 02/03/2023


0
1 Testing 01/12/2023 02/02/2023
1
1 Paper Publish 22/05/2023 23/05/2023
2
1 Report Submission 31/05/2023 31/05/2023
3
Table 7.1: Project Implementation Plan

The project timeline chart shows the report of the tasks completed in each month from
the start of the project up to the final submission date.

22
Sinhgad Institute of Technology, Lonavala – Information Technology (2022-2023)
Automatic Depression Level Detection

7.2 PROJECT TIMELINE

0 1 2 3 4 5 6 7 8 9 10
Search Topic
Topic Selection
Project Review-I
Defining Problem Satement
Search Related Information
Search IEEE Papers
Gather Related IEEE Papers
Project Review-II
Start Coding Work Of Project
Publish a Paper About Project
Work on Coding
Finish Coding Work Of…
Training the Model with…
Testing the Model With…
Testing the Project
Finish the Project
Publish another Paper on…
Final Project Pesentation

June July August September October


November December January February March

Table 7.2: Project Timeline Chart

23
Sinhgad Institute of Technology, Lonavala – Information Technology (2022-2023)
CHAPTER 8

RESULTS
Automatic Depression Level Detection

8.1 TEST CASES:

Table 8.1: GUI Test Case

Table 8.2: Login Test Case

24
Sinhgad Institute of Technology, Lonavala – Information Technology (2022-2023)
Automatic Depression Level Detection

Table 8.3: Registration Test Case

Table 8.4: System Test Case.

25
Sinhgad Institute of Technology, Lonavala – Information Technology (2022-2023)
Automatic Depression Level Detection

8.2 RESULTS AFTER PREDICTION:

Figure 8.1: Main Page

Figure 8.2: Registration Page

Figure 8.3: Log In Page

26
Sinhgad Institute of Technology, Lonavala – Information Technology (2022-2023)
Automatic Depression Level Detection

Figure 8.4: Prediction Page

Figure 8.5: Live Camera Interface

Figure 8.6: Live Camera Interface


27
Sinhgad Institute of Technology, Lonavala – Information Technology (2022-2023)
CHAPTER 9

CONCLUSION
Automatic Depression Level Detection

9.1 CONCLUSION

To Conclude, that in system we will detect person is depressed or not using face
recognise (Like happy, sad , Neutral or Angry). The Deep learning technique is used CNN
algorithm. With the help of These CNN algorithm and Haarr cassscade Face recognize
algorithm To detect depressed person. This method of detecting tension will assist To
determine one’s psychological state and also physical health, a person from He / she will be
capable of taking the steps expected. It was concluded too, that the more properties we use,
the more detailed the model becomes.

9.2 FUTURE SCOPE

 In our future work, we are going to try and examine the link between the user’s
temperament and their depression-related behavior mirrored in social media.
 Another attainable improvement would be to use recent language modeling strategies
like BERT as input for the network and to match self trained model

28
Sinhgad Institute of Technology, Lonavala – Information Technology (2022-2023)
REFERENCES
Automatic Depression Level Detection

[1] Y. Kwon and N. Lobo, “Age classication from facial images,” in Proc. IEEE Conf. Comput.
Vis.Pattern Recognition., Seattle, WA, USA, Jun. 1994, pp. 762–767.
[2] Y. Kwon and N. Lobo, “Age classication from facial images,” Comput.Vision.Image
Understand., vol. 74, no. 1, pp. 1–21, 1999.
[3] W. B. Horng, C. P. Lee, and C. W. Chen, “Classication of age groups based on facial features,”
Tamkang J. Sci. Eng., vol. 4, no. 3, pp. 183–192, 2001.
[4] J. Hayashi, M. Yasumoto, H. Ito, Y. Niwa, and H. Koshimizu, “Age and gen-
derestimationfromfacialimageprocessing,”inProc.41stSICEAnnu.Conf., vol. 1. Osaka, Japan,
Aug. 2002, pp.13–18.
[5] A. Lanitis, C. Taylor, and T. Cootes, “Toward automatic simulation of aging effects on face
images,” IEEE Trans. Pattern Anal. Mach. Intell., vol. 24, no. 4, pp. 442–455, Apr. 2002.
[6] Fevre, Mark Le; Kolt, Gregory S.; Matheny, Jonathan,. ”EuDepression, diDe- pression and their
interpretation in primary and secondary occupational De-pression management
interventions: which way first?”.Journal of Managerial Psychology, 2006, 21 (6): 547 -565.
doi:10.1108/0268390610684391.
[7] Das S, O’Keefe J. “Behavioral cardiology: recognizing and addressing the pro-
foundimpactofpsychosocialDepressiononcardiovascularhea

29
Sinhgad Institute of Technology, Lonavala – Information Technology (2022-2023)
PUBLICATIONS
Automatic Depression Level Detection

PUBLICATIONS
[1] Vaishnavi N. Patil, Aakash S. Patil , Tejas Puri, Jagruti Katkhede, Prof. Anuradha
Kulkarni “Automatic Depression Level Detection” International Journal of
Advanced Research In Science, Communication and Technology(IJARSCT)
ISSN(Online) 2581-9429, Volume 2 , Issue 3, November 2022.

[2] Jagruti Katkhede, Aakash Patil, Vaishnavi Patil,Tejas Puri , Prof. Anuradha Kulkarni
“Automatic Depression Level Detection” GOYA JOURNAL, ISSN NO 0017 –
2715, Scopus Active and UGC CARE Group -II Journal, Volume 16, Issue 5 2023,
DOI:12.163022.Gj.2023.v16.05.0061.

30
Sinhgad Institute of Technology, Lonavala – Information Technology (2022-2023)

You might also like