https://github.com/rahul1582/emotion-detector
An Emotion Detector Using CNN
https://github.com/rahul1582/emotion-detector
cnn data-augmentation emotion-detector fer2013 opencv
Last synced: 2 months ago
JSON representation
An Emotion Detector Using CNN
- Host: GitHub
- URL: https://github.com/rahul1582/emotion-detector
- Owner: Rahul1582
- License: apache-2.0
- Created: 2020-04-11T07:31:16.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2022-11-21T22:48:34.000Z (over 3 years ago)
- Last Synced: 2025-03-31T05:17:05.109Z (over 1 year ago)
- Topics: cnn, data-augmentation, emotion-detector, fer2013, opencv
- Language: Python
- Homepage: https://nbviewer.jupyter.org/github/Rahul1582/Emotion-Detector/blob/master/src/emotions.py
- Size: 16.8 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Emotion-detection Using CNN
This project aims to classify the emotion on a person's face into one of **seven categories**, using deep convolutional neural networks.
The model is trained on the **FER-2013** dataset.
## Dependencies
To install the required packages, run `pip install -r requirements.txt`.
## Technologies Used
```
1.Python
2.Convolution Neural Network(CNN)
3.Open CV
4.Data Augmentation
```
## To Run
First, clone the repository and enter the folder src
Download the FER-2013 dataset from [here](https://drive.google.com/file/d/1X60B-uR3NtqPd4oosdotpbDgy8KOfUdr/view?usp=sharing) and unzip it inside the `src` folder. This will create the folder `data`.
I had added the dataset into gitignore as it is a very big file.
If you want to train this model, use:
cd src
python emotions.py --run train
If you want to view the predictions without training again, you can download the pre-trained model from [here](https://drive.google.com/file/d/1FUn0XNOzf-nQV7QjbBPA6-8GLoHNNgv-/view?usp=sharing).
If you want to use the web camera or give input as a video to detect emotions just run-
cd src
python emotions.py --run test
with USE_WEBCAM as True or False
If you want to detect emotions in a picture just run-
cd src
python emotions.py --run picture
With a simple 4-layer CNN, the test accuracy reached 63% in 50 epochs.
## Data Preparation (optional)
The [original FER2013 dataset in Kaggle](https://www.kaggle.com/deadskull7/fer2013) is available as a single csv file.
### Demo
Model Summary--