Project Report S
Project Report S
ON
Submitted to
RAJASTHAN TECHNICAL UNIVERSITY
BACHELOR’S DEGREE IN
INFORMATION TECHNOLOGY AND ENGINEERING
BY
2019-2020
Swami Keshvanand Institute of Technology, Jaipur
Department of Information Technology
CERTIFICATE
Department of Information Technology, SKIT College, Jaipur 3
Acknowledgement
At last I must express my sincere heartfelt gratitude to all the staff members of
Information Technology Department who helped me directly or indirectly during
this course of work.
Sneha Mathur
17ESKIT078
Contents
1 Introduction 2
1.1 OVERVIEW . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2 MOTIVATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.3 OBJECTIVES OF TRAINING . . . . . . . . . . . . . . . . . . . . 2
3 Description of Modules 11
3.1 FISHER FACE . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.2 OPEN CV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.3 HAAR CASCADE . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.4 NUMPY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.5 Webbrowser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
4 Results 16
4.1 RESULTS ACHIEVED . . . . . . . . . . . . . . . . . . . . . . . . 16
4.2 SCREENSHOTS OF RESULT ACHIEVED . . . . . . . . . . . . . 16
5 Conclusion 19
5.1 TAKEAWAYS OF TRAINING . . . . . . . . . . . . . . . . . . . . 19
5.2 FUTURE SCOPE . . . . . . . . . . . . . . . . . . . . . . . . . . 19
List of Figures
Introduction
1.1 OVERVIEW
Project EMOSIC (an emotion based music player) is a novel approach that helps
the user to automatically play songs based on the emotions of the user. It recognizes
the facial emotions of the user and plays the songs according to their emotion. The
emotions are recognized using a machine learning method concept. The human face
is an important organ of an individual‘s body and it especially plays an important
role in extraction of an individual‘s behavior and emotional state. The webcam
captures the image of the user. It then extract the facial features of the user from the
captured image. Facial expression categorized into 4: happy, sad, angry and neutral.
According to the emotion, the music will be played from the created playlist.
1.2 MOTIVATION
Project EMOSIC (an emotion based music player) is a novel approach that helps
the user to automatically play songs based on the emotions of the user. It recognizes
the facial emotions of the user and plays the songs according to their emotion. The
emotions are recognized using a machine learning method concept. The human face
is an important organ of an individual‘s body and it especially plays an important
role in extraction of an individual‘s behavior and emotional state. The webcam
The most common set of requirements defined by any operating system or soft-
ware application is the physical computer resources, also known as hardware. The
hardware requirements required for this project are:
- Intel i3
- 4GB RAM
- Webcam
- Speaker
The system uses the following technology to develop the Emotion based Mu-
sic Player i.e., EMOSIC. A Machine learning algorithm- Haar Cascade which is
used to detect the facial expressions, Image Processing, Computer Vision and for
Programming- Python 3.6. Modules used for EMOSIC are Open CV, Webbrowser,
Operating System(OS) and Numpy.
GATHERING OF DATA
When you finally know that exactly what data you want and the regarding equip-
ment are with you, then it takes you to the very first real part of Image Processing
i.e., “Gathering Data”. This part is very crucial as the quality and quantity of the
data you have gathered will directly determine/decide that how good will be the pre-
dictivity of the model will turn out. The data that is collected is then tabulated and
called as “Training Data”.
PREPARATION OF DATA
After the training data is gathered, you will proceed to the next step: Data prepa-
ration, where the data is loaded into a particular place and then it will be prepared
to be used in training. Here, the data is first put all together and then the order is
randomized as the order of data should not affect what is learned. This is also a
good and enough time to do any visualizations of the data, as that will help you to
see if there are any relevant relations between the different variables used, how you
can take their advantage and as well as show you if there is a presence of any data
imbalance .
Training After the before steps are completed, you then move onto training where
the data is used to incrementally improve the model’s ability to predict. The training
process involves using the dataset to create an xml file.
EVALUATION
Once training is complete, you now check if it is good enough using this step.
This is where that dataset you set aside earlier comes into play. Evaluation allows
the testing of the model against data that has never been seen and used for training
and is meant to be representative of how the model might perform when in the real
world.
PREDICTION
Machine learning is basically using data to answer questions. So this is the final
step where you get to answer few questions. This is the point where the value of
machine learning is realized. Here you can Finally use your model to predict the
outcome of what you want. The above-mentioned steps take you from where you
create a model to where you Predict its output and thus acts as a learning path.
DATASET CREATION
Description of Modules
Fisherface is one of the popular algorithms used in face recognition, and is widely
believed to be superior to other techniques, such as eigenface because of the effort
to maximize the separation between classes in the training process.
Image recognition using fisherface method is based on the reduction of face space
dimension using Principal Component Analysis (PCA) method, then apply Fisher’s
Linear Discriminant (FDL) method or also known as Linear Discriminant Analy-
sis (LDA) method to obtain feature of image characteristic. The algorithm used in
the process for image recognition is fisherfaces algorithm while for identification or
matching face image using minimum euclidean.
You can see from the above example that although it can do other things such as
stretch an image or change color, it’s purpose is not that to serve as an image pro-
cessing engine similar to Photoshop or such. It is intended to be very fast almost real
time if the hardware supports it and perform all sorts of functions such as Fourier
transforms very fast and then allow you to either glean information or transform the
stream of images as you like.
Lets take face detection as an example. Initially, the algorithm needs a lot of positive
images of faces and negative images without faces to train the classifier. Then we
need to extract features from it.
First step is to collect the Haar Features. A Haar feature considers adjacent
rectangular regions at a specific location in a detection window, sums up the pixel
intensities in each region and calculates the difference between these sums.
NumPy is the fundamental package for scientific computing with Python. It con-
tains among other things:
Besides its obvious scientific uses, NumPy can also be used as an efficient multi-
dimensional container of generic data. Arbitrary data-types can be defined. This
allows NumPy to seamlessly and speedily integrate with a wide variety of databases.
Results
At the end of this summer training program,we developed a working- smart music
player which detects ones emotion before playing a song.
2. This screenshot depicts the command for running this program section.
As soon as this program code is run, face detection starts.
3. This screenshot depicts all the faces which can be detected by the program.
Conclusion
The Emotion Based Music Player aims at providing the users with a cheaper,
additional hardware free and accurate emotion based music system. The Emotion
Based Music System will be of great advantage to users looking for music based
on their mood and emotional behavior. It will help reduce the searching time for
music thereby reducing the unnecessary computational time and thereby increasing
the overall accuracy and efficiency of the system. Also with its additional features
mentioned above, it will be a complete system for music lovers and listeners.