DEV Community

Cover image for Emotion Detection 😠đŸ¤ĸ😱😇😐☹ī¸đŸ˜˛ CNN using keras
Mayank Choudhary
Mayank Choudhary

Posted on • Updated on

Emotion Detection 😠đŸ¤ĸ😱😇😐☹ī¸đŸ˜˛ CNN using keras

We will use 7 emotions namely - We have use 7 emotions namely - 'Angry'😠, 'Disgust'đŸ¤ĸ, 'Fear'😱, 'Happy'😇, 'Neutral'😐, 'Sad'☚ī¸, 'Surprise'😲 to train and test(validation) our algorithm using Convolution Neural Networks. You can directly use kaggle kernel notebook, so that you don't need to download the dataset. Also, you can download your code and run it in your local device directly.
Kaggle notebook - https://www.kaggle.com/mayank7900/notebook0a0917a828/edit

Tools and Libraries used -

  • Install anaconda
  • Jupyter notebook
  • VSCode
  • matplotlib
  • numpy
  • openCV
  • keras

Given dataset of different expressions:

https://www.kaggle.com/jonathanoheix/face-expression-recognition-dataset
Screenshot (249)

Screenshot of some angry expressions from the dataset on kaggle:
image

Screenshot (257)

Emotion Detection — Classifying the emotion on the face as emotion_labels = ['Angry','Disgust','Fear','Happy','Neutral', 'Sad', 'Surprise']
Screenshot (256)
Screenshot (254)

Top comments (5)

Collapse
 
jonrandy profile image
Jon Randy 🎖ī¸ • Edited

Looks at bit off to me - on the last picture (from top left to bottom right) - I'd go with:

excited - definitely not fear, pained - sad is close I guess, pleading - again, sad is close
surprised - certainly not neutral, happy - spot on, confused - not fear

Collapse
 
rado_mayank profile image
Mayank Choudhary

Hahaha right :) Well I have used this picture from the internet for the reference purpose only. My model will work fine with this dataset.

Collapse
 
jonrandy profile image
Jon Randy 🎖ī¸

Poor training data set maybe? or perhaps the subtleties of the human face are beyond the model's ability to discern

Collapse
 
swagwik profile image
Sattwik Sahu

Yo that's pretty neeaaat! Naaahhsss one!

Collapse
 
rado_mayank profile image
Mayank Choudhary

Thanks ;)