Facial Emotion Detection
Facial Emotion Detection
Facial Emotion Detection
Emotion Recognition is a task to process a human facial The FER 2013 dataset, short for Facial Expression
expression and classify Recognition 2013 dataset, is a
it into certain emotion categories. Such task typically widely used benchmark dataset in the field of computer
requires the feature vision and emotion
extractor to detect the feature, and the trained classifier recognition. It consists of facial images labeled with
produces the label based seven different emotion.
the result when input is given. In this way, such method image is 48x48 pixels in size, representing a cropped
produces a featurelocation-invariant image classifier that facial region. The images
achieves higher accuracy than traditional
exhibit variations in pose, lighting conditions, and facial
linear classifier when the variance such as lighting noise expressions.
and background
It's important to note that the FER 2013 dataset, while
environment appears in the input image [1] . The widely used, has some
evaluation of the model shows
limitations. It may not cover the full range of possible
that the accuracy of our lab condition testing data set is facial expressions, and the
94.63%, and for wild
resolution of the images is relatively low. Therefore, for
emotion detection it achieves only around 37% accuracy. more complex or finegrained emotion recognition tasks,
researchers may combine the FER 2013
networks. It is capable of learning complex patterns 2.3 Deep Learning has achieved significant success
and relationships within data. In in various fields, including image
deep learning, we don’t need to explicitly program recognition, natural language processing, speech
everything. It has become recognition, and recommendation
increasingly popular in recent years due to the systems. Some of the popular Deep Learning
advances in processing power and the architectures include Convolutional
availability of large datasets. Because it is based on Neural Networks (CNNs), Recurrent Neural
artificial neural networks (ANNs) Networks (RNNs), and Deep Belief
networks to model and solve complex problems. made it easier to train deep neural networks.
Neural networks are modeled after
5.1Computational Graph: TensorFlow represents OpenCV (Open Source Computer Vision Library)
computations as a directed graph, known as a is an open-source computer vision and image
computational graph. Nodes in the graph represent processing library. It provides a comprehensive set
operations, and edges represent the flow of data of functions and algorithms for image and video
between operations. This graph-based approach analysis, including object detection, feature
allows for efficient execution and optimization of extraction, image enhancement, and more. OpenCV
complex computations. was originally developed by Intel and is now
maintained by the OpenCV community.
The data is preprocessed to change the format of Sparse Activation: ReLU tends to produce sparse
filename to include labels, and FER 2013 is activations, where only a subset of the neurons are
cropped to separate from background. The test was activated. This can lead to more efficient and
conducted on pre-trained MobileNetV2 model fine- expressive representations in the network.
tuned by Google. The confused matrix is generated
as well as demonstrations.
Faster Convergence: ReLU has been observed to
promote faster convergence during training
9.1 Data Augmentation and Training: compared to other activation functions, such as
sigmoid or tanh.
The dataset is divided into training, validation, and
test. The team also enlarges the dataset by 30 times
through addition of random noise, rotation of
angles, and horizontal flip (like mirror). The dataset 11.SOFTMAX
is also divided based on labels into 7 classes. The Softmax is an activation function that is commonly
training is conducted on MobileNetV2 model.. The used in neural networks, particularly in multi-class
RAW is about 2-3GB The batch size is 32 for classification problems. It transforms a vector of
training and 16 for validation. The total epochs of real- valued numbers into a probability distribution
this training is 25, and the steps of epoch is 448. over multiple classes, assigning probabilities to
The optimization is Adam G and Nesterov each class.
Momentum was applied with base learning rate of
1e-4. The training takes about 8 and half hours to The softmax function takes a vector of input
complete. values, often referred to as logits or scores, and
applies a normalization and exponentiation process
to produce the probabilities. The softmax function
10. ReLU (Rectified Linear Unit) is defined as follows:
14.1 The Result of Training Accuracy and Loss Facial expressions play an important role in finding
Function the roots of causes and issues in our day to day life.
In the earlier era, we had thick fat registers to store
details. This way was totally manual where the
technology hadnt rise high. Then we had this whole
new technology of CCTV cameras and then the
launch of biometric systems. In the near future, the
most widely used technology will be th eface
recognition nad feature classification.
[8]“Confusion matrix.”
https://scikit-learn.org/stable/auto_examples/model
_
selection/plot_confusion_matrix.html#sphx-glr-
auto-examples-model selection-plot- confusion-
matrix-py. Accessed: 2023-07-10.