aj-naik / Emotion-Music-Recommendation

Flask web app for recommending music based on your facial expressions using FER 2013 dataset and Spotify api
MIT License
74 stars 26 forks source link
computer-vision deep-learning emotion-recognition flask keras music-recommendation neumorphic-ui neumorphism opencv python spotify spotify-api spotify-web-api tkinter

Emotion-Music-Recommendation

Recommending music based on your facial expressions using FER 2013 dataset and Sporify api

Demo:

Demo

(Forgive the image quality and my expressions 😆)

Project Description:

The emotion recognition model is trained on FER 2013 dataset. It can detect 7 emotions. The project works by getting live video feed from web cam, pass it through the model to get a prediction of emotion. Then according to the emotion predicted, the app will fetch playlist of songs from Spotify through spotipy wrapper and recommend the songs by displaying them on the screen.

Features:

Running the app:

Flask:

Tech Stack:

Dataset:

The dataset used for this project is the famous FER2013 dataset. Models trained on this dataset can classify 7 emotions. The dataset can be found here.

Note that the dataset is highly imbalanced with happy class having maxiumum representation. This might be a factor resulting in okaysish accuracy after training.

Model Architecture:

Note:- Tried Implementing various other models like VGG16 but accuracy was far too low. This model architecture gives good enough accuracy. A bit more tinkering with hyper parameters might lead to a better accuracy

Image Processing and Training:

Current condition:

The entire project works perfectly fine. Live detection gives good frame rates due to multithreading.

Project Components:

Variant:

Issue:

The app in current state can't be deployed on web as:

Further Work:

Note: Model accuracy is not that great. It is ~66%. Further training and finetuning required. May try Vision Transformer Model.