This project is a part of the course CS4270: Conversational Agents at Delft University of Technology.
Detects users emotion based on captured frame. API calls are made to this server from the conversational agent MathTutor. The code for the MathTutor can be found here.
Make sure the following dependencies are installed. We recommened using a new conda environment.
- python=3.8
- pytorch <= 1.8.1
- scikit-learn
- numpy
- pandas
- matplotlib
This project uses the EMOTIC dataset and follows the methodology as introduced in the paper 'Context based emotion recognition using EMOTIC dataset'.
To make it easier for you we have hosted the EMOTIC dataset as well, if you intend to make use of it.
Link to data: https://tud365.sharepoint.com/:f:/s/ConversationalAgents2021/EoSyoFarxCJFoZrfkgft3iQBnpRRPZNavJ6La5ZfRhrFXw?e=61LcKf
If you do not wish to train the model from scratch, section 12 will show you how you can use pretrained versions of the model along with a few examples
Pretrained model files located at OneDrive.
- Execute app.py
- Server runs on localhost port 5000
- API call http://127.0.0.1:5000/api/v1/getEmotion returns the emotion with the highest probabilty
- In case the model fails it returns "Error"