This repository contains the code of our project EmoTunes that uses facial emotion recognition to curate a playlist of songs on Spotify that align with your emotions.
- Tech stack used in frontend is React.js while in the backend we have used Node.js and Flask.
- Leveraged Spotify-API to curate playlists and add them to user's spotify accouint.
- Integration of frontend, backend, and ML models.
- After accesing our web-app, user is greeted with an elegant interface.
- User can now access the webcam and click a beautiful picture of theirs (doing funny faces and emotions) and upload that picture.
- The picture is then pushed into the first model - Facial Emotion Recognition which returns an emotion.
- This emotion is fetched by the second model - Song recommendation model, which returns a list of 50 songs.
- This list is then curated into a playlist using Spotify-API, which the user can add to their spotify account.
- We have created two models - one using deepface and the other using tensorflow (MobileNetV2), with tensorflow model having an accuracy of 96%
- There are 7 classes of emotions (Angry, Fear, Disgust, Happy, Neutral, Sad, Surprise), out of which we are using mainly 4 for playlist curation.
- The dataset that we have used is the FER2013.
- User's picture is analysed and emotion is predicted.
- The dataset used for the music recommendation is 'SpotifySongs.csv'.
- Min-max scaling is applied to scale the numeric features between 0 and 1 and the input features are scaled using the MinMaxScaler.
- Cosine similarity is used to find songs with high similarities based on the emotion returned by the Facial rec model.
- A list containing these 50 songs based on the facial emotion would be returned and fetched using Flask.
pip install deepface cv2 os tensorflow pandas numpy sklearn
cd client npm install cd server npm install