Tuesday, 21 February 2017

          MOOD DETECTION BY FACIAL EXPRESSIONS




INTRODUCTION

  • A facial recognition system is a computer application for automatically identifying or verifying a person from digital image or a video frame from a video source.
  • Research on this technology started in mind in 1960s

Emotion recognition is used for a variety of reasons.
  • Mehrabian has suggested that the ability for humans to interpret emotions
  • It is very important to effective communication, accounting for up to 93% of communication used in a normal conversation
  • Affectiva uses it to help advertisers and content creators to sell their products more effectively
  • Facial expressions provide a key mechanism for understanding and conveying emotion.

TWO DIMENSIONAL

Before the advent of faster computer and complicated imaging software,two-dimensional facial recognition systems were used.
The problem that arose from this type of facial expression
  • Recognition system was the fact that the person whose expressions has to be identified must be facing the camera at no more than 35 degrees for the identification to be be possible.
  • Light differences also contributed to decline in recognition capabilities of such system.

THREE DIMENSIONAL

  • This is more accurate compared to their predecessors.
  • This new system has the ability to detect the mood even if  the face is turned 90 degrees away from the camera.
  • Moreover they are  not affected by  differences in lighting of the subject.

APPROACHES

  • Image Acquisition: Images used for facial expression recognition are static images
  • Preprocessing: Expression representation can be sensitive to translation,scaling,and rotation of the head in an image.
  • Feature Extraction: Feature extraction converts pixel data into a higher-level representation of shape,motion,colour,texture of the face or its components.
  • Classification: Expression categorization is performed by a classifier.The 6 prototypic expressions relate to the emotional states of happiness, sadness, surprise, anger, fear and disgust.
  • Post-processing:  Post-processing aims to improve recognition accuracy, by exploiting domain knowledge to correct classification errors.              

Determining Mood from Facial Expressions

  • Matthew Wang
  • Spencer Yee

  • Image Acquisition: inconsistencies in expression were the main factors that contributed to the removal of subjects.
  • Preprocessing :-  scaled each image to fix the distance between the centers of the eyes to a constant.
  • Feature Extraction :- calculated 37 angles that we thought would vary with emotion and used these as additional features, for a total of 204 features.
  • Classification :-used the MATLAB built-in function with a feature set of the 37 angles were selected,efficiently be calculated with softmax regression.
  • used the LibSVM library to train our data with a multiclass Support Vector Machine. Specifically, we used C-Support Vector Classification with a Gaussian radial basis kernel function.

SUPPORT VECTOR MACHINE

1.In machine learning, support vector machines are supervised learning models with associated learning algorithms that analyze data used for classification and regression analysis. Given a set of training examples, each marked as belonging to one or the other of two categories, an SVM training algorithm builds a model that assigns new examples to one category or the other, making it a non-probablistic instance classifier.
2.In addition to performing linear classification, SVMs can efficiently perform a non-linear classification using what is called the kernel trick, implicitly mapping their inputs into high-dimensional feature spaces.
3.In the emotion detection system it will be used to classify different data sets into one of the emotion classes.it will use a hyperplane to seperate the boundarise of one class from another.

Pseudo Design

Classification Algorithm For Training
For each class i except Neutral {
Separate data into two groups in label i and not in label i.
Construct feature vectors using the class mask for class i using PCA ,Linear Discriminant Analysis etc.
Train data by constructing Hyperplane using SVM,Generalizing linear Model
}
Testing
For each class i except Neutral{
Construct feature vector for the test image using the class mask for class i
Calculate probability of the test image being of label i
using the corresponding SVM model
}If (max(Prob) > threshold)
Label = class with the max probability
Else Label = Neutral

Softwares:
  • OpenCV :- OpenCV (Open Source Computer Vision Library) is an open source computer vision and machine learning software library.
  • Face++ API :- An existing Online Application programming interface to recognise and process Image directly from database.
  • Simulink :- Simulink, developed by Mathworks, is a graphical programming environment for modeling, simulating and analyzing multidomain dynamic system.

GABOR FILTER
1.In image processing, a Gabor filter is a linear filter used for edge detection. Frequency and orientation representations of Gabor filters are similar to those of the human visual system, and they have been found to be particularly appropriate for texture representation and discrimination.
2.A set of Gabor filters with different frequencies and orientations may be helpful for extracting useful features from an image. In the discrete domain, two-dimensional Gabor filters are given by,