saikrithik / Emotion-Detector

Modified version of Emotion Detector

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Emotion-Detector

Emotion-Detector to detect angry,sad,disgust emotions.

Dependencies

  • Python 3, OpenCV, Tensorflow
  • To install the required packages, run pip install -r requirements.txt.

Data Preparation (optional)

  • The original FER2013 dataset in Kaggle is available as a single csv file. I had converted into a dataset of images in the PNG format for training/testing and provided this as the dataset in the previous section.
  • In case you are looking to experiment with new datasets, you may have to deal with data in the csv format. I have provided the code I wrote for data preprocessing in the dataset_prepare.py file which can be used for reference.
  • Download the FER-2013 dataset from here and unzip it inside the src folder. This will create the folder data.
  • If you want to train this model, use:
  • Reference

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.

About

Modified version of Emotion Detector

License:MIT License


Languages

Language:Python 100.0%