face detection and recognition

67
Face Detection and Recognition Computational Photography Derek Hoiem, University of Illinois 10/28/10 Chuck Close, self portrait Lucas by Chuck Close lides from Lana Lazebnik, Silvio Savarese, Fei-Fei Li

Upload: dwight

Post on 25-Feb-2016

43 views

Category:

Documents


4 download

DESCRIPTION

10/28/10. Face Detection and Recognition. Computational Photography Derek Hoiem, University of Illinois. Chuc k Close, s elf portrait. Lucas by Chuc k Close. Some slides from Lana Lazebnik, Silvio Savarese, Fei-Fei Li. Administrative stuff. Previous class? Project 4: vote for faves - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Face Detection and Recognition

Face Detection and Recognition

Computational PhotographyDerek Hoiem, University of Illinois

10/28/10

Chuck Close, self portraitLucas by Chuck Close

Some slides from Lana Lazebnik, Silvio Savarese, Fei-Fei Li

Page 2: Face Detection and Recognition

Administrative stuff• Previous class?• Project 4: vote for faves• Midterm (Nov 9)

– Closed book – can bring one loose-leaf page of notes

– Some review Nov 4• Project 5 (due Nov 15)

Page 3: Face Detection and Recognition

Face detection and recognition

Detection Recognition “Sally”

Page 4: Face Detection and Recognition

Applications of Face Recognition• Digital photography

Page 5: Face Detection and Recognition

Applications of Face Recognition• Digital photography• Surveillance

Page 6: Face Detection and Recognition

Applications of Face Recognition• Digital photography• Surveillance• Album organization

Page 7: Face Detection and Recognition

Consumer application: iPhoto 2009

http://www.apple.com/ilife/iphoto/

Page 8: Face Detection and Recognition

Consumer application: iPhoto 2009• Can be trained to recognize pets!

http://www.maclife.com/article/news/iphotos_faces_recognizes_cats

Page 9: Face Detection and Recognition

What does a face look like?

Page 10: Face Detection and Recognition

What does a face look like?

Page 11: Face Detection and Recognition

What makes face detection hard?

Expression

Page 12: Face Detection and Recognition

What makes face detection hard?

Viewpoint

Page 13: Face Detection and Recognition

What makes face detection hard?

Occlusion

Page 14: Face Detection and Recognition

What makes face detection hard?

Distracting background

Page 15: Face Detection and Recognition

What makes face detection and recognition hard?

Coincidental textures

Page 17: Face Detection and Recognition

How to find faces anywhere in an image?

Page 18: Face Detection and Recognition

Face detection: sliding windows

Face or Not Face…

How to deal with multiple scales?

Page 19: Face Detection and Recognition

Face classifier

Training Labels

Training Images

Classifier Training

Training

Image Features

Image Features

Testing

Test Image

Trained Classifier

Trained Classifier Face

Prediction

Page 20: Face Detection and Recognition

Face detection

Face or Not Face

…Face or Not Face

Page 21: Face Detection and Recognition

What features?

Exemplars(Sung Poggio 1994)

Edge (Wavelet) Pyramids(Schneiderman Kanade 1998)

Intensity Patterns (with NNs)(Rowely Baluja Kanade1996)

Haar Filters(Viola Jones 2000)

Page 22: Face Detection and Recognition

How to classify?• Many ways

– Neural networks– Adaboost– SVMs– Nearest neighbor

Page 23: Face Detection and Recognition

Statistical Template

• Object model = log linear model of parts at fixed positions

+3 +2 -2 -1 -2.5 = -0.5

+4 +1 +0.5 +3 +0.5= 10.5

> 7.5?

> 7.5?

Non-object

Object

Page 24: Face Detection and Recognition

Training multiple viewpoints

Train new detector for each viewpoint.

Page 25: Face Detection and Recognition

Results: faces

208 images with 441 faces, 347 in profile

Page 26: Face Detection and Recognition

Results: faces today

http://demo.pittpatt.com/

Page 27: Face Detection and Recognition

Face recognition

Detection Recognition “Sally”

Page 28: Face Detection and Recognition

Face recognition

• 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 (or kernel space)

(e.g., “Eigenfaces”=PCA)2. Measure face features3. Make 3d face model, compare

shape+appearance (e.g., AAM)

Page 29: Face Detection and Recognition

Simple idea1. Treat pixels as a vector

2. Recognize face by nearest neighbor

x

nyy ...1

xy Tk

kk argmin

Page 30: Face Detection and Recognition

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 31: Face Detection and Recognition

The space of all face images• Eigenface idea: construct a low-dimensional linear

subspace that best explains the variation in the set of face images

Page 32: Face Detection and Recognition

Principal Component Analysis (PCA)• Given: N data points x1, … ,xN in Rd

• We want to find a new set of features that are linear combinations of original ones: u(xi) = uT(xi – µ)

(µ: mean of data points)

• Choose unit vector u in Rd that captures the most data variance

Forsyth & Ponce, Sec. 22.3.1, 22.3.2

Page 33: Face Detection and Recognition

Principal Component Analysis• Direction that maximizes the variance of the projected data:

Projection of data point

Covariance matrix of data

The direction that maximizes the variance is the eigenvector associated with the largest eigenvalue of Σ

N

N

1/N

Maximizesubject to ||u||=1

Page 34: Face Detection and Recognition

Implementation issue

• Covariance matrix is huge (N2 for N pixels)

• But typically # examples << N

• Simple trick– X is matrix of normalized training data– Solve for eigenvectors u of XXT instead of XTX– Then XTu is eigenvector of covariance XTX– May need to normalize (to get unit length vector)

Page 35: Face Detection and Recognition

Eigenfaces (PCA on face images)

1. Compute covariance matrix of face images

2. Compute the principal components (“eigenfaces”)– K eigenvectors with largest eigenvalues

3. Represent all face images in the dataset as linear combinations of eigenfaces

– Perform nearest neighbor on these coefficients

M. Turk and A. Pentland, Face Recognition using Eigenfaces, CVPR 1991

Page 36: Face Detection and Recognition

Eigenfaces example• Training images• x1,…,xN

Page 37: Face Detection and Recognition

Eigenfaces exampleTop eigenvectors: u1,…uk

Mean: μ

Page 38: Face Detection and Recognition

Visualization of eigenfacesPrincipal component (eigenvector) uk

μ + 3σkuk

μ – 3σkuk

Page 39: Face Detection and Recognition

Representation and reconstruction• Face x in “face space” coordinates:

=

Page 40: Face Detection and Recognition

Representation and reconstruction• Face x in “face space” coordinates:

• Reconstruction:

= +

µ + w1u1+w2u2+w3u3+w4u4+ …

=

^x =

Page 41: Face Detection and Recognition

P = 4

P = 200

P = 400

Reconstruction

After computing eigenfaces using 400 face images from ORL face database

Page 42: Face Detection and Recognition

Eigenvalues (variance along eigenvectors)

Page 43: Face Detection and Recognition

NotePreserving variance (minimizing MSE) does not necessarily lead to qualitatively good reconstruction.

P = 200

Page 44: Face Detection and Recognition

Recognition with eigenfacesProcess labeled training images• Find mean µ and covariance matrix Σ• Find k principal components (eigenvectors of Σ) u1,…uk

• Project each training image xi onto subspace spanned by principal components:(wi1,…,wik) = (u1

T(xi – µ), … , ukT(xi – µ))

Given novel image x• Project onto subspace:

(w1,…,wk) = (u1T(x – µ), … , uk

T(x – µ))• Optional: check reconstruction error x – x to determine

whether image is really a face• Classify as closest training face in k-dimensional subspace

^

M. Turk and A. Pentland, Face Recognition using Eigenfaces, CVPR 1991

Page 45: Face Detection and Recognition

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

• What are the problems for face recognition?

Page 46: Face Detection and Recognition

Limitations

Global appearance method: not robust to misalignment, background variation

Page 47: Face Detection and Recognition

Limitations• The direction of maximum variance is not always

good for classification

Page 48: Face Detection and Recognition

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 49: Face Detection and Recognition

Illustration

2S

1S

BS

21 SSSW

x1

x2Within class scatter

Between class scatter

WSW

WSW

SS

WW

TB

T

W

Bopt WW

max arg~~

max arg Objective:

Page 50: Face Detection and Recognition

Comparing with PCA

Page 51: Face Detection and Recognition

Large scale comparison of methods• FRVT 2006 Report• Not much (or any) information available about

methods, but gives idea of what is doable

Page 52: Face Detection and Recognition

FVRT Challenge• Frontal faces

– FVRT2006 evaluation: computers win!

Page 53: Face Detection and Recognition

Another cool method: attributes for face verification

Kumar et al. 2009

Page 54: Face Detection and Recognition

Attributes for face verification

Kumar et al. 2009

Page 55: Face Detection and Recognition

Attributes for face verification

Page 57: Face Detection and Recognition
Page 58: Face Detection and Recognition
Page 59: Face Detection and Recognition
Page 60: Face Detection and Recognition
Page 61: Face Detection and Recognition
Page 62: Face Detection and Recognition
Page 63: Face Detection and Recognition
Page 64: Face Detection and Recognition
Page 65: Face Detection and Recognition
Page 66: Face Detection and Recognition

Things to remember

• Face detection via sliding window search– Features are important

• PCA is a generally useful dimensionality reduction technique– But not ideal for discrimination

• FLD better for discrimination, though only ideal under Gaussian data assumptions

• Computer face recognition works very well under controlled environments – still lots of room for improvement in general conditions

Page 67: Face Detection and Recognition

Next class• Things you can do with lots of data