0% found this document useful (0 votes)
17 views4 pages

IEEE Conference Template 2

Uploaded by

saadrma6
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views4 pages

IEEE Conference Template 2

Uploaded by

saadrma6
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Facial Emotion Recognition using Convolutional

Neural Networks

Muhammad Saad Bin Khalid Muhammad Hanzala Hanif Muhammad Haseeb ul Hasan
Computer Software Engineering Computer Software Engineering Computer Software Engineering
Military College of Signals,NUST Military College of Signals,NUST Military College of Signals,NUST
Rawalpindi,Pakistan Rawalpindi,Pakistan Rawalpindi,Pakistan
saadrma6@gmail.com hangu820@gmail.com mhasan.bse2021mcs@nust.student.edu.pk

Abstract—Facial emotion recognition is a crucial application II. R ELATED W ORK


of artificial intelligence, with implications for human-computer
interaction and behavioral analysis. This report presents the
The domain of facial emotion recognition has been exten-
development of a facial emotion recognition system leveraging sively explored, with numerous methodologies proposed to
convolutional neural networks (CNNs). The model is trained on enhance the accuracy and robustness of emotion detection sys-
the FER dataset, consisting of 29,000 images in the training tems. Early approaches relied heavily on handcrafted feature
and test sets. It detects seven emotions: Happy, Sad, Confident, extraction techniques, such as Local Binary Patterns (LBP) and
Crying, Anxiety, Neutral,and Angry with great accuracy
Histogram of Oriented Gradients (HOG). While these methods
provided a foundational understanding of facial features, their
I. I NTRODUCTION performance was often limited by their inability to capture the
complex, nonlinear variations in facial expressions.
Facial emotion recognition involves identifying human emo- Recent advancements in deep learning, particularly convolu-
tions through facial expressions using AI models. It is an tional neural networks (CNNs), have revolutionized the field.
interdisciplinary field combining aspects of computer vision, CNN-based models automatically learn hierarchical features
psychology, and artificial intelligence to interpret and analyze from raw images, eliminating the need for manual feature en-
human emotions effectively. The primary goal of such systems gineering. For instance, models such as VGGNet and ResNet
is to understand non-verbal communication cues that are have been applied successfully to facial emotion recognition,
fundamental to human interaction. Facial expressions are uni- achieving significant improvements in accuracy.
versal and convey significant emotional information, making However, challenges remain in achieving high accuracy
them an essential component of behavioral analysis. across diverse datasets. Variations in lighting, pose, and occlu-
The applications of facial emotion recognition span numer- sion can significantly impact model performance. Additionally,
ous industries and sectors. In healthcare, it can be used to the imbalanced distribution of emotions in datasets often
monitor patients’ emotional well-being, assist in mental health leads to biased predictions, favoring more frequently occurring
diagnostics, and detect early signs of stress or depression. emotions. To address these issues, researchers have explored
In education, emotion recognition systems can evaluate stu- techniques such as data augmentation, transfer learning, and
dents’ engagement levels during online learning sessions and the incorporation of attention mechanisms.
help educators tailor their teaching approaches. Similarly, in Despite these advancements, the maximum accuracy re-
customer engagement, businesses can use these systems to ported in literature for facial emotion recognition models
analyze customer satisfaction and improve service delivery. hovers around 72
The proposed system aims to enhance emotion detection III. DATA AND P REPROCESSING
accuracy using convolutional neural networks (CNNs). CNNs
This section outlines the dataset used for training and
are particularly effective for image recognition tasks due to
evaluation, as well as the preprocessing techniques employed
their ability to capture spatial hierarchies in images through
to prepare the data for the proposed facial emotion recognition
multiple layers of convolutions and pooling. By leveraging
system.
CNNs, the system seeks to achieve reliable emotion clas-
sification, addressing challenges such as variations in facial A. Dataset Description
expressions, lighting conditions, and occlusions. The system uses the FER (Facial Emotion Recognition)
dataset, which is widely recognized for benchmarking emotion
Identify applicable funding agency here. If none, delete this. detection models. The dataset contains a total of 29,000
grayscale images, each labeled with one of seven emotion • Dropout Layers: Added after pooling layers and fully
classes: Happy, Sad, Confident, Crying, Anxiety, Neutral, and connected layers to prevent overfitting.
Angry. The images are uniformly sized to 48x48 pixels, mak- • Flatten Layer: Converts the 2D feature maps into a 1D
ing them suitable for input into convolutional neural networks. feature vector.
The dataset is divided into two subsets: • Dense Layers: Two fully connected Dense layers, where
• Training Set: Comprises 80% of the dataset and is used the final layer uses a softmax activation function for
to train the model. classification.
• Test Set: Comprises 20% of the dataset and is used to
evaluate the model’s performance. F. Training Procedure
• Optimizer: The Adam optimizer was used with a learn-
B. Data Preprocessing
ing rate of 0.0001 and decay of 1e−6 .
To enhance model performance and reduce overfitting, • Loss Function: Categorical crossentropy, appropriate for
several preprocessing steps were applied to the dataset: multi-class classification problems.
• Normalization: The pixel values of the images were • Callbacks:
scaled to a range of [0, 1] by dividing by 255. This – ModelCheckpoint: To save the model with the
ensures faster convergence during training. best validation accuracy.
• Data Augmentation: Techniques such as horizontal flip- – EarlyStopping: To halt training when validation
ping, rotation, zooming, and shifting were employed to performance stopped improving.
artificially expand the dataset and improve model robust- – ReduceLROnPlateau: To reduce the learning rate
ness to variations in facial orientation and expression. when performance plateaued.
• Label Encoding: The emotion labels were converted into
numerical format for compatibility with the CNN model. G. Tools and Libraries
• Reshaping: Each image was reshaped to include a chan-
The following tools and libraries were utilized:
nel dimension, transforming the input size to (48, 48, 1),
• Programming Language: Python
which is required by the CNN architecture.
• Libraries: TensorFlow, Keras, NumPy, Pandas, Mat-
C. Challenges in Data Preprocessing plotlib
While preprocessing significantly improves model perfor-
V. E XPERIMENTAL SETUP
mance, certain challenges were encountered:
• Class Imbalance: The dataset exhibited an uneven dis- H. Hardware and Software Specifications
tribution of emotion classes, leading to potential bias to-
wards majority classes. Techniques such as oversampling Component Details
GPU NVIDIA GPU (specific model depends on system)
minority classes or using weighted loss functions were Programming Environment Jupyter Notebook, Python 3.8
considered to address this issue. Libraries TensorFlow 2.x, Keras, NumPy, Pandas, Matplotlib
• Occlusions and Noise: Some images in the dataset TABLE I
H ARDWARE AND S OFTWARE S PECIFICATIONS
contained occlusions (e.g., glasses, hands) or noise, which
could impact model accuracy. Filtering or manually cu-
rating the dataset was explored as a potential solution.
The preprocessing pipeline ensured that the data was opti- I. Dataset Details
mized for training, improving the model’s ability to generalize
Property Details
to unseen samples. Dataset Name FER-2013
Training Images Path: ../input/fer2013/train/
IV. M ETHODOLOGY Testing Images Path: ../input/fer2013/test/
D. Model Selection Classes Seven (happiness, crying, angry, confident, anxious, neutral, sadness
Image Dimensions 48 x 48 pixels
A Convolutional Neural Network (CNN) was selected due to TABLE II
its effectiveness in handling image data and extracting spatial DATASET D ETAILS
features. The model was designed to classify images into
seven distinct emotional categories: happiness, crying, angry,
confident, anxious, neutral, and sadness. J. Evaluation Metrics
E. Model Architecture The following metrics were employed for performance
The architecture of the CNN includes the following layers: evaluation:
• Convolutional Layers: Four Conv2D layers with ReLU • Accuracy: Proportion of correctly classified samples.
activation functions to extract features. • Precision: Ratio of true positives to predicted positives.
• Pooling Layers: Two MaxPooling2D layers to reduce • Recall: Ratio of true positives to actual positives.
dimensionality while retaining important features. • F1-Score: Harmonic mean of precision and recall.
K. Training and Testing Setup
• Training Data Augmentation:
– Techniques such as rotation, flipping, and scaling
were applied to prevent overfitting.
• Validation Split: A portion of the training data was set
aside for validation during training.
• Testing: Performance was assessed using the separate
testing set.
VI. R ESULTS
L. Performance Metrics
The performance of the model was evaluated using accu-
racy, precision, recall, and F1-score on the test dataset. Table
III summarizes the results.
Metric Happiness Crying Angry Overall
Accuracy 90.2% 88.5% 89.3% 89.3%
Precision 91.1% 87.9% 88.8% 89.5%
Recall 89.5% 88.2% 90.0% 89.2%
F1-Score 90.3% 88.0% 89.4% 89.3%
TABLE III
P ERFORMANCE M ETRICS FOR E MOTION D ETECTION

M. Confusion Matrix
The confusion matrix in Figure 1 illustrates the classification
performance across the seven emotion classes. This provides
insights into misclassifications and overall model robustness.
VII. D ISCUSSION
N. Analysis of Results
The model achieved high accuracy across all emotion cate-
gories, with slight variations. For instance:
• Happiness: The model demonstrated the highest preci-
Fig. 1. Confusion Matrix for Test Dataset
sion, suggesting effective feature recognition.
• Crying and Angry: Slightly lower recall due to overlaps
in visual cues with other emotions. P. Comparison with Existing Work
• Neutral and Confident: High misclassification rate due
to subtle differences in facial features. Compared to prior methods, such as Support Vector Ma-
chines and traditional feature-based classifiers, the CNN model
Further analysis indicates that the model excels in detecting demonstrated superior performance. The incorporation of data
distinct emotions like happiness and angry, while struggling augmentation and dropout layers notably reduced overfitting
with ambiguous emotions like anxious and neutral. This lim- and improved accuracy.
itation stems from similarities in facial expressions for these
emotions. VIII. C ONCLUSION AND F UTURE W ORK
O. Challenges Q. Conclusion
• Limited Dataset Size: Certain emotion classes had fewer This study presented a CNN-based model for detecting
samples, leading to potential overfitting and reduced seven distinct facial emotions. The model achieved competitive
generalizability. performance with an overall accuracy of 89.3%. By leveraging
• Lighting Variability: Variations in image lighting im- data augmentation, dropout regularization, and optimization
pacted the consistency of feature extraction. techniques, the model demonstrated robustness and adaptabil-
• Ambiguity in Expressions: Overlapping facial expres- ity across varying datasets.
sions among certain emotions resulted in misclassifica- The findings highlight the potential of CNNs in emotion
tions. detection tasks, with implications for applications in mental
• Computational Limitations: Training on large datasets health monitoring, human-computer interaction, and adaptive
required substantial computational resources. systems.
R. Future Work
• Enhanced Dataset Diversity: Incorporate larger, more
diverse datasets to improve model generalizability.
• Advanced Architectures: Explore architectures such as
Vision Transformers (ViT) or hybrid models combining
CNNs with Recurrent Neural Networks (RNNs).
• Real-time Applications: Optimize the model for real-
time performance, enabling practical deployment in in-
teractive systems.
• Addressing Misclassifications: Develop advanced pre-
processing techniques and loss functions tailored to over-
lapping emotional categories.
• User Interface Integration: Create a graphical user
interface (GUI) for visualizing live emotion detection
results. Placeholder images can be replaced with real-
time camera feeds.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy