Skip to content

This project uses a neural network to classify facial expressions in 48x48 grayscale images from the FER Challenge dataset. The workflow includes data preprocessing, model building, training, and evaluation. The model accurately identifies emotions such as happiness, sadness, and anger, and can be extended for real-world emotion recognition.

Notifications You must be signed in to change notification settings

KashifMoin1410/Emotion-Detection-Using-Deep-Learning

Repository files navigation

Emotion Detection Using Deep Learning

Overview

This project implements a deep learning model to classify facial expressions into distinct emotion categories. Utilizing the Facial Expression Recognition (FER) Challenge dataset, the model processes 48x48 pixel grayscale images to identify emotions such as happiness, sadness, anger, and more.

Dataset

  • Source: Facial Expression Recognition (FER) Challenge Dataset
  • Description: The dataset comprises grayscale images of faces, each sized at 48x48 pixels. The faces are centered and aligned, facilitating consistent input for the model. Each image is labeled with one of several emotion categories.

Objective

Develop a convolutional neural network (CNN) model capable of accurately classifying facial expressions into predefined emotion categories based on visual features extracted from the images.

Methodology

1. Data Preprocessing

  • Normalization of pixel values to enhance model performance.
  • One-hot encoding of emotion labels for multiclass classification.
  • Splitting the dataset into training and validation sets to evaluate model generalization.

2. Model Architecture

  • Construction of a CNN with multiple convolutional and pooling layers to extract hierarchical features from the images.
  • Incorporation of dropout layers to mitigate overfitting.
  • Use of dense layers culminating in a softmax activation function to output probability distributions over emotion classes.

3. Training

  • Compilation of the model with categorical cross-entropy loss and an appropriate optimizer (e.g., Adam).
  • Training over multiple epochs with batch processing.
  • Monitoring of training and validation accuracy and loss to assess learning progress.

4. Evaluation

  • Assessment of model performance on the validation set using accuracy and loss metrics.
  • Visualization of training history to identify potential overfitting or underfitting.
  • Generation of confusion matrices to analyze misclassifications.

Dependencies

  • Python 3
  • TensorFlow/Keras
  • NumPy
  • Matplotlib
  • Pandas
  • Scikit-learn

Future Work

  • Integration of real-time emotion detection using webcam input.
  • Enhancement of model accuracy through data augmentation techniques.
  • Deployment of the model as a web application for broader accessibility.

Acknowledgements

About

This project uses a neural network to classify facial expressions in 48x48 grayscale images from the FER Challenge dataset. The workflow includes data preprocessing, model building, training, and evaluation. The model accurately identifies emotions such as happiness, sadness, and anger, and can be extended for real-world emotion recognition.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published