AI Human Emotion Detection System
π Project Overview
The AI Human Emotion Detection System is a deep learning application that detects human emotions in real time using a webcam. It uses OpenCV for face detection and a Convolutional Neural Network (CNN) trained on the FER-2013 dataset to classify facial expressions into seven emotions.
π― Features
- Real-time webcam emotion detection
- Face detection using OpenCV
- Emotion classification using a CNN model
- Detects seven emotions:
- Angry
- Disgust
- Fear
- Happy
- Neutral
- Sad
- Surprise
- Confidence score display
- MySQL database integration for storing predictions
- Easy-to-use interface
π οΈ Technologies Used
- Python
- TensorFlow / Keras
- OpenCV
- NumPy
- MySQL
- FastAPI (Backend)
- (Frontend)
- Git & GitHub
π Project Structure
Emotion-detection/ β βββ backend/ βββ dataset/ βββ frontend/ βββ model/ β βββ detect_emotion.py β βββ train_model.py β βββ emotion_model.h5 β βββ db.py β βββ labels.txt β βββ haarcascade_frontalface_default.xml β βββ requirements.txt βββ README.md
π Dataset
Dataset: FER-2013
The model is trained to classify facial expressions into seven emotion categories using grayscale facial images.
βοΈ Installation
Clone the repository:
git clone https://github.com/hima065/Emotion-Detection.git
Go to the project folder:
cd Emotion-detection
Install the required packages:
pip install -r requirements.txt
Run the application:
python model/detect_emotion.py
π Future Enhancements
- User authentication
- Emotion analytics dashboard
- PDF and CSV report generation
- Email notifications
- Cloud deployment
- Mobile application integration