A Robust Real Time Face Detection
A Robust Real Time Face Detection
Detection
Outline
AdaBoost – Learning Algorithm
Face Detection in real life
Using AdaBoost for Face Detection
Improvements
Demonstration
AdaBoost
Td
err ( H ) Pr'[ H ( x) y ] O( ),
m
where :
d - VC dimension
T - number of rounds
where :
margin( x , y )
y t ht ( x )
t
AdaBoost – different point of view
We try to solve the problem of approximating the
y’s using a linear combination of weak hypotheses
In other words, we are interested in the problem of
finding a vector of parameters α such that
n
f ( xi ) j h j ( xi )
j 1
is a ‘good approximation’ of yi
For classification problems we try to match the
sign of f(xi) to yi
AdaBoost – different point of view
Sometimes it is advantageous to minimize some
other (non-negative) loss function instead of the
number of classification errors
For AdaBoost the loss function is
exp( y
i 1
i f ( xi ))
Two-rectangle
Value =
Three-rectangle
∑ (pixels in white area) - ∑
(pixels in black area)
Four-rectangle
Contrast Features
Source
Result
Features
Notice that each feature is related to a
special location in the sub-window
Why features and not pixels?
– Encode domain knowledge
– Feature based system operates faster
– Inspiration from human V1
Features
Later we will see that there are other
features that can be used to implement an
efficient face detector
The original system of Viola and Jones used
only rectangle features
Computing Features
Given a detection resolution of 24x24, and
size of ~200x200, the set of rectangle
features is ~160,000 !
We need to find a way to rapidly compute
the features
Integral Image
Intermediate
representation of the
image
ii ( x, y ) i ( x' , y ' )
x ' x , y ' y
y (x,y)
(x,y)
Integral
Image
-1 +1
+2 -2
-1 +1
(x,y)
Building a Detector
h( x, f , p, ) 1 pf ( x) p
Weak Classifiers
A weak classifier is a combination of a
feature and a threshold
We have K features
We have N thresholds where N is the
number of examples
Thus there are KN weak classifiers
Weak Classifier Selection
For each feature sort the examples based on
feature value
For each element evaluate the total sum of
positive/negative example weights (T+/T-) and
the sum of positive/negative weights below the
current example (S+/S-)
The error for a threshold which splits the range
between the current and previous example in the
sorted list is
e min(S (T S ), S (T S ))
An example
e B A S- S+ T- T+ W f y x
Layer number 1 2 3 to 4 5 to 38
Number of feautures 2 10 50 -
Detection rate 100% 100% - -
Rejection rate 50% 80% - -
Speed of final Detector
On a 700Mhz Pentium III processor, the
face detector can process a 384 by 288
pixel image in about .067 seconds
Improvements