Skip to content

Face Emotion Detector is a Python-based AI project that detects faces in images and predicts emotions like happy, sad, angry, surprised, fearful, disgusted, and neutral using deep learning. Built with Flask, OpenCV, and TensorFlow, it provides a REST API for real-time emotion recognition.

Notifications You must be signed in to change notification settings

Shoaib552/face-emotion-detector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Face Emotion Detector

A real-time face emotion detection web application using TensorFlow and OpenCV.

Features

  • πŸŽ₯ Real-time emotion detection via webcam
  • πŸ“ Image upload and emotion analysis
  • 😊 Detects 7 emotions: angry, disgust, fear, happy, sad, surprise, neutral
  • 🎯 Multiple face detection

Setup

  1. Clone the repository:
git clone https://github.com/Shoaib552/face-emotion-detector.git
cd face-emotion-detector


Set up backend:

bash
cd backend
python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
pip install -r requirements.txt
python download_model.py
python app.py
Set up frontend:

bash
cd ../frontend
python -m http.server 8000
Open http://localhost:8000 in your browser.

Technologies Used
Backend: Flask, TensorFlow, OpenCV

Frontend: HTML5, CSS3, JavaScript

Computer Vision: Haar Cascades, CNN


face-emotion-detector/
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ app.py
β”‚   β”œβ”€β”€ utils.py
β”‚   β”œβ”€β”€ requirements.txt
β”‚   β”œβ”€β”€ download_model.py
β”‚   β”œβ”€β”€ emotion_model.h5          
β”‚   └── haarcascade_frontalface_default.xml
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ index.html
β”‚   β”œβ”€β”€ style.css
β”‚   └── script.js
└── README.md                    

About

Face Emotion Detector is a Python-based AI project that detects faces in images and predicts emotions like happy, sad, angry, surprised, fearful, disgusted, and neutral using deep learning. Built with Flask, OpenCV, and TensorFlow, it provides a REST API for real-time emotion recognition.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published