Skip to content

prakashprajapati-git/Facial_Emotion_Recognition_Machine_Learning

Repository files navigation

Facial Emotion Recognition

This project detects human emotions in real-time using a webcam feed. It uses a Convolutional Neural Network (CNN) model trained on the FER-2013 dataset and OpenCV for face detection and live video processing.

Features

  • Real-time face detection
  • Emotion recognition: Angry, Disgust, Fear, Happy, Neutral, Sad, Surprise
  • Webcam-based input
  • Simple and easy-to-run Python script

Requirements

  • Python 3.x
  • TensorFlow / Keras
  • OpenCV
  • NumPy

Install the required packages using:

pip install -r requirements.txt

How to Run

  1. Clone the repository.
  2. Make sure the files facial_emotion_detector.json and facial_emotion_detector.h5 are in the project folder.
  3. Run the script:
python real_time_detection.py

Files

  • facial_emotion_detector.json – Model architecture

  • facial_emotion_detector.h5 – Trained weights

  • real_time_detection.py – Main script for real-time detection

  • requirements.txt – Python dependencies

About

This project is a real-time Facial Emotion Recognition (FER) system built using Convolutional Neural Networks (CNN) and OpenCV. I built this project as a part of mini project model presentation at my college and despite limited training data and epochs, the model achieved around 62–63% accuracy, showing potential for further optimization.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors