Professional Documents
Culture Documents
BASED ON EMOTIONS
A PROJECT REPORT
Submitted by
SHARMILA.N
(Reg no. 20S029)
of
in
MADURAI – 625015
SEPTEMBER 2022
1
THIAGARAJAR COLLEGE OF ENGINEERING, MADURAI
BONAFIDE CERTIFICATE
third Semester student of 5 Year Integrated MSc (Data Science) Degree Programme,
who carried out the project under my supervision from 17.07.2022 to 22.07.2022
for evaluation/assessment.
<sign> <sign>
Dr. S. Parthasarathy Prof P. Sharmila
Professor & Head Project Guide
Department of Applied Mathematics Assistant Professor in Data Science
and Computational Science Department of Applied Mathematics
and Computational Science
2
TABLE OF CONTENTS
LIST OF FIGURES
3
Page no
1. Introduction 5
4. Implementation 10
6. Conclusion 16
7. Appendices, if any -
4
1. INTRODUCTION:
This project deals with predicting the activeness of the students from
detecting their facial emotions. This would help their corresponding faculties to give
more focus on Non active students during that day. This would make that students
to listen carefully during those classes. Also, this will create the good student-
faculty relationship.
Usually, a teacher’s focus is often on procedures, rules, and routines.
These are all very important. But to know their student’s daily mood will also make
one step closer to their students. Their kind of relationship whether it is good or
bad with their teacher, will impact the student’s life. So, should be more careful in
dealing with students nowadays.
So, emotions such as anger, happy, sad, surprise, fear, neutral, and
disgust are classified into two categories as active and non-active. And it would
display in excel sheet for faculty purpose or also by printing at top of the
rectangular frame while detecting.
Deep Learning – which has emerged as an effective tool for analyzing big
data – uses complex algorithms and artificial neural networks to train
machines/computers so that they can learn from experience, classify and recognize
data/images just like a human brain does. Within Deep Learning, a Convolutional
Neural Network or CNN is a type of artificial neural network, which is widely used
for image/object recognition and classification. This will helps to classify our
activeness measure.
Here, in this project, two models are created. One with Deepface
framework and another with 4-layer sequential Convolutional neural network
(CNN).
DeepFace is the most lightweight face recognition and facial attribute
analysis library for Python. The open-sourced DeepFace library includes all leading-
edge AI models for face recognition and automatically handles all procedures for
facial recognition in the background.
In this analysis of 2 models, deepface framework gives more accurate
results than 4-layer sequential Convolutional neural network.
5
2.OBJECTIVE OF THIS PROJECT
6
3. DESCRIPTION OF THE PROJECT:
Deepface framework:
2. Can apply face recognition on a large scale data set as well. Face
recognition requires to apply face verification multiple times.
This is the first step in the process of extracting valuable features from an
image. A convolution layer has several filters that perform the convolution
operation. Every image is considered as a matrix of pixel values.
ReLU stands for the rectified linear unit. Once the feature maps are
extracted, the next step is to move them to a ReLU layer. ReLU performs an
8
element-wise operation and sets all the negative pixels to 0. It introduces non-
linearity to the network, and the generated output is a rectified feature map.
9
4.IMPLEMENTATION OF THE PROJECT:
DeepFace model:
1.Loading the necessary libraries and capturing the faces through webcam:
2.Loading the images and encoding them for face recognition and open a csv file
for recording the status of the recognized face.
3.Once the face is detected and recognized using face recognition library the
emotions are recognized using DeepFace library and the activeness is classified
10
4.Output images:
The faces are recognized and the frames were displayed. The figure shows the
sample output of 2 recognized images and the status of all the classified images
are updates in the created csv file along with the name, date and time.
11
1.The dataset used here FER 2013 which is a publicly available dataset used for
face emotion recognition. The required libraries and the dataset are loaded.
The epochs indicate the number of passes of the entire training dataset the
machine learning algorithm has completed.
12
then the model is compiled with the Adam optimizer.
4.The number of epochs is set to 70 and the model is fitted with the training and
validation data in the FER dataset.
5. The model is saved as a h5 file and it is used in the face emotion recognition
model which captures the images using webcam and classifies them as active and
13
inactive. The haarcascade classifier is used to detect the faces and the emotion is
detected from the faces.
6.The classification shown by the developed CNN model is shown in the figure
14
5.SIGNIFICANCE OF THIS PROJECT:
By predicting the student’s activeness beforehand will help to increase
their academics performance and also creates a stable bond with their teachers.
It will also reduce the depression rate of the students when they treated properly if
their faculties know the mood of the students on daily basis.
CHALLENGES:
15
6.CONCLUSION:
16
PROJECT WORKSHEET / DIARY
recognition
2
17
Topics learned / Activity carried out /
Date
Task completed / Online /E-
resourcesaccessed
WEEK 3
18
Topics learned / Activity carried out /
Date
Task completed / Online /E-resources
accessed
9.09.2022 Finding the accuracy and loss of the model
11.09.2022 Finding the best among the two models and testing
it on various faces
12.09.2022 Correcting errors and improving accuracy
19