Skip to content

Design a convolutional neural network (CNN) architecture with appropriate layers for feature extraction and classification to detect emotions in images and Live video.

Notifications You must be signed in to change notification settings

TARUN2K3/Emotion-Detection-CNN

Repository files navigation

Emotion Detection using CNN

Overview

This project implements Emotion Detection using Convolutional Neural Networks (CNN). The model is trained to recognize facial expressions such as happiness, sadness, anger, surprise, disgust, and fear. Emotion detection using Convolutional Neural Networks (CNNs) is a popular and effective method in the field of computer vision and machine learning. CNNs are particularly well-suited for this task because they excel at detecting patterns and features in images, which is crucial for recognizing facial expressions and emotions.

Dataset

The model is trained on the FER2013 dataset, which consists of 35,887 grayscale images of size 48x48 pixels, each labeled with one of seven emotions.

Requirements

  • Python 3.x
  • TensorFlow
  • Keras
  • OpenCV (cv2)
  • Matplotlib
  • NumPy

You can install the required libraries using pip:

pip install tensorflow keras opencv-python matplotlib numpy

Usage

  1. Clone the Repository:

    git clone https://github.com/TARUN2K3/Emotion-Detection-CNNn.git
  2. Navigate to the Project Directory:

    cd Emotion-Detection-CNN
  3. Train the Model:

    Use the provided Jupyter notebook or Python script to train the CNN model on the FER2013 dataset.

    TrainEmotionDetector.py
  4. Run Inference:

    Once the model is trained, you can run inference on images or real-time video using the provided scripts.

    website.py

Results

The trained model achieves an accuracy of approximately 70% on the test set. image

Acknowledgments

  • The FER2013 dataset is provided by Pierre-Luc Carrier and contains images from the Facial Expression Recognition 2013 Challenge.
  • Inspired by various tutorials and resources on CNN-based emotion detection.

About

Design a convolutional neural network (CNN) architecture with appropriate layers for feature extraction and classification to detect emotions in images and Live video.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published