Emotion Based Music Recommendation System

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

Volume 7, Issue 12, December – 2022 International Journal of Innovative Science and Research Technology

ISSN No:-2456-2165

Emotion based Music Recommendation System


Gaikwad Uday Vijaysinh, Ghodake Shubham Shivaji, Mokalkar Renuka Ashok, Jagtap HrutvikShahaji
Computer EngineeringAISSMS College Of EngineeringPune,India

Abstract:- The internet and mobile technology have recommends songs to user according to mood of the user
developed quickly and made it possible for us to freely which was earlier classified into different emotions. In this
access various music resources. While the music industry way user can get recommendation of songs based on his
might lean more toward certain genres of music. But current mood and will change dynamically based on current
there is no particular way by which we can understand mood.
what exactly user wants to listen based on current mood
or emotion. Music is a great way to express emotions and II. RELATED WORK
moods. For example, people like to listen to happy songs
when they are feeling good, a soothing song can help us Emotions are a basic part of human nature. Human’s
to relax when we're feeling stressed or exhausted and emotional states and present moods can be quickly seen
people tend to listen some sort of sad songs when they through their facial expressions. Basic emotions (happy, sad,
angry, excited, surprised, disgusted, fear, and neutral) were
are feeling down. So in this project, we are going to
taken into consideration when developing this system. In
develop a system which will capture the real time
emotion of user by conversating with user or by other this research, face identification was accomplished using a
means and based on that emotion related songs will be convolutional neural network.
recommended. We are going to categorize songs into the Recommended manual playlist segregation and song
groups based on the categories like Happy, Sad, Neutral annotation based on the user's emotional state as a time-
etc. Then according to the captured emotion from the consuming and labor-intensive task. There have been many
user, the songs related to that emotion will be algorithms suggested to automate this process.
recommended. In this way, user can listen the songs
according to the mood. However, the currently used algorithms are slow, use
extra hardware, raise the system's overall cost, and have
Keywords:- Recommendation System, Emotion Recognition, substantially the overall cost of the device and have much
Interactive UI, Mood based classifier. poorer precision.
I. INTRODUCTION It aims to increase the accuracy of the system design.
People frequently use their facial expressions to contrasting a face expression recognition module of the
convey their feelings. It has long been recognized that music system with a dataset that is both user-dependent and user-
may change a person's disposition. A user's mind can be impartial serves to validate it.
gradually calmed down and an overall nice effect can be According to AyushGuidel [1] et al, one may quickly
produced by capturing and recognizing the emotion being determine a person's emotional condition by observing their
uttered by the person and playing appropriate tunes facial expressions. Basic emotions (happy, sad, angry,
matching the one's mood.[7] The goal of the project is to excited, surprised, disgusted, fear, and neutral) were taken
record a person's facial expressions as they exhibit emotion. into account when developing this system. In this research,
The web camera interface for computer systems is used by a face detection was implemented using a convolutional
music player to record human emotion. The software takes a neural network. On the whole, people refer to music as a
user's image and uses image segmentation and image "language of feelings."
processing techniques to extract information from a target
person's face in an effort to determine what emotion they are Sadhvika [4] et al. recommended manual playlist
attempting to convey. The idea attempts to uplift the user's segregation and song annotation based on the user's current
mood by playing music that fits their needs while emotional state as a time-consuming and labor-intensive
simultaneously taking their photograph. Facial expression task. There have been many algorithms suggested to
recognition has been the most effective method of automate this process. However, the currently used
expression analysis known to humanity since ancient times. algorithms are slow, use extra hardware (such EEG
Facial expressions are the best way that people may deduce structures and sensors), raise the system's overall cost, and
or evaluate the emotion, sentiment, or thoughts that another have substantially lower accuracy.
person is attempting to express. Mood modification may
occasionally be useful in overcoming depressive and sad The report suggested by Ramya Ramanathan [3]
circumstances. Many health dangers can be prevented with described an intelligent music player that used emotion
the use of expression analysis, and actions can be done to recognition. A fundamental aspect of human nature is
improve a user's mood as well. emotion. They have the most significant role in life. Human
emotions are intended to be shared and understood by
Our project focuses classification of songs based on others. The local music library of the user is initially sorted
acoustic features. Then system determines the mood of the in accordance with the feelings the album arouses. The
user through its facial expressions and eventually system lyrics of the music are frequently taken into consideration to

IJISRT22DEC103 www.ijisrt.com 542


Volume 7, Issue 12, December – 2022 International Journal of Innovative Science and Research Technology
ISSN No:-2456-2165
ascertain this. This paper discusses in detail the methods for III. SYSTEM OVERVIEW
human emotion detection that are available for use in
developing emotion-based music players, the method a It is advantageous for us to display user and music
music player uses to detect human emotions, and the best player interaction in the proposed system. The system's main
way to use the proposed system for emotion detection. function is to ensure that the camera adequately captures the
Additionally, it gives a brief explanation of how our systems face. Convolutional Neural Network, which forecasts
work, how to create playlists, and how to classify emotions. emotion, is given images that have been captured. After that,
a playlist of songs is generated using the emotion that was
Preema [2] et al. claim that creating and maintaining a recorded in the image. The major goal of our suggested
large playlist requires a lot of time and work. The report method is to automatically generate a music playlist to alter
claims that the "music player itself selects a song based on the user's mood, which can be joyful, sad, natural, or
the user's current mood, and the application analyses and astonished. When a topic has a negative feeling, the
categorizes audio files according to audio properties to suggested system recognizes those emotions and displays a
construct playlists depending on moods. playlist of the best music to lift the person's spirits.

Fig. 1: System Overview

[5 ]Given diagram gives the clear understanding of training set, whereas 3,589 examples make up the
how the system is going to work. This includes sequential public test set.
steps in which every step has its own significance. First
system classifies the songs on its acoustic feature like b) Music Mood Dataset
loudness, tempo, energy etc. and the mood of the music is A labeled dataset with the size of 686 is used.
determined. In this way all the songs in the dataset are
classified into different moods and based on the input It has 19 columns including name, album, artist,
received from the user system recommends the songs to the id, release_date, popularity, length, danceability,
user. acousticness, energy, instrumentalness, liveness,
valence, loudness, speechness, tempo, key, time
System mainly divided into 4 components. It includes signature, and mood.
Real Time Capture, Face Recognition, Emotion Detection,
Music Recommendation. While recommending a song The moods are in four categories: Calm, Happy,
system goes throughout these steps. In real time capture Energetic, Sad.The features of Length, Danceability,
system captures the face of the user and in the subsequent Acousticness, Energy, Instrumentalness, Liveness,
step CNN algorithm evaluates the features of that image. Valence, Loudness, Speechiness and Tempo are used
After detecting the mood or emotion of the image system for training the model because they have more
recommends the appropriate song to the user. influence to classify the tracks.

IV. METHODOLOGY

A. Dataset Description:
a) Image Dataset:
The FER2013 dataset was utilized to develop the
model. 48x48 pixel grayscale portraits of faces make
up the data. Anger, Disgust, Fear, Happy, Sad,
Surprise, and Neutral are the seven emotions that are
assigned to each image. 28,709 samples make up the Fig. 2: Music Mood Dataset

IJISRT22DEC103 www.ijisrt.com 543


Volume 7, Issue 12, December – 2022 International Journal of Innovative Science and Research Technology
ISSN No:-2456-2165
B. Emotion Detection: The deeper layer filters have more features, but they require
One application that falls under computer vision a lot.
technology is face detection. Algorithms are created and
trained in this procedure to correctly locate faces or objects For this, we made use of the Convolution neural
in object detection or related systems in photos. Real-time network's robust, discriminative features. Feature maps,
detection from a video frame or image is possible. which are an intermediate representation for all layers
following the first, will be the model's outputs. Load the
By minimizing outside noises and other elements, face input image that you wish to see the feature map for so you
detection primarily aims to identify the face within the can see what features were most important for classifying
frame. This method is based on machine learning, and a the image.
collection of input files is used to train the cascade
function.This makes use of machine learning techniques to Using the Relu activation function in the convolution
extract training data with a high degree of accuracy. neural network architecture, filters or feature detectors are
applied to the input picture to generate feature maps or
We use the pre-trained network, which is a sequential activation maps. Feature detectors or filters can be used to
model, as an arbitrary feature extractor while performing identify edges, vertical and horizontal lines, bends, and other
feature extraction. allowing the input image to progress to characteristics that are already present in the picture. To
the next layer, stopping there, and using that layer's outputs achieve translation invariance, the feature maps are then
as our features. Use only a few filters because the initial pooled. The principle behind pooling is that when we
convolutional network layers retrieve the highest-level slightly alter the input, the pooled outputs remain
characteristics from the captured image. As we add deeper unchanged. It is possible to utilise any pooling from the
levels, we multiply the number of filters by two or three, minimum, maximum, or average. However, as compared to
depending on how big the filter was in the preceding layer. min or average pooling, max-pooling provides better
performance.

Fig. 3: Convolutional Neural Network

The image's class will either be binary or multi-class to When emotion is detected through facial expressions, we
distinguish between different types of clothing or to identify assign the appropriate category to that mood, for example if
digits. The learned properties in a neural network cannot be detected mood is happy then system will recommend songs
understood because neural networks are like a "black box." from happy category those were already categorized.
Consequently, the CNN model basically returns the findings In this way, song is recommended to the user.
after receiving an input image. The model that was learned
by weights using CNN is loaded to detect emotions. When a V. FUTURE SCOPE
user takes a real-time image, the image is submitted to a
CNN model that has already been trained. The CNN model This system is completely operational, however there
then predicts the emotion and adds a label to the image. is still opportunity for advancement. A lot of changes may
be made to the programme to enhance user experience
C. Music Recommendation: generally and provide better outcomes.
Our dataset contains various features that too are also
considered as acoustic features of that particular song, every Currently existing systems face difficulties while
feature has its magnitude which defines the intensity of the giving manual inputs but our system performs well when
that feature. Magnitude may range in different scales. In there is difficulty in giving manual inputs as we are
general, less Magnitude Or negative value of the Magnitude dynamically determining the mood of a person from its
represent that least contribution of that feature to overall expressions. In addition to this, this system not only used as
mood of the song, and obviously if Magnitude has larger a feature but also as a independent system. If further
value then that feature dominantly contribute to the overall technical advancements done and if it improved the
mood of that song.In this way, there are 4-5 main features efficiency of the algorithm used then we can also
amongst 18-19 that contribute more.[8]We get desired mood recommend the songs on crucial and trivial expressions. [6]
for the song after training the model based on that dataset. In Current system mainly focuses on doing the
this way, songs are classified into different categories like recommendation on content based features that is based on
happy, sad, neutral and energetic. its acoustic parameters. But in future hybrid model can be

IJISRT22DEC103 www.ijisrt.com 544


Volume 7, Issue 12, December – 2022 International Journal of Innovative Science and Research Technology
ISSN No:-2456-2165
created that uses both content based and collaborative(user It is with great pleasure that we thank Prof.
history, feedback, liking etc.) for recommendations. A.M.Jagtap, our project guide, for his constructive and
motivating feedback during the project's planning process as
Future objectives for the system include creating a well as for consistently guiding us and offering us insightful
device that might support the use of music therapy in the information.
treatment of patients who are suffering from mental stress,
anxiety, acute depression, and trauma. There is a chance to Last but not least, we want to express our gratitude to
add some functionality as a potential repair in the future due our friends, the teaching and non-teaching staff, whose
to the current system's poor camera resolution and support and advice allowed us to improve our B.E. project.
performance in extremely low light conditions. If camera We also appreciate our parents' unwavering help and well
faces bad light issues then either based on his approximate wishes.
expressions, music can be recommended or as we mentioned
earlier we can make use of collaborative features to REFERENCES
recommend appropriate song to the user. As this problem is
more inclined towards hardware issue we can overcome it [1.] AYUSH Guidel, Birat Sapkota, Krishna Sapkota,
by using high quality camera devices and sensors having Music recommendation by facial analysis, February
high end technical specifications. 17, 2020.
[2.] Preema J.S, Rajashree, Sahana M, Savitri H, Review
VI. CONCLUSION on facial expression-based music player,
International Journal ofEngineering Re-search &
There are several methods to use the Music Technology (IJERT), ISSN-2278-0181, Volume 6,
Recommender System, according to a thorough examination Issue 15, 2018.
of the literature. The methods proposed by preceding [3.] Ramya Ramanathan, Radha Kumaran, Ram Rohan R,
researchers and developers were examined. So when we Rajat Gupta, and Vishalakshi Prabhu, an intelligent
started studying we mainly found 2 approaches and that too music playerbased on emo-tion recognition, 2nd
independent. The first approach was like just determining IEEE International Conference on Computational
the accurate emotion from the facial expression and second Systems and Information Technology for Sustainable
one was classifying the songs into the front emotions based Solutions 2017.
on their acoustic features. The goals of our system were https://doi.org/10.1109/CSITSS.2017.8447743
fixed based on the results. So we decided to merge these two [4.] CH. sadhvika, Gutta.Abigna, P. Srinivas reddy,
approaches and provide complete solution for existing Emotion-based music recommendation system,
problem. The available technology can determine a user's Sreenidhi Institute of Science and Technology,
emotions. The system was able to identify happy, sad, Yamnampet, Hyderabad; International Journal of
angry, neutral, or shocked emotions. The suggested Emerging Technologies and Innovative Research
approach presented the user with a playlist of music matches (JETIR) Volume 7, Is-sue 4, April 2020.
that corresponded to the user's emotion after identifying it. [5.] Madhuri Athvale , Deepali Mudale, Upasana
Memory and CPU usage increase as a result of processing a Shrivatsav, Megha Gupta, Music Recommendation
large dataset. Development will become more difficult and based on Face Emotion Recognition, Department of
appealing as a result. The goal is to develop this application Computer Engineering, NHITM, Thane, India
as affordably as feasible and on a common platform. Our [6.] Sheela Kathavate, Music Recommendation System
facial emotion-based music recommendation system will using Content and Collaborative
make it easier for users to make and manage playlists. Filtering Methods,Department of Information
Science and EngineeringBMS Institute of
ACKNOWLEDGMENT Technology and ManagementBangalore, India.
[7.] AmeyUjlambkar, Omkar Upadhye, Akshay
A B.E. project requires the cooperation and direction Deshpande, GunwantSuryawanshi, Mood Based
of many people. We consequently believe that thanking Music Categorization System for Bollywood Music.
everyone who supported us in this endeavour is our top [8.] Jose Padial. Ashish Goel, Music
priority. Mood Classification.
We would like to express our gratitude to Dr. D.S. Note: This paper focuses the implementation of the system
Bormane, our principal, for inspiring us and supplying us till design phase so there are no results and analysis for now.
with the necessary materials while we worked on this
project. Additionally, we would like to thank Dr. S.V.
Athawale, the department's head of computer engineering,
for his gracious cooperation.

IJISRT22DEC103 www.ijisrt.com 545

You might also like