Skip to content

The model classifies seven emotions: Anger, Contempt, Disgust, Fear, Sadness, Happy, and Surprise, using an ensemble of pre-trained VGG16, ResNet50, and InceptionV3 models. For a demonstration, refer to app.py, which constructs a Gradio app and integrates with Spotify to offer playlists tailored to each detected emotion.

License

Notifications You must be signed in to change notification settings

zakirangwala/emotion-classifier

 
 

Repository files navigation

Emotion Classifier Model

Demo Image

Kaggle Dataset

CK+ Dataset

Emotion Classes

The model classifies the following 7 emotions:

  • Anger
  • Contempt
  • Disgust
  • Fear
  • Sadness
  • Happy
  • Surprise

Pre-Trained Models used in Phase Two

  • VGG16 Model
  • ResNet50 Model
  • InceptionV3 Model

Model Training

To review the model training process, refer to colab.py where the dataset is pre-processed, and a CNN is trained from scratch. This model is evaluated against an ensemble of 3 pre-trained models through various metrics like True Positive (TP), True Negative (TN), False Positive (FP), and False Negative (FN).

Results can be shown via graphs and manual tests.

Demo

To demo the model, please refer to app.py, which builds a Gradio app and integrates with Spotify to provide a preset list of playlists pertaining to each emotion.

Instructions

  1. Clone the code base git clone https://github.com/Ved204/CP468-Facial-Recognition.git
  2. Make a virtual environment python -m venv env and activate source env/bin/activate (For Mac), Windows (Documentation)
  3. Install packages pip install -r requirements.txt
  4. Now run the gradio app using python app.py

*Note: The models should be all preloaded when app is launched and can be selected on the app (Select Model Dropdown Menu)

References

  • Lienhart, Rainer. config/face-detector.xml. Retrieved from OpenCV GitHub Repository for use in facial detection projects.

Authors

  • Zaki
  • Ved
  • Tony
  • Haseeb

About

The model classifies seven emotions: Anger, Contempt, Disgust, Fear, Sadness, Happy, and Surprise, using an ensemble of pre-trained VGG16, ResNet50, and InceptionV3 models. For a demonstration, refer to app.py, which constructs a Gradio app and integrates with Spotify to offer playlists tailored to each detected emotion.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 99.9%
  • Python 0.1%