+ All Categories
Home > Documents > Face Recognition: Eigenfacesand Fisherfacesdkeren/ip/eigen-fischer-faces.pdf · Face recognition:...

Face Recognition: Eigenfacesand Fisherfacesdkeren/ip/eigen-fischer-faces.pdf · Face recognition:...

Date post: 21-Jul-2018
Category:
Upload: vanquynh
View: 216 times
Download: 0 times
Share this document with a friend
34
Face Recognition: Eigenfaces and Fisherfaces
Transcript
Page 1: Face Recognition: Eigenfacesand Fisherfacesdkeren/ip/eigen-fischer-faces.pdf · Face recognition: once you’ve detected and cropped a face, try to ... Eigenfaces • PCA extracts

Face Recognition: Eigenfaces and

Fisherfaces

Page 2: Face Recognition: Eigenfacesand Fisherfacesdkeren/ip/eigen-fischer-faces.pdf · Face recognition: once you’ve detected and cropped a face, try to ... Eigenfaces • PCA extracts

Face recognition: once you’ve

detected and cropped a face, try to

recognize it

Detection Recognition “Sally”

Page 3: Face Recognition: Eigenfacesand Fisherfacesdkeren/ip/eigen-fischer-faces.pdf · Face recognition: once you’ve detected and cropped a face, try to ... Eigenfaces • PCA extracts

Face recognition: overview• Typical scenario: few examples per face,

identify or verify test example

• What’s hard: changes in expression,

lighting, age, occlusion, viewpoint

• Basic approaches (all nearest neighbor)

1. Project into a new subspace

2. Measure face features

Page 4: Face Recognition: Eigenfacesand Fisherfacesdkeren/ip/eigen-fischer-faces.pdf · Face recognition: once you’ve detected and cropped a face, try to ... Eigenfaces • PCA extracts

Typical face recognition scenarios

• Verification: a person is claiming a particular identity; verify whether that is true– E.g., security

• Closed-world identification: assign a face to one person from among a known set

• General identification: assign a face to a known person or to “unknown”

Page 5: Face Recognition: Eigenfacesand Fisherfacesdkeren/ip/eigen-fischer-faces.pdf · Face recognition: once you’ve detected and cropped a face, try to ... Eigenfaces • PCA extracts

What makes face recognition hard?

Expression

Page 6: Face Recognition: Eigenfacesand Fisherfacesdkeren/ip/eigen-fischer-faces.pdf · Face recognition: once you’ve detected and cropped a face, try to ... Eigenfaces • PCA extracts

What makes face recognition hard?

Lighting

Page 7: Face Recognition: Eigenfacesand Fisherfacesdkeren/ip/eigen-fischer-faces.pdf · Face recognition: once you’ve detected and cropped a face, try to ... Eigenfaces • PCA extracts

What makes face recognition hard?

Occlusion

Page 8: Face Recognition: Eigenfacesand Fisherfacesdkeren/ip/eigen-fischer-faces.pdf · Face recognition: once you’ve detected and cropped a face, try to ... Eigenfaces • PCA extracts

What makes face recognition hard?

Viewpoint

Page 9: Face Recognition: Eigenfacesand Fisherfacesdkeren/ip/eigen-fischer-faces.pdf · Face recognition: once you’ve detected and cropped a face, try to ... Eigenfaces • PCA extracts

Simple idea for face recognition

1. Treat face image as a vector of intensities

2. Recognize face by nearest neighbor in database

x

nyy ...1

xy −= kk

k argmin

Page 10: Face Recognition: Eigenfacesand Fisherfacesdkeren/ip/eigen-fischer-faces.pdf · Face recognition: once you’ve detected and cropped a face, try to ... Eigenfaces • PCA extracts

The space of all face images• When viewed as vectors of pixel values, face images are

extremely high-dimensional

– 100x100 image = 10,000 dimensions

– Slow and lots of storage

• But very few 10,000-dimensional vectors are valid face

images

• We want to effectively model the subspace of face images

Page 11: Face Recognition: Eigenfacesand Fisherfacesdkeren/ip/eigen-fischer-faces.pdf · Face recognition: once you’ve detected and cropped a face, try to ... Eigenfaces • PCA extracts

The space of all face images

• Idea: construct a low-dimensional linear subspace

that best explains the variation in the set of face

images

Page 12: Face Recognition: Eigenfacesand Fisherfacesdkeren/ip/eigen-fischer-faces.pdf · Face recognition: once you’ve detected and cropped a face, try to ... Eigenfaces • PCA extracts

Linear subspaces

Consider the variation along direction v

among all of the orange points:

What unit vector v minimizes var?

What unit vector v maximizes var?

Solution: v1 is eigenvector of A with largest eigenvalue

v2 is eigenvector of A with smallest eigenvalue

Note: there’s an error, the

expression in the sum should

be squared

Page 13: Face Recognition: Eigenfacesand Fisherfacesdkeren/ip/eigen-fischer-faces.pdf · Face recognition: once you’ve detected and cropped a face, try to ... Eigenfaces • PCA extracts

Principal component analysis (PCA)

• Suppose each data point is N-dimensional

– Same procedure applies:

– The eigenvectors of A define a new coordinate system

• eigenvector with largest eigenvalue captures the most variation among training

vectors x

• eigenvector with smallest eigenvalue has least variation

– We can compress the data by only using the top few eigenvectors

• corresponds to choosing a “linear subspace”– represent points on a line, plane, or “hyper-plane”

• these eigenvectors are known as the principal components

Page 14: Face Recognition: Eigenfacesand Fisherfacesdkeren/ip/eigen-fischer-faces.pdf · Face recognition: once you’ve detected and cropped a face, try to ... Eigenfaces • PCA extracts

The space of faces

• An image is a point in a high dimensional space

– An N x M image is a point in RNM

– We can define vectors in this space as we did in the 2D case

+=

Page 15: Face Recognition: Eigenfacesand Fisherfacesdkeren/ip/eigen-fischer-faces.pdf · Face recognition: once you’ve detected and cropped a face, try to ... Eigenfaces • PCA extracts

Dimensionality reduction

• The set of faces is a “subspace” of the set of images

– Suppose it is K dimensional

– We can find the best subspace using PCA

– This is like fitting a “hyper-plane” to the set of faces

• spanned by vectors v1, v2, ..., vK

• any face

Page 16: Face Recognition: Eigenfacesand Fisherfacesdkeren/ip/eigen-fischer-faces.pdf · Face recognition: once you’ve detected and cropped a face, try to ... Eigenfaces • PCA extracts

Eigenfaces

• PCA extracts the eigenvectors of A

– Gives a set of vectors v1, v2, v3, ...

– Each one of these vectors is a direction in face space

• what do these look like?

Page 17: Face Recognition: Eigenfacesand Fisherfacesdkeren/ip/eigen-fischer-faces.pdf · Face recognition: once you’ve detected and cropped a face, try to ... Eigenfaces • PCA extracts

Visualization of eigenfacesPrincipal component (eigenvector) uk

μ + 3σkuk

μ – 3σkuk

Page 18: Face Recognition: Eigenfacesand Fisherfacesdkeren/ip/eigen-fischer-faces.pdf · Face recognition: once you’ve detected and cropped a face, try to ... Eigenfaces • PCA extracts

Projecting onto the eigenfaces

• The eigenfaces v1, ..., vK span the space of faces

– A face is converted to eigenface coordinates by

Page 19: Face Recognition: Eigenfacesand Fisherfacesdkeren/ip/eigen-fischer-faces.pdf · Face recognition: once you’ve detected and cropped a face, try to ... Eigenfaces • PCA extracts
Page 20: Face Recognition: Eigenfacesand Fisherfacesdkeren/ip/eigen-fischer-faces.pdf · Face recognition: once you’ve detected and cropped a face, try to ... Eigenfaces • PCA extracts

Recognition with eigenfaces• Algorithm

1. Process the image database (set of images with labels)

• Run PCA—compute eigenfaces

• Calculate the K coefficients for each image

2. Given a new image (to be recognized) x, calculate K coefficients

3. Detect if x is a face

4. If it is a face, who is it?

• Find closest labeled face in database

• nearest-neighbor in K-dimensional space

Page 21: Face Recognition: Eigenfacesand Fisherfacesdkeren/ip/eigen-fischer-faces.pdf · Face recognition: once you’ve detected and cropped a face, try to ... Eigenfaces • PCA extracts

Choosing the dimension K

K NMi =

eigenvalues

• How many eigenfaces to use?

• Look at the decay of the eigenvalues

– the eigenvalue tells you the amount of

variance “in the direction” of that eigenface

– ignore eigenfaces with low variance

Page 22: Face Recognition: Eigenfacesand Fisherfacesdkeren/ip/eigen-fischer-faces.pdf · Face recognition: once you’ve detected and cropped a face, try to ... Eigenfaces • PCA extracts

PCA

• General dimensionality reduction technique

• Preserves most of variance with a much more

compact representation

– Lower storage requirements (eigenvectors + a few

numbers per face)

– Faster matching

Page 23: Face Recognition: Eigenfacesand Fisherfacesdkeren/ip/eigen-fischer-faces.pdf · Face recognition: once you’ve detected and cropped a face, try to ... Eigenfaces • PCA extracts

Limitations• The direction of maximum variance is not

always good for classification

Page 24: Face Recognition: Eigenfacesand Fisherfacesdkeren/ip/eigen-fischer-faces.pdf · Face recognition: once you’ve detected and cropped a face, try to ... Eigenfaces • PCA extracts

A more discriminative subspace: FLD

• Fisher Linear Discriminants � “Fisher Faces”

• PCA preserves maximum variance

• FLD preserves discrimination

– Find projection that maximizes scatter between

classes and minimizes scatter within classes

Reference: Eigenfaces vs. Fisherfaces, Belheumer et al., PAMI 1997

Page 25: Face Recognition: Eigenfacesand Fisherfacesdkeren/ip/eigen-fischer-faces.pdf · Face recognition: once you’ve detected and cropped a face, try to ... Eigenfaces • PCA extracts

Illustration of the Projection

Poor Projection

x1

x2

x1

x2

� Using two classes as example:

Good

Page 26: Face Recognition: Eigenfacesand Fisherfacesdkeren/ip/eigen-fischer-faces.pdf · Face recognition: once you’ve detected and cropped a face, try to ... Eigenfaces • PCA extracts

Comparing with PCA

Page 27: Face Recognition: Eigenfacesand Fisherfacesdkeren/ip/eigen-fischer-faces.pdf · Face recognition: once you’ve detected and cropped a face, try to ... Eigenfaces • PCA extracts

Variables

• N Sample images:

• c classes:

• Average of each class:

• Average of all data:

{ }Nxx ,,1 L

{ }cχχ ,,1 L

∑=∈ ikx

k

i

i xN χ

µ1

∑==

N

kkx

N 1

Page 28: Face Recognition: Eigenfacesand Fisherfacesdkeren/ip/eigen-fischer-faces.pdf · Face recognition: once you’ve detected and cropped a face, try to ... Eigenfaces • PCA extracts

Scatter Matrices

• Scatter of class i: ( )( )Tik

x

iki xxSik

µµχ

−−= ∑∈

∑=

=c

i

iW SS1

( )( )∑=

−−=c

i

T

iiiB NS1

µµµµ

• Within class scatter:

• Between class scatter:

Page 29: Face Recognition: Eigenfacesand Fisherfacesdkeren/ip/eigen-fischer-faces.pdf · Face recognition: once you’ve detected and cropped a face, try to ... Eigenfaces • PCA extracts

Illustration

2S

1S

BS

21 SSSW +=

x1

x2

Within class scatter

Between class scatter

Page 30: Face Recognition: Eigenfacesand Fisherfacesdkeren/ip/eigen-fischer-faces.pdf · Face recognition: once you’ve detected and cropped a face, try to ... Eigenfaces • PCA extracts

Mathematical Formulation

• After projection

– Between class scatter

– Within class scatter

• Objective

• Solution: Generalized Eigenvectors

• Rank of Wopt is limited

– Rank(SB) <= |C|-1

– Rank(SW) <= N-C

kT

k xWy =

WSWS BT

B =~

WSWS WT

W =~

WSW

WSW

S

SW

WT

BT

W

B

optWW

max arg~

~

max arg ==

miwSwS iWiiB ,,1 K== λ

Page 31: Face Recognition: Eigenfacesand Fisherfacesdkeren/ip/eigen-fischer-faces.pdf · Face recognition: once you’ve detected and cropped a face, try to ... Eigenfaces • PCA extracts

Illustration

2S

1S

BS

21 SSSW +=

x1

x2

Page 32: Face Recognition: Eigenfacesand Fisherfacesdkeren/ip/eigen-fischer-faces.pdf · Face recognition: once you’ve detected and cropped a face, try to ... Eigenfaces • PCA extracts

Recognition with FLD• Use PCA to reduce dimensions to N-C

• Compute within-class and between-class

scatter matrices for PCA coefficients

• Solve generalized eigenvector problem

• Project to FLD subspace (c-1 dimensions)

• Classify by nearest neighbor

WSW

WSWW

W

T

B

T

fldW

max arg= miwSwS iWiiB ,,1 K== λ

( )( )Tik

x

iki xxSik

µµχ

−−= ∑∈

∑=

=c

i

iW SS1

( )( )∑=

−−=c

i

T

iiiB NS1

µµµµ

xWxT

opt=ˆ

)pca(XWpca =

Note: x in step 2 refers to PCA coef; x in

step 4 refers to original data

Page 33: Face Recognition: Eigenfacesand Fisherfacesdkeren/ip/eigen-fischer-faces.pdf · Face recognition: once you’ve detected and cropped a face, try to ... Eigenfaces • PCA extracts

Results: Eigenface vs. Fisherface

• Variation in Facial Expression, Eyewear, and Lighting

• Input: 160 images of 16 people

• Train: 159 images

• Test: 1 image

With glasses

Without glasses

3 Lighting conditions

5 expressions

Reference: Eigenfaces vs. Fisherfaces, Belheumer et al., PAMI 1997

Page 34: Face Recognition: Eigenfacesand Fisherfacesdkeren/ip/eigen-fischer-faces.pdf · Face recognition: once you’ve detected and cropped a face, try to ... Eigenfaces • PCA extracts

Eigenfaces vs. Fisherfaces

Reference: Eigenfaces vs. Fisherfaces, Belheumer et al., PAMI 1997


Recommended