Professional Documents
Culture Documents
Face Detection and Recognition
Face Detection and Recognition
Recognition
Zoltán VÁMOSSY
Biometric Feature
reader Extractor
1010010…
Biometric Feature
reader Extractor
Biometric Biometric
reader Matcher
Database
This person is
Emily Dawson
I am Emily
Dawson Verification (1:1)
ID
Match
30/08/2006 IPCV 2006 Budapest 4
Face Recognition Applications
Negative examples:
– Fuzzy idea
– Any images that
do not contain faces
– A large image subspace
Motivation
Rapid face detection in images and image
sequences
Previous approaches too slow
– They are using auxiliary information
(image differences, colors)
Only grey scale images needed
Features
Detection based on features, not pixels
Why?
– Features can encode domain knowledge
that is difficult to learn
– Faster than a pixel-based system
– Scale independent
Rectangle Features
Integral Image
Rectangle Features
can be computed
rapidly using an
intermediate
representation of the
image: integral image
Value at point (x,y) is
the sum of all the pixel
values above and to
the left
30/08/2006 IPCV 2006 Budapest 57
Viola & Jones: Robust Real-time Face Detection
Integral Image
The integral image can be computed with
the following recurrences:
where
s(x, y): cumulative column sum
Integral Image
Rectangular sum can be computed in four
array references
Two-rectangle features need six array
references
Three-rectangle features need eight array
references
Four-rectangle features need nine array
references
30/08/2006 IPCV 2006 Budapest 60
Viola & Jones: Robust Real-time Face Detection
Feature properties
Rough, but sensitive to simple image
structures
Only 2 orientations
Extremely efficient
Compensates the disadvantages
Face detection for an entire image at every
scale in real-time
AdaBoost
Variant of AdaBoost is used both to select
features and train the classifier
AdaBoost is used to boost classification
performance of a simple (weak) learning
algorithm
It combines a collection of weak classifier to form
a stronger one
The weak learning algorithm is designed to select
the single rectangle feature which best separates
the positive and negative examples
AdaBoost
Searches over the set of possible weak classifiers
and selects those with the lowest classification
error
Greedy feature selection process
Efficient for selecting a small number of “good”
features (fj(x)) with significant variety
Weak classifier
AdaBoost in Detail
Given example images yi = 0,1 pos./neg.
Initialize weights for yi = 0, 1: where m and
l number of negatives and positives
For t = 1,…,T:
1. Normalize weights
2. For each feature j train a classifier hj which is restricted to
using a single feature, the error
3. Choose the classifier ht with lowest error
4. Update weights:
where ei = 0, if xi correctly classified, else ei = 1
Final strong classifier:
Cascade of Classifiers
0.7 s for 1 image? too slow =>
Idea: Cascade of Classifiers to reduce
computation time
Simple Classifiers to reject majority of negative
sub-windows: all sub-windows
many sub-windows
have no faces
T T T Further
1 2 3
processing
F F
F
rejected
sub-windows
30/08/2006 IPCV 2006 Budapest 70
Viola & Jones: Robust Real-time Face Detection
Results - Training
Structure of the Cascade:
– 32 layers with 4297 features
– First layer uses two features, 60% non-faces
rejected, close to 100% faces detected
– Second layer uses five features, rejects 80%
non-faces
– 3rd 20-feature-classifier
– 4th 50-feature-classifier
– 5th 100-feature-classifier
– 20th 200-feature-classifier
Results - Speed
Speed of the detector depends on the
number of features evaluated
On the MIT+CMU test set, an average of 8
features (out of 4297), on a 700 MHz
Pentium III, 384x288 takes 0.067s (2001)
Outlook
Viola & Jones improved their detector to detect not
only frontal faces, but also non-upright and non-
frontal faces
Additional rectangle features
Pose estimator
Classifier for each rotation class (12)
That is:
– If there are nk skin color (rk, gk, bk) pixels in the image,
the probability of any pixel which is a skin pixel is nk/N
– and the probability of any pixel which is NOT a skin pixel
is (N-nk)/N
P(B|A) x P(A)
P(A|B) = -------------------
P(B)
P(B|A) x P(A)
P(A|B) = -----------------------------------------------
P(B|A) x P(A) + P(B|~A) x P(~A) )
Ratio of
histograms
What is PCA?
Principal component analysis (PCA) is a
technique for extracting a smaller set of
variables with less redundancy from high-
dimensional data sets in order to retain as
much of the information as possible
A small number of principal components
often give most of the structure in the data
Standard PCA
Assume that an n-dimensional observed vector is
The vector is centered where
The covariance matrix is where is an expectation
The eigendecomposition is
The matrix of eigenvectors is
where
The eigenvectors corresponds to eigenvalues
The eigenvalues are
The eigenvalues are in descending order
The first k principal components are
Finally, the reconstruction is
Neurális háló
Arc maszk