https://github.com/1homsi/emotion-detection-python
This is a web app (using eel-python) that is used to detect emotions using deep learning. This web app can also train a model.
https://github.com/1homsi/emotion-detection-python
eel eel-python emotion-detection facedetection machine-learning model-training opencv python3
Last synced: 8 months ago
JSON representation
This is a web app (using eel-python) that is used to detect emotions using deep learning. This web app can also train a model.
- Host: GitHub
- URL: https://github.com/1homsi/emotion-detection-python
- Owner: 1homsi
- Created: 2022-04-16T21:21:49.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-07-22T22:49:18.000Z (about 2 years ago)
- Last Synced: 2025-01-08T03:53:41.791Z (9 months ago)
- Topics: eel, eel-python, emotion-detection, facedetection, machine-learning, model-training, opencv, python3
- Language: Python
- Homepage:
- Size: 34 MB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Emotion detection using deep learning
## Introduction
This project aims to classify the emotion on a person's face into one of **seven categories**:
- angry
- disgusted
- fearful
- happy
- neutral
- sad
- surprisedThe project uses deep convolutional neural networks. The model is trained on the **FER-2013** dataset, The dataset consists of 35887 grayscale, 48x48 sized face images.
The User interface is built using eel, a Python library that allows to create web applications in Python.
## Dependencies
- Python 3
- [OpenCV](https://opencv.org/)
- [Tensorflow](https://www.tensorflow.org/)
- eel
- tkinter
- matplotlib##### Download the FER-2013 dataset from [here](https://drive.google.com/file/d/1X60B-uR3NtqPd4oosdotpbDgy8KOfUdr/view?usp=sharing)
- To run the project (windows)
```bash
python main.py
```- To run the project (linux/unix)
```bash
python3 main.py
```## Algorithm
- First, the **haar cascade** method is used to detect faces in each frame of the webcam feed.
- The region of image containing the face is resized to **48x48** and is passed as input to the CNN.
- The network outputs a list of **softmax scores** for the seven classes of emotions.
- The emotion with maximum score is displayed on the screen.
- Algorithm Code [here](https://github.com/atulapra/Emotion-detection)