Skip to content

Human Emotion Analysis using facial expressions in real-time from webcam feed. Based on the dataset from Kaggle's Facial Emotion Recognition Challenge.

License

Notifications You must be signed in to change notification settings

d00914065/realtime-facial-emotion-analyzer

 
 

Repository files navigation

HitCount

Realtime Emotion Analysis from facial Expressions

Realtime Human Emotion Analysis From facial expressions. It uses a deep Convolutional Neural Network. The model used achieved an accuracy of 63% on the test data. The realtime analyzer assigns a suitable emoji for the current emotion.

Model implementation was done in keras.

Some predicted outputs:

Emojis used:

                                         

Snapshot from Realtime emotion Analyzer

The model prediction for the given frame was Neutral which is evident from the picture.

Model Architecture

List of files

facial Emotions.ipynb : Jupyter notebook with well documented code explaining model preparation from start to training. Can be used for retraining the model.
main.py : main python
webcam_utils : Code for realtime emotion detection from face
prediction_utils : Code for doing prediction on image saved on disk
data_prep : Code for preparing dataset for training
preprocess.py : Code for saving images from csv file

How to run

There are two options:

  1. Realtime emotion detection, for this run:
    python main.py emo_realtime
  2. Emotion detection using image path, for this run:
    python main.py emo_path --path <image path>
    e.g: python main.py emo_path --path saved_images/2.jpg

    If you don't want to specify path then just save the image as "1.jpg" inside saved_images folder
    and run: python main.py emo_path

Team Members:

Susanta and Sagnik

Credits

About

Human Emotion Analysis using facial expressions in real-time from webcam feed. Based on the dataset from Kaggle's Facial Emotion Recognition Challenge.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 98.3%
  • Python 1.7%