0% found this document useful (0 votes)
55 views23 pages

Presented By:-Manjot Singh Bilkhu (20135100) Shashank Bharadwaj (20135032) Shailendra Azad (20135159) Guided By: - Prof. V.K.Srivastava

This document summarizes a student project on facial expression recognition. It discusses the motivation to automate facial expression analysis for human-computer interaction and medical applications. The project aims to detect faces, locate facial keypoints, extract features from keypoints, and train a support vector machine model to classify expressions. Methods demonstrated include the Viola-Jones face detector, facial keypoint detection using Dlib, and using support vector machines with a maximum margin approach. Future work may include improving accuracy, custom kernels, and deep learning algorithms.

Uploaded by

ShailuAzad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
55 views23 pages

Presented By:-Manjot Singh Bilkhu (20135100) Shashank Bharadwaj (20135032) Shailendra Azad (20135159) Guided By: - Prof. V.K.Srivastava

This document summarizes a student project on facial expression recognition. It discusses the motivation to automate facial expression analysis for human-computer interaction and medical applications. The project aims to detect faces, locate facial keypoints, extract features from keypoints, and train a support vector machine model to classify expressions. Methods demonstrated include the Viola-Jones face detector, facial keypoint detection using Dlib, and using support vector machines with a maximum margin approach. Future work may include improving accuracy, custom kernels, and deep learning algorithms.

Uploaded by

ShailuAzad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 23

Presented By :-

Manjot Singh Bilkhu (20135100)


Shashank Bharadwaj (20135032)
Shailendra Azad (20135159)

Guided By :-
Prof. V.K.Srivastava

Department Of Electronics And Communication Engineering


Motilal Nehru National Institute Of Technology Allahabad
Allahabad, U.P
Presentation Outline
 Motivation
 Desired functionality
 Face Detection
 Facial Keypoints Detection
 Classification
 Future Prospects
Motivation
 HCI
 Machines can be automated to perform various actions
based on Micro-expressions
 According to some estimates, the facial expression of the
speaker counts for 55% of the effect of the spoken
message (with the voice intonation contributing 38%,
and the verbal part just 7%)
 Behavioral science research
 Automation of objective measurement of facial activity
 In Medical Science to monitor Patient Behaviour
Desired Functionality
 Human visual system = good reference point
 Desired properties:
 Works on images of people of any sex, age, and ethnicity
 Robust to variation in lighting
 Insensitive to hair style changes, presence of glasses,
facial hair, partial occlusions
 Can deal with rigid head motions
 Is real-time
 Capable of classifying expressions into multiple emotion
categories
 Able to learn the range of emotional expression by a
particular person
Methodology
Face Detection

Detecting Facial Landmarks

Training Model

Classification Using SVM


The Viola/Jones Face Detector
• A seminal approach to real-time object detection
• Training is slow, but detection is very fast
• Key ideas
 Integral images for fast feature evaluation
 Boosting for feature selection
 Attentional cascade for fast rejection of non-face
windows
Simulation
Cascaded Classifiers
• We start with simple classifiers which reject many
of the negative sub-windows while detecting
almost all positive sub-windows
• Positive response from the first classifier triggers
the evaluation of a second (more complex)
classifier, and so on
• A negative outcome at any point leads to the
immediate rejection of the sub-window

T T T
IMAGE Classifier 1 Classifier 2 Classifier 3 FACE
SUB-WINDOW
F F F

NON-FACE NON-FACE NON-FACE


Facial Keypoints Detection
 To incorporate Pose and Rotational Invariance
 Detects some “Key Points” on each detected face
 Implemented using Dlib (Deep Learning Library for
Python)
 Keypoints are chosen using HOG Features
Facial Keypoints Detection
Feature Extraction
 Compute Angles of all Keypoints
 Incorporate for Offset
 Store all computed angles as a vector
Support Vector Machines
 Popular Machine Learning Algorithm
 Used to Classify Data into different classes
 Model is trained using a Comprehensive Dataset
Ch. 15

Linear classifiers: Which Hyperplane?


 Lots of possible solutions for a, b, c.
 Some methods find a separating
hyperplane, but not the optimal one This line represents
[according to some criterion of expected goodness] the decision
boundary:
 E.g., perceptron
ax + by − c = 0
 Support Vector Machine (SVM) finds an
optimal* solution.
 Maximizes the distance between the
hyperplane and the “difficult points” close
to decision boundary
 One intuition: if there are no points near
the decision surface, then there are no very
uncertain classification decisions

13
Sec. 15.1

Support Vector Machine (SVM)


Support vectors
 SVMs maximize the margin
around the separating
hyperplane.
 A.k.a. large margin classifiers
 The decision function is fully
specified by a subset of training
samples, the support vectors.
 Solving SVMs is a quadratic Maximizes
Narrower
margin
programming problem margin
 Seen by many as the most
successful current text
classification method*
*but other discriminative methods
often perform very similarly 14
Sec. 15.1

Maximum Margin: Formalization

 w: decision hyperplane normal vector


 xi: data point i
 yi: class of data point i (+1 or -1) NB: Not 1/0
 Classifier is: f(xi) = sign(wTxi + b)
 Functional margin of xi is: yi (wTxi + b)
 But note that we can increase this margin simply by scaling w, b….

 Functional margin of dataset is twice the minimum


functional margin for any point
 The factor of 2 comes from measuring the whole width of
the margin

15
Sec. 15.1

Geometric Margin
 Distance from example to the separator is w T
x+b
r=y
w
 Examples closest to the hyperplane are support vectors.
 Margin ρ of the separator is the width of separation between support
vectors of classes. Derivation of finding r:
x ρ Dotted line x’−x is perpendicular to
decision boundary so parallel to w.
r Unit vector is w/|w|, so line is rw/|w|.
x′ x’ = x – yrw/|w|.
x’ satisfies wTx’+b = 0.
So wT(x –yrw/|w|) + b = 0
Recall that |w| = sqrt(wTw).
So wTx –yr|w| + b = 0
So, solving for r gives:
r = y(wTx + b)/|w|
w
16
Sec. 15.1

Linear SVM Mathematically


The linearly separable case
 Assume that all data is at least distance 1 from the hyperplane, then the
following two constraints follow for a training set {(xi ,yi)}
wTxi + b ≥ 1 if yi = 1
wTxi + b ≤ −1 if yi = −1

 For support vectors, the inequality becomes an equality


 Then, since each example’s distance from the hyperplane is
wT x + b
r=y
w

 The margin is: 2


r=
w

17
Sec. 15.1

Linear Support Vector Machine (SVM)


ρ wTxa + b = 1

wTxb + b = -1
 Hyperplane
wT x + b = 0

 Extra scale constraint:


mini=1,…,n |wTxi + b| = 1

 This implies:
wT(xa–xb) = 2
ρ = ||xa–xb||2 = 2/||w||2
wT x + b = 0

18
Sec. 15.1

Linear SVMs Mathematically


(cont.)
 Then we can formulate the quadratic optimization problem:
Find w and b such that

2 is maximized; and for all {(x , yi)}


r= i
w
wTxi + b ≥ 1 if yi=1; w xi + b ≤ -1 if yi = -1
T

 A better formulation (min ||w|| = max 1/ ||w|| ):


Find w and b such that
Φ(w) =½ wTw is minimized;

and for all {(xi ,yi)}: yi (wTxi + b) ≥ 1


19
Results (Classified as Happy)
Results (Classified as Neutral)
Future Prospects
 Improving Accuracy
 Using Custom-made Kernels
 Deep Learning Algorithms
Thank You

You might also like