You are on page 1of 4

Robust Facial Emotion Detection using CNN

Architecture
Aiman Shahid, Hamad Rizwan
Department of Computer Science Department of Computer Science,
University of Engineering and University of Engineering and
Technology Technology
Taxila, Pakistan Taxila, Pakistan
18-cs-21@students.uettaxila.edu.pk 18-cs-40@students.uettaxila.edu.pk

Abstract— Emotions are a natural and significant visual processing sciences to affective computing
element of human behavior that influence how we and computer animations [2].
communicate. For a greater understanding of human
behavior, precise analysis, and interpretation of the Automatic facial emotion recognition (FER) (An
emotional content of human facial expressions are expanded variant of the acronym FER is used in
required. AI has gained popularity in almost every each study, such as facial emotion recognition and
field. Deep learning methods have been investigated as
a series of strategies for achieving robustness and facial expression recognition.) is a popular topic.
scalability on new types of data. Deep learning is used Because this study focuses on the broad
in this article to recognize human emotions through characteristics of facial emotion recognition, the
facial expressions. We have built a novel CNN model word FER refers to facial emotion recognition in
that can predict human expression from an image.
this work.) With the fast growth of artificial
CK+ and FER2013 dataset was used to experiment
with and train a deep convolutional network in this intelligence approaches, such as human-computer
case. We also applied augmentation techniques like the interface (HCI) [3,4], virtual reality (VR) [5,6],
K-fold method while working with the CK+ dataset. augmented reality (AR) [6, advanced driver
Furthermore, we attained an accuracy rate of 89 assistant systems (ADASs) [7], and entertainment
percent with CK+ and 69 percent with the FER2013
dataset which was far better than many systems. Using [8,9], has also been expanding recently. Although
our CNN model, we recognized six different emotions. many sensors for FER inputs such as
When tested with different people under varying electromyography (EMG), electrocardiogram
ambient and light conditions, our work has shown
positive outcomes. Results were evaluated using the
(ECG), electroencephalograph (EEG), and camera
confusion matrix and roc curve. may be used, a camera has been the most successful
sensor that detects since it gives the most useful
Keywords— facial emotion recognition, deep learning- information for FER and does not require
based facial emotion recognition, classification, CNN, k- maintenance.
fold technique.
In this paper, we present a deep learning-based
I. INTRODUCTION emotion detection model based on facial
expressions from photographs. Unlike previous
Facial expressions are key components of human
applications, the system maintains high accuracy
communication because they help us perceive
outcomes in a variety of environments and models.
others' intentions. People use facial expressions and
In our experiment, we developed a novel CNN
verbal tones to infer other people's emotional states,
model. In our experiment, we used two datasets:
such as joy, sadness, and aggression. Verbal
FER2013 and CK+. The CNN model was then
components transmit one-third of human
trained using both datasets. Furthermore, the
communication, whereas nonverbal components
accuracy of the produced CNN's was checked by
convey two-thirds, according to different research
comparing them to test data.
[1,2]. Facial expressions are one of the most
important nonverbal components in social
communication because they contain emotional II. LITERATURE REVIEW
significance. As a result, it's not a bit surprising that Deep learning has addressed issues in a variety of
face emotion research has gotten a lot of attention fields [9], while previous techniques involved
in recent decades, with applications ranging from manually gathering data and making decisions
based on a set of rules. The sensory mistake is
highly likely to occur in the earlier approaches, and recognize a face, facial expression, eye, and head
decisions are made based on a human-built set of movement to determine the learner's interest,
rules, which may or may not be always right. boredom, and so on during learning. In comparison to
Researchers have used a variety of approaches to other modern systems, machine learning and deep
classify human face expression, including support learning algorithms be more efficient in terms of
vector machines [10], principal component analysis implementation and outcomes [21].
[11], and convolutional neural networks [12, 13]. CNN can not only recognize the face and facial
The majority of real-time emotion detection expressions, but it can also be fine-tuned to detect
research has focused on visuals. certain areas of the face rather than the entire face.
Furthermore, on numerous datasets, including FER-
When the studies in the literature on facial emotion
2013, CK+, FERG, and JAFFE [22] [23] [24], the
identification with computer vision techniques are
CNN model outperforms previous approaches.
evaluated over the last several years, they indicate a
Even though there has been a lot of work done on
considerable increase in the development of
emotion recognition, it has all been focused on
computer technology.
discovering the fundamental emotion, but the
Even though there are several applications for facial complex emotions that humans confront during the
recognition and detection. Breuer and Kimmel [14] learning process have been neglected.
employed visual approaches to interpret a CNN
model for emotion identification that was trained
with a range of datasets. They put CNN to the test III. PROBLEM STATEMENT
on datasets for face emotion detection as well as In the fields of computer vision and artificial
several facial emotion recognition applications. intelligence, facial emotion recognition plays a
Jung et al. [15] devised a method that combined critical role. Emotion is one of the fundamental
two forms of CNNs. One of them is the expressions of human beings. It is an integral part
identification of geometric aspects of facial parts, of our nonverbal communication. It helps in
while the other is feature extraction from visual determining a person's ideas, behavior, and feelings.
data. Based on facial expressions, we provide the
Liu et colleagues [16] categorize distinct facial findings of recognizing five emotional states
expressions using the FER2013 dataset and a two- (Neutral, Happy, Sad, Anger, and Fear). To predict
layer CNN. They also compared it to four other the grayscale picture of a person’s face, which
existing models, finding that the suggested model had emotion the facial expression conveys. Our
a test accuracy of 49.8%. S Suresh et al [17] created a evaluation metric will be the accuracy for each
Deep Neural Network-based sign language emotion (fraction of correctly classified images)
recognition system that distinguishes six distinct sign [12], supplemented by confusion matrix which
languages (DNN). When two models with different highlights which emotions are better recognized
optimizers (Adam and SGD) are compared, it is than others. Our system would be to understand a
discovered that the model with the Adam optimizer is face and its characteristics and then make a
more accurate. K. Bouaziz et al [18] have exhibited weighted assumption of the identity of the person.
an analytics approach that incorporates picture
recognition tools and methodologies. The suggested
model uses CNN architecture to classify different
types of handwriting. Automatic facial expression
recognition was achieved in [19] by extracting
features using wavelets modification and classifying
emotions using the K-nearest neighbors (KNN)
algorithm.

Because a person's face often has many traits,


scientists used principal component analysis (PCA)
to identify facial features.
Krithika et al. [20] employed the Voila Jones
algorithm and local binary patterns (LBP) to
 Input: 48 by 48 grayscale image of a face

IV. PROPOSED SOLUTION

 Output: Emotion conveyed by facial


expression

V. REFERENCES [6] Chen, C. H., Lee, I. J., & Lin, L. Y. (2015). Augmented
[1] Mehrabian A. Communication without words. reality-based self-facial modeling to promote the emotional
InCommunication theory 2017 Sep 4 (pp. 193-200). expression and social skills of adolescents with autism
Routledge. spectrum disorders. Research in developmental disabilities,
[2] Kaulard, K., Cunningham, D.W., Bülthoff, H.H. and 36, 396-403.
Wallraven, C., 2012. The MPI facial expression database—a [7] Assari, M. A., & Rahmati, M. (2011, November). Driver
validated database of emotional and conversational facial drowsiness detection using face expression recognition. In
expressions. PloS one, 7(3), p.e32321. 2011 IEEE International Conference on Signal and Image
[3] Sandoval, Francisco, Alberto Prieto, Joan Cabestany, and Processing Applications (ICSIPA) (pp. 337-341). IEEE.
Manuel Graña, eds. Computational and Ambient [8] Zhan, C., Li, W., Ogunbona, P., & Safaei, F. (2008). A real-
Intelligence: 9th International Work-Conference on Artificial time facial expression recognition system for online games.
Neural Networks, IWANN 2007, San Sebastián, Spain, June International Journal of Computer Games Technology, 2008.
20-22, 2007, Proceedings. Vol. 4507. Springer, 2007. [9] Semwal, V. B., Mondal, K., & Nandi, G. C. (2017). Robust
[4] Bartneck, C. and Lyons, M.J., 2007, July. HCI and the face: and accurate feature selection for humanoid push recovery
Towards an art of the soluble. In International Conference on and classification: deep learning approach. Neural
Human-computer Interaction (pp. 20-29). Springer, Berlin, Computing and Applications, 28(3), 565-574.
Heidelberg. [10] Chen, L., Zhou, C. and Shen, L., 2012. Facial expression
[5] Hickson, S., Dufour, N., Sud, A., Kwatra, V. and Essa, I., recognition based on SVM in E-learning. Ieri Procedia, 2,
2019, January. Eyemotion: Classifying facial expressions in pp.781-787.
VR using eye-tracking cameras. In 2019 IEEE Winter [11] Ren, X.D., Guo, H.N., He, G.C., Xu, X., Di, C. and Li, S.H.,
Conference on Applications of Computer Vision (WACV) 2016, June. Convolutional neural network based on principal
(pp. 1626-1635). IEEE. component analysis initialization for image classification. In
2016 IEEE first international conference on data science in
cyberspace (DSC) (pp. 329-334). IEEE.
[12] Chen, X., Yang, X., Wang, M., & Zou, J. (2017, May). [17] Solanki, Shivangi. "DEEP CONVOLUTIONAL NEURAL
Convolution neural network for automatic facial expression NETWORKS FOR FACIAL EMOTION RECOGNITION."
recognition. In 2017 International conference on applied Turkish Journal of Physiotherapy and Rehabilitation 32: 3.
system innovation (ICASI) (pp. 814-817). IEEE. [18] Zhou, F., Fan, W., Sheng, Q. and Tao, M., 2018, July. Ship
[13] Alizadeh, S., and A. Fazel. "Convolutional neural networks detection based on deep convolutional neural networks for
for facial expression recognition. arXiv 2017." arXiv preprint polsar images. In IGARSS 2018-2018 IEEE International
arXiv:1704.06756 (2017). Geoscience and Remote Sensing Symposium (pp. 681-684).
[14] Breuer, Ran, and Ron Kimmel. "A deep learning perspective IEEE.
on the origin of facial expressions." arXiv preprint [19] Ou, J., 2012. Classification algorithms research on facial
arXiv:1705.01842 (2017). expression recognition. Physics Procedia, 25, pp.1241-1244.
[15] Jung H, Lee S, Yim J, Park S, Kim J. Joint fine-tuning in [20] Krithika, L.B. and GG, L.P., 2016. Student emotion
deep neural networks for facial expression recognition. recognition system (SERS) for e-learning improvement based
InProceedings of the IEEE international conference on on learner concentration metric. Procedia Computer Science,
computer vision 2015 (pp. 2983-2991). 85, pp.767-776.
[16] Modi, Shrey, and Mohammed Husain Bohara. "Facial [21] Revina, I.M. and Emmanuel, W.S., 2018. A survey on human
Emotion Recognition using Convolution Neural Network." In face expression recognition techniques. Journal of King Saud
2021 5th International Conference on Intelligent Computing University-Computer and Information Sciences.
and Control Systems (ICICCS), pp. 1339-1344. IEEE, 2021. [22] Minaee, Shervin, Mehdi Minaei, and Amirali Abdolrashidi.
"Deep-emotion: Facial expression recognition using
attentional convolutional network." Sensors 21, no. 9 (2021):
3046.
[23] Sun, A., Li, Y.J., Huang, Y.M. and Li, Q., 2017, September.
Using facial expression to detect emotion in e-learning
system: A deep learning method. In International Symposium
on Emerging Technologies for Education (pp. 446-455).
Springer, Cham.
[24] Zadeh, M.M.T., Imani, M. and Majidi, B., 2019, February.
Fast facial emotion recognition using convolutional neural
networks and Gabor filters. In 2019 5th Conference on
Knowledge Based Engineering and Innovation (KBEI) (pp.
577-581). IEEE.

You might also like