"Emotion Regognition System": A Project Report ON
"Emotion Regognition System": A Project Report ON
ON
“EMOTION REGOGNITION system”
Submitted in the partial fulfilment of the award
Of
BACHELOR OF TECHNOLOGY
Degree in
COMPUTER SCIENCE AND ENGINEERING (2021) submitted
by
Abhijeet Sarcar (1743110002)
Anshul Anand (1743110014)
Ajeet Kumar (1743110007)
Pradeep Kumar (1743110041)
under the supervision of
Mr. Vinay Kumar
(Associate Professor)
CERTIFICATION
This is to certify that the project entitled “Emotion recognition
System” is carried by ABHIJEET SARCAR during year 2020 in the
partial fulfilment of the requirement for the award of Bachelor of
Technology from B. N. College of Engineering and Technology. This
project embodies result of the original work carried out by students
themselves and the contents of the project do not form the basis for
the award of any degree to the candidate or anybody else.
CERTIFICATION
This is to certify that the project entitled “Emotion recognition
System” is carried by ANSHUL ANAND during year 2020 in the partial
fulfilment of the requirement for the award of Bachelor of
Technology from B. N. College of Engineering and Technology. This
project embodies result of the original work carried out by students
themselves and the contents of the project do not form the basis for
the award of any degree to the candidate or anybody else.
CERTIFICATION
This is to certify that the project entitled “Emotion
recognition System” is carried by AJEET KUMAR during year
2020 in the partial fulfilment of the requirement for the
award of Bachelor of Technology from B. N. College of
Engineering and Technology. This project embodies result of
the original work carried out by students themselves and the
contents of the project do not form the basis for the award
of any degree to the candidate or anybody else.
CERTIFICATION
This is to certify that the project entitled “Emotion recognition System” is
carried by PRADEEP KUMAR during year 2020 in the partial fulfilment of the
requirement for the award of Bachelor of Technology from B. N. College of
Engineering and Technology. This project embodies result of the original work
carried out by students themselves and the contents of the project do not
form the basis for the award of any degree to the candidate or anybody else.
The emotions, set in simple words are what people feel. Emotional
aspects have huge impact on Social intelligence like communication
understanding, decision making and helps in understanding
behavioural aspect of human. Human faces provide various
information about emotions. As per psychological researcher, a
person expresses his emotions less by verbal talk and more by non-
verbal body posture and gestures. Emotion recognition or Affective
Computing (AC) being the AI related area imparts intelligence to
computers in recognizing human emotions. Emotion recognition is
proved a popular research area topic in few decades. The aim of this
paper is to report an illustrative and comprehensive study of most
popular emotion recognition methods, which are generally used in
emotion recognition problems. We are motivated by the lack of
detailed study of all possible techniques implementations in available
literature. This paper provides an up-to-date comprehensive survey
of techniques available for emotion recognition.
Emotion plays an important role in our daily lives. Ever since the 19th
century, experimental psychologists have attempted to understand
and explain human emotion. Despite an extensive amount of
research conducted by psychologists, anthropologists, and so
ciologists over the past 150 years, researchers still cannot agree on
the definition of emotion itself and have continued to try and devise
ways to measure emotional states. In this paper, we provide an
overview of the most prominent theories in emotional psychol ogy
(dating from the late 19th century to the present day), as well as a
summary of a number of studies which attempt to measure certain
aspects of emotion. This paper is organized chronologically; first with
an analysis of various uni-modal studies, followed by a review of
multi-modal research. Our findings suggest that there is insufficient
evidence to neither prove nor disprove the existence of coherent
emotional expression, both within subjects and between subjects.
Furthermore, the results seem to be heavily influenced by both
experimental conditions as well as by the theoretical assumptions
that underpin them.
OBJECTIVE AND MOTIVATION
Libraries used -
It includes:
An interactive debugger that allows inspecting stack traces and
source code in the browser with an interactive interpreter for any
frame in the stack.
A full-featured request object with objects to interact with
headers, query args, form data, files, and cookies.
A response object that can wrap other WSGI applications and
handle streaming data.
A routing system for matching URLs to endpoints and generating
URLs for endpoints, with an extensible system for capturing
variables from URLs.
HTTP utilities to handle entity tags, cache control, dates, user
agents, cookies, files, and more.
A threaded WSGI server for use while developing applications
locally.
A test client for simulating HTTP requests during testing without
requiring running a server.
urllib3 brings many critical features that are missing from the
Python standard libraries:
Thread safety.
Connection pooling.
Client-side SSL/TLS verification.
File uploads with multipart encoding.
Helpers for retrying requests and dealing with HTTP redirects.
Support for gzip, deflate, and brotli encoding.
Proxy support for HTTP and SOCKS.
100% test coverage.
Methodology
Human Emotion:
Emotion is an important aspect in the interaction and communication between
people. Even though emotions are intuitively known to everybody, itis hard to
define emotion. The Greek philosopher Aristotle thought of emotion as a
stimulus that evaluates experiences based on the potential for gain or
pleasure. Years later, in the seventeenth century, Descartes considered
emotion to mediate between stimulus and response [2]. Nowadays there is
still little consensus about the definition of emotion. Kleinginna and Kleinginna
gathered and analyzed 92 definitions of emotion from literature
present that day. They conclude that there is little consistency between
different definitions and suggested the following comprehensive definition
Emotion is a complex set of interactions among subjective and objective
factors, mediated by neural/hormonal systems, which can:
4. Lead to behaviour that is often, but not always, expressive, goal directed,
and adaptive.
This definition shows the different sides of emotion. On the one hand emotion
generates specific feelings and influences someone‘s behavior. This part of
emotion is well knownand is in many cases visible to a person himself or to
the outside world. On the other hand emotion also adjusts the state of the
human brain, and directly or indirectly influences several processes [2]. Fig2
is showing different Human emotions which are use able in order to achieve
our goal
Fig.: Different human emotions
SCOPE
i. This work deals with measuring the facial expressions of human beings
ii. It does not deal with rest of body of the humans
iii .As there exist some methods which do the same job they are also
considered in this research work.
iv. Since it is not feasible to run these algorithms in real environment,
therefore a simulator is developed which will simulate the proposed work.
v. Different type of tests will be implemented using proposed strategy.
vi. Visualization of the experimental results and drawing appropriate
performance analysis.
vii. Appropriate conclusion will be made based upon performance analysis.
viii. For future work suitable future directions will be drawn considering
limitations of existing work.
Throughout the research work emphasis has been on the use of either open
source tools technologies or licensed software
System Diagram:
System design shows the overall design of system. In this section we discuss in detail
the design aspects of the system:
Face detection:
Face Detection is useful in detection of facial image. Face Detection is
carried out in training dataset using Haar classifier called Voila-Jones
face detector and implemented through Opencv. Haar like features
encodes the difference in average intensity in different parts of the image
and consists of black and white connected rectangles in which the value
of the feature is the difference of sum of pixel values in black and white
region
Feature Extraction:
Selection of the feature vector is the most important part in a
pattern classification problem. The image of face after pre-
processing is then used for extracting the important features.
The inherent problems related to image classification include
the scale, pose, translation and variations in illumination level.
The important features are extracted using LBP algorithm
which is described below:
CNN
1. What is CNN ?
Computer vision is evolving rapidly day-by-day. Its one of the reason
is deep learning. When we talk about computer vision, a term
convolutional neural network( abbreviated as CNN) comes in our
mind because CNN is heavily used here. Examples of CNN in
computer vision are face recognition, image classification etc. It is
similar to the basic neural network. CNN also have learnable
parameter like neural network i.e, weights, biases etc.
3. Few Definitions
There are few definitions you should know before understanding CNN
Thinking about images, its easy to understand that it has a height and width, so
it would make sense to represent the information contained in it with a two
dimensional structure (a matrix) until you remember that images have colors,
and to add information about the colors, we need another dimension, and that
is when Tensors become particularly helpful.
Images are encoded into color channels, the image data is represented into
each color intensity in a color channel at a given point, the most common one
being RGB, which means Red, Blue and Green. The information contained into
an image is the intensity of each channel color into the width and height of the
image, just like this
Fig. RGB representation of a image
So the intensity of the red channel at each point with width and height can be
represented into a matrix, the same goes for the blue and green channels, so we
end up having three matrices, and when these are combined they form a tensor.
Every image has vertical and horizontal edges which actually combining to
form a image. Convolution operation is used with some filters for detecting
edges. Suppose you have gray scale image with dimension 6 x 6 and filter of
dimension 3 x 3(say). When 6 x 6 grey scale image convolve with 3 x 3 filter, we
get 4 x 4 image. First of all 3 x 3 filter matrix get multiplied with first 3 x 3 size
of our grey scale image, then we shift one column right up to end , after that
we shift one row and so on.
Convolution operation
The convolution operation can be visualized in the following way. Here our image dimension
is 4 x 4 and filter is 3 x 3, hence we are getting output after convolution is 2 x 2.
If we have N x N image size and F x F filter size then after convolution result will be
Initially(without padding)
(N x N) * (F x F) = (N-F+1)x(N-F+1)---(1)
The equation (3) clearly shows that Padding depends on the dimension of filter.
4. Layers in CNN
There are five different layers in CNN
Input layer
Pooling layer
Softmax/logistic layer
Output layer
Convo layer also contains ReLU activation to make all negative value to zero.
Pooling layer is used to reduce the spatial volume of input image after convolution. It is used
between two convolution layer. If we apply FC after Convo layer without applying pooling or
max pooling, then it will be computationally expensive and we don’t want it. So, the max
pooling is only way to reduce the spatial volume of input image. In the above example, we
have applied max pooling in single depth slice with Stride of 2. You can observe the 4 x 4
dimension input is reduce to 2 x 2 dimension.
There is no parameter in pooling layer but it has two hyperparameters — Filter(F) and
Stride(S).
W2 = (W1−F)/S+1
H2 = (H1−F)/S+1
D2 = D1
Where W2, H2 and D2 are the width, height and depth of output.
Now you have a good understanding of CNN. Let’s implement a CNN in Keras.
where,
is a new face.
is the mean or the average face,
is an EigenFace,
are scalar multipliers we can choose to create new faces. They can be positive
or negative.
Figure 2 : On the left is the mean image. On the right is a new face produced by adding 10 Eigenfaces
with different weights (shown in center).
Fisher faces
Fisher faces method learns a class specific transformation matrix, so, they do
not capture illustrations as obviously as the Eigenfaces method.
Fisher faces allows reconstruction of the projected image, just like Eigen Faces
did, but since we only identified the features to distinguish between subjects, we
cannot expect a nice reconstruction of original image. Fisher faces is especially
useful when facial images have large variations in illuminations and facial
expressions.
SYSTEM REQUIREMENTS
Processor: i3 or higher
OS: Windows 10
RAM: 4GB