Professional Documents
Culture Documents
Visvesvaraya Technological University: BELAGAVI-590018
Visvesvaraya Technological University: BELAGAVI-590018
Visvesvaraya Technological University: BELAGAVI-590018
BELAGAVI-590018
A Project Report On
Submitted in the partial fulfilment of the requirements for the award of the Degree of
Bachelor of Engineering in Computer Science and Engineering
Submitted by
Drithiman M (1OX14CS022)
Karuna Kiran Bhadra (1OX14CS022)
Salman Ulla (1OX14CS022)
Ransom David (1OX14CS022)
CERTIFICATE
Ms. Jessy Jane Kumari Dr. R.J. Anandhi Dr. R.V Praveena Gowda
Project Guide H.O.D, Dept. of CSE Principal, TOCE
External Viva
Department Vision
Department Mission
DECLARATION
Place: Bangalore
Date:
ACKNOWLEDGEMENT
The satisfaction and euphoria that accompany the successful completion of any task
would be incomplete without the mention of the people who made it possible, whose
constant guidance and encouragement crowned our efforts with success.
Guidance and deadlines play a very important role in successful completion of the seminar
report on time. I also convey my gratitude to Ms. Jessy Janet Kumari , Assistant
Professor, Department of CSE, for having constantly monitored the development of the
seminar report and setting up precise deadlines.
Finally, a note of thanks to the Department of Computer Science Engineering, both teaching
and non-teaching staff for their co-operation extended to me.
ABSTRACT
Music plays an important role in an individual’s life. It is an important source of
entertainment and is often associated with a therapeutic role. Listening to music can help
reduce stress according to many studies. It can help relieve a person from anxiety,
depression, and other emotional and mental problems. Using traditional music players, a
user has to manually browse through his playlist and select songs that would soothe his
mood and emotional experience. This task was labor intensive and time consuming.The
second functionality that we are implementing through the application is a Group-Emotio n
analyzer that can complement the music player in order to figure out the general emotiona l
state of a gathering such as a party, or a club and dynamically adjust the music the pattern
accordingly. This would, in essence, create a virtual DJ, and eliminate the need for a real
one. Thus saving on cost and making the process more efficient.
Next, we are going to provide throgh the application a data-driven crowd analysis system.
This will take advantage of the multi- face tracking feature of the algorithm in use. From a
regularly timed high-definition camera we will input images of the required area. The
algorithm then tracks each decipherable face and provides approximate attribute values for
the people whos faces are tracked. This means we get a random sample of the crowd to
analyze. This can provide us with metrics such as the age groups to which the people in the
crowd belong, the gender distribution, the emotional state of the crowd etc. This can
immensely help people in professions such as event management, or to identify crisis spots
in the crowd to form a kind of early warning system.
Finally, we aim to provide a personal security platform throgh the application. The
application can be used by security personnel in an restricted entry scenario to check against
matches in the local database for people with known criminal background. This will act as
a strong deterrent for people with bad intentions. The application will use Baysian networks
in the server to act as a match modeller. Acceptable confidence level will be 70%.
Our other aim is to innovate a roadmap to a new kind of UX for all software applications.
One that works with human intuition and is smart. This will lower the barrier to use
technology for all people and pave way for a new form of interaction.
ii
Table of Contents
Acknowledgement i
Abstract ii
List of Figures iv
Chapter Page no
1. Preamble
1.1 Definition
1.2 Overview
1.3 About
1.4 Problem Definition
1.5 Problem Explanation
2. SYSTEM DESIGN
8 CONCLUSION 12
REFERENCES 13
iii
List of Figures
iv
CHAPTER 1
INTRODUCTION
It is typically used in security systems and can be compared to other biometrics such
as fingerprint or eye iris recognition systems.[1] Recently. it has also become popular as a
commercial identification and marketing tool.[2]
The above process leverages techniques from multiple areas, such as signal
processing, machine learning, and computer vision. The computers use different methods
to interpret emotion such as Bayesian networks. [3]
Facial expressions and related changes in facial patterns give us information about
the emotional state of the person and help to regulate conversations with the person.
Moreover, these expressions help in understanding the overall mood of the person in a
better way. Facial expressions play an important role in human interactions and non-verbal
communication. Classification of facial expressions could be used as an effective tool in
behavioural studies and in medical rehabilitation. Facial expression analysis deals with
visually recognizing and analysing different facial motions and facial feature changes.
The main objective of the system being built is to be able to recognize facial
expression and predict the emotion based upon a present neural structure for recognitio n
for the same.
The system should be able to correctly identify the correct facial expression when presented
an image from subjects used in training or in initial testing. Committee neural networks
offer a potential tool for image based mood detection and even crowd analysis and
management. It can also be use on one or more than one face per transaction and can be
helpful in crowd based analysis of mood and intent of the crowd.
The existing system is too naïve to work with and can not have any further evolutio nar y
growth to it. The existing system proposes to use the Viola-Jones algorithm to classify
facial expressions and select playlist. Fig 1.1 will detail the architecture of the system.
Fig 1.1 shows the arch followed by viola-jones Open CV method of facial feature
recognition.
The existing system uses OpenCV to classify the face emotions. This may lead to
incompatibility in all devices, as on the systems that do not run OpenCV, the code will not
perform as expected.
Our proposed system follows the following the action pattern for the required use cases:
3. Server uses a Bayesian network to evaluate the data and produce classification of the
input.
4. This classification is used to select a playlist that best matches the emotional state of
the user.
5. The audio files corresponding to the playlists are then streamed one by one to the
application.
6. The applications provides a player front-end to control the playback.
USE CASE IV: Facial recognition platform, to be used as a security tool at checkpoints.
1. Picture of the entering person is captured through the application.
2. The picture is sent over to the server containing the database of local and regional
criminal profiles.
3. The face is deconstructed into mesh.
4. Mesh is compared against database.
5. If match is found then a alert is raised discreetly.
6. Else, the person is allowed to enter.
The Fig. below shows the proposed system flow diagram of the application FaceSmash.
1.5 Summary
FaceSmash is an android application that is aimed to realize the reality of facial detection
and emotion detection using artificial intelligence and machine learning. This will be then
use for the above said use cases, ai assisted solution for music playing, crowd manageme nt
and security.
CHAPTER 2
SYSTEM DESIGN
Facial expressions play a significant role in human dialogue. As a result, there has
been considerable work done on the recognition of emotional expressions and the
application of this research will be beneficial in improving human-machine dialogue. One
can imagine the improvements to computer interfaces, automated clinical (psychologica l)
research or even interactions between humans and autonomous robots.
Unfortunately, a lot of the literature does not focus on trying to achieve high
recognition rates across multiple databases. In this project we develop our own mood
detection system that addresses this challenge. The system involves pre-processing image
data by normalizing and applying a simple mask, extracting certain (facial) features using
PCA and Gabor filters and then using SVMs for classification and recognition of
expressions. Eigenfaces for each class are used to determine class-specific masks which are
then applied to the image data and used to train multiple, one against the rest, SVMs. We
find that simply using normalized pixel intensities works well with such an approach. Fig
1.1 details the system overview.
We performed pre-processing on the images used to train and test our algorithms as
follows:
Fig 1.2 Top: Original images, Bottom: Processed images with mask
Fig 1.3 Top: Pre-processed images, Bottom: L1 images with Gabor bank features
Based on initial testing, the best performing neural networks were recruited to form
a generalized committee for expression classification. Due to a number of ambiguous and
no-classification cases during the initial testing, specialized neural networks were trained
for angry, disgust, fear and sad expression. Then, the best performing neural networks were
recruited into a specialized committee to perform specialized classification. A final
integrated committee neural network classification system was built utilizing both
generalized committee networks and specialized committee networks.
Then, the integrated committee neural network classification system was evaluated
with an independent expression dataset not used in training or in initial testing. A
generalized block diagram of the entire system is shown in Figure 2.4.
Facial expression images are to be obtained from the Cohn-Kanade database. The
database contains facial images taken from 97 subjects with age ranging from 18 to 30
years. The database had 65 percent female subjects. Fifteen percent of the subjects were
African-American and three percent were Asian or Latino.
The database images were taken with a generic camera. The camera was located
directly in front of the subject. The subjects performed different facial displays (single
action units and combinations of action units) starting and ending with a neutral face. The
displays were based on descriptions of prototypic emotions (i.e., neutral, happy, surprise,
anger, fear, disgust, and sad).
The image sequences were digitized into 640 by 480 pixel arrays with 8-bit
precision for grayscale values. Two types of parameters were extracted from the facial
images of 97 subjects: (1) real valued parameters and (2) binary parameters. The real valued
parameters have a definite value depending upon the distance measured. This definite value
was measured in number of pixels. The binary measures gave either a present (= 1) or an
absent (= 0) value. In all, eight real valued measures and seven binary measures were
obtained.
A number of parameters, both real-valued and binary, were extracted and analysed to
decide their effectiveness in identifying a certain facial expression. The features which did
not provide any effective information of the facial expression portrayed in the image were
eliminated and were not used in the final study. The real valued and binary feature selection
was inspired by the FACS.
Fig 2.6 Real-valued measures from a sample neutral expression image. 1-eyebrow raise
distance, 2-upper eyelid to eyebrow distance, 3-inter eyebrow distance, 4-upper eyelid to
lower eyelid distance, 5-top lip thickness, 6-lower lip thickness, 7-mouth width, 8-mouth
opening.
Binary parameters
1. Upper teeth visible – Presence or absence of visibility of upper teeth.
2. Lower teeth visible – Presence or absence of visibility of lower teeth.
3. Forehead lines – Presence or absence of wrinkles in the upper part of the forehead.
4. Eyebrow lines – Presence or absence of wrinkles in the region above the eyebrows.
5. Nose lines – Presence or absence of wrinkles in the region between the eyebrows
extending over the nose.
6. Chin lines – Presence or absence of wrinkles or lines on the chin region just below the
lower lip.
7. Nasolabial lines – Presence or absence of thick lines on both sides of the nose
extending down to the upper lip. These binary parameters are depicted in Fig 2.7
Fig 2.7 Binary measures from sample expression images. 1-upper teeth visible, 2-lower
teeth visible, 3-forehead lines, 4-eyebrow lines, 5-nose lines, 6-chin lines, 7-nasolabial
lines.
Chapter 3
Chapter 4
Implementation
4.1 Selection of Platform
Android Studio is an integrated development environment (IDE) for the Android
platform. It simplifies app development. Though offered by Google, seasoned Java
developers will immediately recognise that the toolkit is a version of IntelliJ IDEA.
Android Studio offers a better Gradle build environment, smarter short cuts, an
improved user interface (UI) designer, a better memory monitor, an improved string
translation editor and better speed. The build system in Android Studio replaces the Ant
system used with Eclipse ADT. It can run from the menu as well as from the command
line. It allows you to track memory allocation as it monitors memory use. It has built - in
support for the Google Cloud Platform, making it easy to integrate Google Cloud
Messaging and App Engine. It also comes with inline debugging, and performance analysis
tools. Android Studio has Android Virtual Device (AVD) which comes with emulators for
Nexus 6 and Nexus 9 devices. It also offers build variants and the capability to generate
multiple apk files. Whenever one compiles a program, the configured lint and IDE
inspections run automatically.
Configuration
Installation
Before you set up Android Studio in Linux, you need to install JDK 6 or higher. In fact,
JDK 7 is required for developing Android 5.0 or above. The other requirements are a
minimum of 2GB RAM (though 4GB is recommended), 400MB hard disk space and at
least 1GB for the Android SDK, emulator system images, caches, GNU C Library (glibc)
2.15 or later, etc. After installing Android Studio and setting it up, go to the SDK manager
to update the required tools, platforms, etc, required for app-building. These packages
provide the basic SDK tools for app development, without an IDE. If you prefer to use a
different IDE, the standalone Android SDK tools can be downloaded. One can set up an
update channel to Stable by going to: File > Settings > Appearance & Behaviour System
Settings > Updates as shown in the figure 4.1 below.
Chapter 5
System Testing