0% found this document useful (0 votes)
326 views

Final Report On Facial Emotion Detection Using Machine Learning

facial emotion detection using convolution to train the dataset and using machine learning to detect real time facial emotion detection

Uploaded by

Priyanshu Autumn
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
326 views

Final Report On Facial Emotion Detection Using Machine Learning

facial emotion detection using convolution to train the dataset and using machine learning to detect real time facial emotion detection

Uploaded by

Priyanshu Autumn
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Major-2

PROJECT REPORT
On
Facial emotion recognition using Machine Learning

Submitted by
Priyanshu Gautam R100218040
Shambhavi R178218035

B. Tech CSE (OSSOS) Sem-8


Department of Cybernetics
COMPUTER SCIENCE & ENGINEERING

Under the guidance of


Anushree Sah

School of Computer Science

SCHOOL OF COMPUTER SCIENCE


UNIVERSITY OF PETROLEUM & ENERGY STUDIES
Bidholi Campus, Energy Acres, Dehradun – 248007.

January–May 2023

1
Contents
1. INTRODUCTION ......................................................................................................... 3

2. BACKGROUND STUDIES .......................................................................................... 3

a. Keras and Tensorflow ........................................................................................ 3

3. PROPOSED MODEL .................................................................................................... 4

4. 3. 1 Hypothesis............................................................................................................... 4

a. 3.2 Aim and Objective ....................................................................................... 5

b. 3.3 THE DATASET........................................................................................... 5

c. 3.4 Process Flow Diagram ................................................................................. 6

5. 4.1 IMPLEMENTATION & RESULTS ....................................................................... 7

6. 4.2 Coding Screenshots .................................................................................................. 9

7. 4.3 Code Explanation. .................................................................................................... 9

8. CONCLUSION ............................................................................................................ 11

9. References .................................................................................................................... 12

2
Chapter 1
INTRODUCTION

Facial recognition and emotion location are AI-based frameworks utilized for confirmation
and acknowledgment purposes. Artificial intelligence empowers these frameworks to
recognize faces and voices as well as analyze feelings.

Facial recognition may be a strategy of recognizing and checking a person’s character


utilizing their face. It helps to distinguish individuals in photos, recordings and in-person
as well. In spite of the fact that it is commonly utilized to bolt smartphones or organize
pictures, this tool has the potential to achieve greater purposes. And the way companies are
utilizing these devices, will affect our lives essentially.

Working of this procedure starts with camera establishment over the put that has to be
beneath reconnaissance. Different introduced cameras persistently take pictures and record
recordings when they distinguish development.

Chapter 2
BACKGROUND STUDIES
Keras and Tensorflow
TensorFlow 2 is an end-to-end, open-source machine learning stage. It has four key
capacities:

Effectively executing low-level tensor operations on CPU, GPU, or TPU.


Computing the angle of subjective differentiable expressions.
Scaling computation to numerous gadgets, such as clusters of hundreds of GPUs.
Trading programs ("charts") to outside runtimes such as servers, browsers, versatile and
implanted gadgets.

3
Keras is the high-level API of the TensorFlow platform: an receptive, highly-productive
interface for tackling machine learning issues, with a center on cutting edge profound
learning. It gives fundamental deliberations and building pieces for creating and shipping
machine learning arrangements with tall cycle speed.

Keras engages engineers and analysts to require full advantage of the scalability and cross-
platform capabilities of the TensorFlow platform: you'll be able run Keras on TPU or on
expansive clusters of GPUs, and you'll trade your Keras models to run within the browser
or on a portable gadget.
 In 1971, Paul [23] from the psychological point of view proposed that there are
six fundamental feelings (bliss, pity, outrage, appall, shock and fear) over
societies.
 In 1978, Ekman et al. [22] created the facial activity coding framework (FACS) to
depict facial expressions. These days, most of the facial expression
acknowledgment work is done on the premise of the over work, this paper
moreover chose the five fundamental feelings and impartial feelings as the
standard of facial expression classification

Chapter 3
PROPOSED MODEL

3. 1 Hypothesis

In agreement with the drawbacks of Present framework, we are attending to create this
project. The procedure starts with planning CNN model by satisfying an input picture (static
or energetic) by amassing a convolution layer, pooling layer, straighten layers, and thick
layers. Convolution coats will be included for exactness for huge datasets. The dataset is
collected from CSV record (in pixels format) and it's changed over into pictures and after that

4
classify feelings with individual expressions. Here feelings are classified as happy, sad,
angry, surprise, neutral, disgust, and fear with parts of pictures for the preparing dataset and
gigantic pictures for testing

3.2 Aim and Objective

Aim:
To develop a facial emotion recognition system using deep learning
Objectives:
• Create the front end which makes it as a primarily used in commercial applications.

3.3 THE DATASET

The dataset utilized here is FER2013 for preparing the model. The data contains of 48x48
pixel grayscale pictures of faces. The faces have been robotically recorded so the confront
is comparatively situated and stay in approximately the break even with sum of space in
each picture. The mission is to classify each confront based on the feeling show within
the facial expression in to one of five categories (1-Angry, 2-Happy, 3-Sad, 4-Surprise, 5-
Neutral).

5
3.4 Process Flow Diagram

Image acquisition Face Detection

Facial feature
extraction

Detection of facial
Neural network
expression

6
Chapter 4
4.1 IMPLEMENTATION & RESULTS

CNN design for facial emotion recognition as expressed over was executed in Python.
Beside Python programming language, NumPy, Keras, OpenCV and numerous libraries
were utilized. Test was accomplished with FER2013 dataset which includes of 48x48 pixel
grayscale pictures of faces based on 5 feelings. The dataset was prepared utilizing the CNN
demonstrate. this extend identifies a face inside the boundary and for the inputted
information i.e., either picture or a arrangement of video and it recognizes five diverse
fundamental feelings of human creatures result with precision of 61.10%

7
8
4.2 Coding Screenshots

4.3 Code Explanation.


from keras.preprocessing.image import ImageDataGenerator
The ImageDataGenerator also called image data augmentation. It is useful in quenching
the thirst of the model training for more and more data. Through image augmentation we
can increase the efficiency of the result. And it feeds itself by collecting the new images

9
that are modified, Diet images are brighter lighting, dark, wide, long of a same image,
therefore it produces large no. of images to train and test for increasing the accuracy of the
final model.
Keras preprocessing as an API , is used for transferring the data collected from the raw
image dataset to the destined software after sorting out data and deleting obsolete data

from keras.models import Sequential


keras.models import Sequential is used to confirm that the program trains one block of
neural network after one execution of the algorithm.

from keras.layers import Dense,Dropout,Flatten


Keras layers is used here to upload sorted and organized data into the algorithm.
Dense layer contains all the neural data that is collected by previous layer.
Dropout layer drops random neural data to increase time efficiency
Flatten layer is used to compress multidimensional arrays into one-dimensional arrays.

from keras.layers import Conv2D,MaxPooling2D


Conv2d is a convolution layer that compares stride windows of two similar imager.
Convolution is done by creating a feature map by taking a kernel filter of size 3x3 matrix
and applying on an image data to convert whole image into a 2 dimensional matrix data
and then comparing similar pixel images in order to train the neural network.

MaxPooling2D is used to identify the highest value of the input matrix after kernel filtering
in every patch of convolution to create feature map.

10
train_data_dir is used to train the dataset.
Here, FER-2013 has been used from kaggle.
validation_data_dir is used to test the dataset.

Chapter 5
CONCLUSION
Compared to conventional strategies, the proposed method can naturally learn pattern
features and reduce the deficiency caused by artificial design highlights. A research to
classify facial emotions over inactive or a arrangement of video input utilizing profound
learning methods was created. This is often a complex problem that has already been
approached a few times with diverse methods Whereas great results have been accomplished
utilizing this venture centered on keras and Tensorflow . This project accomplishes the
wanted yield that's it identifies face from the given input inside a boundary and it identifies
the emotion of face and shown the recognized yield as happy, sad, neutral, angry and surprise
with a precision of 61.10%

11
References

1. International Journal of Scientific & Engineering Research Volume 5, Issue 03, March-
2016 ISSN 2277-8616
2. International Journal of Scientific & Engineering Research Volume 7, Issue 12,
December-2016 ISSN 2229-5518
3. Proceedings of the Fifth International Conference on Computing Methodologies and
Communication (ICCMC 2021) DVD Part Number: CFP21K25-DVD: ISBN: 978-0-
7381-1203-9
4. https://github.com/omarsayed7/Deep-Emotion

12

You might also like