Lecture: Face Recognition

Similar documents
Lecture 17: Face Recogni2on

Lecture 17: Face Recogni2on

Face recognition Computer Vision Spring 2018, Lecture 21

Lecture 13 Visual recognition

COS 429: COMPUTER VISON Face Recognition

Face Recognition. Face Recognition. Subspace-Based Face Recognition Algorithms. Application of Face Recognition

Dimensionality Reduction Using PCA/LDA. Hongyu Li School of Software Engineering TongJi University Fall, 2014

PCA FACE RECOGNITION

Lecture: Face Recognition and Feature Reduction

Lecture: Face Recognition and Feature Reduction

Deriving Principal Component Analysis (PCA)

Recognition Using Class Specific Linear Projection. Magali Segal Stolrasky Nadav Ben Jakov April, 2015

Course 495: Advanced Statistical Machine Learning/Pattern Recognition

Lecture 24: Principal Component Analysis. Aykut Erdem May 2016 Hacettepe University

Machine Learning. Data visualization and dimensionality reduction. Eric Xing. Lecture 7, August 13, Eric Xing Eric CMU,

Advanced Introduction to Machine Learning CMU-10715

Keywords Eigenface, face recognition, kernel principal component analysis, machine learning. II. LITERATURE REVIEW & OVERVIEW OF PROPOSED METHODOLOGY

Example: Face Detection

Principal Component Analysis -- PCA (also called Karhunen-Loeve transformation)

Principal Component Analysis

Image Analysis & Retrieval Lec 14 - Eigenface & Fisherface

Image Analysis & Retrieval. Lec 14. Eigenface and Fisherface

Eigenfaces. Face Recognition Using Principal Components Analysis

Reconnaissance d objetsd et vision artificielle

Robot Image Credit: Viktoriya Sukhanova 123RF.com. Dimensionality Reduction

Face detection and recognition. Detection Recognition Sally

CITS 4402 Computer Vision

Image Analysis. PCA and Eigenfaces

Eigenimages. Digital Image Processing: Bernd Girod, 2013 Stanford University -- Eigenimages 1

Eigenface-based facial recognition

CS4495/6495 Introduction to Computer Vision. 8B-L2 Principle Component Analysis (and its use in Computer Vision)

Face Detection and Recognition

Linear Subspace Models

CS168: The Modern Algorithmic Toolbox Lecture #7: Understanding Principal Component Analysis (PCA)

1 Principal Components Analysis

An Efficient Pseudoinverse Linear Discriminant Analysis method for Face Recognition

System 1 (last lecture) : limited to rigidly structured shapes. System 2 : recognition of a class of varying shapes. Need to:

December 20, MAA704, Multivariate analysis. Christopher Engström. Multivariate. analysis. Principal component analysis

Eigenimaging for Facial Recognition

Discriminant Uncorrelated Neighborhood Preserving Projections

ECE 521. Lecture 11 (not on midterm material) 13 February K-means clustering, Dimensionality reduction

Symmetric Two Dimensional Linear Discriminant Analysis (2DLDA)

Principal Component Analysis

A Unified Bayesian Framework for Face Recognition

Locality Preserving Projections

Unsupervised Learning: K- Means & PCA

Principal Component Analysis (PCA)

What is Principal Component Analysis?

ECE 661: Homework 10 Fall 2014

PCA and LDA. Man-Wai MAK

Eigenfaces and Fisherfaces

Introduction to Machine Learning

Focus was on solving matrix inversion problems Now we look at other properties of matrices Useful when A represents a transformations.

Introduction to Machine Learning. PCA and Spectral Clustering. Introduction to Machine Learning, Slides: Eran Halperin

When Fisher meets Fukunaga-Koontz: A New Look at Linear Discriminants

COMP 408/508. Computer Vision Fall 2017 PCA for Recognition

Lecture 7: Con3nuous Latent Variable Models

Comparative Assessment of Independent Component. Component Analysis (ICA) for Face Recognition.

Face Recognition Using Multi-viewpoint Patterns for Robot Vision

Subspace Methods for Visual Learning and Recognition

CSC 411 Lecture 12: Principal Component Analysis

Pattern Recognition 2

CS 4495 Computer Vision Principle Component Analysis

Modeling Classes of Shapes Suppose you have a class of shapes with a range of variations: System 2 Overview

20 Unsupervised Learning and Principal Components Analysis (PCA)

Principal Component Analysis (PCA)

Enhanced Fisher Linear Discriminant Models for Face Recognition

Face Recognition Using Laplacianfaces He et al. (IEEE Trans PAMI, 2005) presented by Hassan A. Kingravi

Dimension Reduction and Component Analysis Lecture 4

Dimension Reduction and Component Analysis

Simultaneous and Orthogonal Decomposition of Data using Multimodal Discriminant Analysis

PCA and LDA. Man-Wai MAK

PCA, Kernel PCA, ICA

Statistical Pattern Recognition

Principal Components Analysis. Sargur Srihari University at Buffalo

Computation. For QDA we need to calculate: Lets first consider the case that

STA 414/2104: Lecture 8

Lecture 16: Small Sample Size Problems (Covariance Estimation) Many thanks to Carlos Thomaz who authored the original version of these slides

L11: Pattern recognition principles

Face Recognition. Lecture-14

Principal Component Analysis and Linear Discriminant Analysis

Dimension Reduction and Low-dimensional Embedding

Machine Learning. CUNY Graduate Center, Spring Lectures 11-12: Unsupervised Learning 1. Professor Liang Huang.

Expectation Maximization

Face Recognition Using Eigenfaces

Model-based Characterization of Mammographic Masses

201 Broadway 20 Ames St. E (corresponding to variations between dierent. and P (j E ) which are derived from training data

STA 414/2104: Lecture 8

Non-parametric Classification of Facial Features

Random Sampling LDA for Face Recognition

Covariance and Correlation Matrix

Appears in: The 3rd IEEE Int'l Conference on Automatic Face & Gesture Recognition, Nara, Japan, April 1998

The Mathematics of Facial Recognition

Lecture 5 Supspace Tranformations Eigendecompositions, kernel PCA and CCA

Face Recognition. Lecture-14

Machine Learning (Spring 2012) Principal Component Analysis

Dimensionality reduction

2D Image Processing Face Detection and Recognition

INTERNATIONAL JOURNAL OF ENGINEERING SCIENCES & RESEARCH TECHNOLOGY

Bilinear Discriminant Analysis for Face Recognition

Transcription:

Lecture: Face Recognition Juan Carlos Niebles and Ranjay Krishna Stanford Vision and Learning Lab Lecture 12-1

What we will learn today Introduction to face recognition The Eigenfaces Algorithm Linear Discriminant Analysis (LDA) Turk and Pentland, Eigenfaces for Recognition, Journal of Cognitive Neuroscience 3 (1): 71 86. P. Belhumeur, J. Hespanha, and D. Kriegman. "Eigenfaces vs. Fisherfaces: Recognition Using Class Specific Linear Projection". IEEE Transactions on pattern analysis and machine intelligence 19 (7): 711. 1997. Lecture 12-2

Faces in the brain Courtesy of Johannes M. Zanker Lecture 12-3

Faces in the brain fusiform face area Lecture 12-4 Kanwisher, et al. 1997

Detection versus Recognition Detection finds the faces in images Recognition recognizes WHO the person is Lecture 12-5

Face Recognition Digital photography Lecture 12-6

Face Recognition Digital photography Surveillance Lecture 12-7

Face Recognition Digital photography Surveillance Album organization Lecture 12-8

Face Recognition Digital photography Surveillance Album organization Person tracking/id. Lecture 12-9

Face Recognition Digital photography Surveillance Album organization Person tracking/id. Emotions and expressions Lecture 12-10

Face Recognition Digital photography Surveillance Album organization Person tracking/id. Emotions and expressions Security/warfare Tele-conferencing Etc. Lecture 12-11

The Space of Faces An image is a point in a high dimensional space If represented in grayscale intensity, an N x M image is a point in R NM E.g. 100x100 image = 10,000 dim Slide credit: Chuck Dyer, Steve Seitz, Nishino Lecture 12-12

100x100 images can contain many things other than faces! Lecture 12-13

The Space of Faces ɸ 1 An image is a point in a high dimensional space If represented in grayscale intensity, an N x M image is a point in R NM E.g. 100x100 image = 10,000 dim However, relatively few high dimensional vectors correspond to valid face images We want to effectively model the subspace of face images Slide credit: Chuck Dyer, Steve Seitz, Nishino Lecture 12-14

Where have we seen something like this before? ɸ 1 Lecture 12-15

Image space Face space Compute n-dim subspace such that the projection of the data points onto the subspace has the largest variance among all n-dim subspaces. Maximize the scatter of the training images in face space Lecture 12-16

Key Idea So, compress them to a low-dimensional subspace that captures key appearance characteristics of the visual DOFs. USE PCA for estimating the sub-space (dimensionality reduction) Compare two faces by projecting the images into the subspace and measuring the EUCLIDEAN distance between them. Lecture 12-17

What we will learn today Introduction to face recognition The Eigenfaces Algorithm Linear Discriminant Analysis (LDA) Turk and Pentland, Eigenfaces for Recognition, Journal of Cognitive Neuroscience 3 (1): 71 86. P. Belhumeur, J. Hespanha, and D. Kriegman. "Eigenfaces vs. Fisherfaces: Recognition Using Class Specific Linear Projection". IEEE Transactions on pattern analysis and machine intelligence 19 (7): 711. 1997. Lecture 12-18

Eigenfaces: key idea Assume that most face images lie on a lowdimensional subspace determined by the first k (k<<d) directions of maximum variance Use PCA to determine the vectors or eigenfaces that span that subspace Represent all face images in the dataset as linear combinations of eigenfaces M. Turk and A. Pentland, Face Recognition using Eigenfaces, CVPR 1991 Lecture 12-19

Training images: x 1,,x N Lecture 12-20

Top eigenvectors: ɸ 1,,ɸ k Mean: μ Lecture 12-21

Visualization of eigenfaces Principal component (eigenvector) ɸk μ + 3σkɸk μ 3σkɸk Lecture 12-22

Eigenface algorithm Training 1. Align training images x 1, x 2,, x N Note that each image is formulated into a long vector! 2. Compute average face µ = 1 x i N 3. Compute the difference image (the centered data matrix) Lecture 12-23

Eigenface algorithm 4. Compute the covariance matrix 5. Compute the eigenvectors of the covariance matrix Σ 6. Compute each training image x i s projections as x i ( x c i φ 1, x c i φ 2,..., x c i φ ) K ( a 1, a 2,..., a K ) 7. Visualize the estimated training face x i x i µ + a 1 φ 1 + a 2 φ 2 +... + a K φ K Lecture 12-24

Eigenface algorithm x " a 1 φ 1 a 2 φ 2... a K φ K 6. Compute each training image x i s projections as Reconstructed training face x i ( x c i φ 1, x c i φ 2,..., x c i φ ) K ( a 1, a 2,..., a K ) 7. Visualize the reconstructed training face x i x i µ + a 1 φ 1 + a 2 φ 2 +... + a K φ K Lecture 12-25

Eigenvalues (variance along eigenvectors) Lecture 12-26

Reconstruction and Errors K = 4 K = 200 K = 400 Only selecting the top K eigenfaces à reduces the dimensionality. Fewer eigenfaces result in more information loss, and hence less discrimination between faces. Lecture 12-27

Eigenface algorithm Testing 1. Take query image t 2. Project into eigenface space and compute projection t ((t µ) φ 1, (t µ) φ 2,..., (t µ) φ K ) ( w 1, w 2,..., w K ) 3. Compare projection w with all N training projections Simple comparison metric: Euclidean Simple decision: K-Nearest Neighbor (note: this K refers to the k-nn algorithm, is different from the previous K s referring to the # of principal components) Lecture 12-28

Visualization of eigenfaces Eigenfaces look somewhat like generic faces. Lecture 12-29

Shortcomings Requires carefully controlled data: All faces centered in frame Same size Some sensitivity to angle Alternative: Learn one set of PCA vectors for each angle Use the one with lowest error Method is completely knowledge free (sometimes this is good!) Doesn t know that faces are wrapped around 3D objects (heads) Makes no effort to preserve class distinctions Lecture 12-30

Summary for Eigenface Pros Non-iterative, globally optimal solution Limitations PCA projection is optimal for reconstruction from a low dimensional basis, but may NOT be optimal for discrimination Lecture 12-31

Besides face recognitions, we can also do Facial expression recognition Lecture 12-32

Happiness subspace (method A) Lecture 12-33

Disgust subspace (method A) Lecture 12-34

Facial Expression Recognition Movies (method A) Lecture 12-35

What we will learn today Introduction to face recognition The Eigenfaces Algorithm Linear Discriminant Analysis (LDA) Turk and Pentland, Eigenfaces for Recognition, Journal of Cognitive Neuroscience 3 (1): 71 86. P. Belhumeur, J. Hespanha, and D. Kriegman. "Eigenfaces vs. Fisherfaces: Recognition Using Class Specific Linear Projection". IEEE Transactions on pattern analysis and machine intelligence 19 (7): 711. 1997. Lecture 12-36

Which direction will is the first principle component? Lecture 12-37

Fischer s Linear Discriminant Analysis Goal: find the best separation between two classes Slide inspired by N. Vasconcelos Lecture 12-38

Difference between PCA and LDA PCA preserves maximum variance LDA preserves discrimination Find projection that maximizes scatter between classes and minimizes scatter within classes Lecture 12-39

Illustration of the Projection Using two classes as example: x2 x2 x1 x1 Poor Projection Good Lecture 12-40

Basic intuition: PCA vs. LDA Lecture 12-41

LDA with 2 variables We want to learn a projection W such that the projection converts all the points from x to a new space (For this example, assume m == 1): z = w & x Let the per class means be: And the per class covariance matrices be: We want a projection that maximizes: Lecture 12-42

Fischer s Linear Discriminant Analysis Slide inspired by N. Vasconcelos Lecture 12-43

LDA with 2 variables The following objective function: Can be written as Lecture 12-44

LDA with 2 variables We can write the between class scatter as: Also, the within class scatter becomes: Slide inspired by N. Vasconcelos Lecture 12-45

LDA with 2 variables We can plug in these scatter values to our objective function: And our objective becomes: Slide inspired by N. Vasconcelos Lecture 12-46

The scatter variables LDA with 2 variables Slide inspired by N. Vasconcelos Lecture 12-47

Visualization x2 S W = S 1 + S 2 Within class scatter S 1 S 2 S B x1 Between class scatter Lecture 12-48

Linear Discriminant Analysis (LDA) Maximizing the ratio Is equivalent to maximizing the numerator while keeping the denominator constant, i.e. And can be accomplished using Lagrange multipliers, where we define the Lagrangian as And maximize with respect to both w and λ Slide inspired by N. Vasconcelos Lecture 12-49

Setting the gradient of Linear Discriminant Analysis (LDA) With respect to w to zeros we get or This is a generalized eigenvalue problem The solution is easy when exists Slide inspired by N. Vasconcelos Lecture 12-50

In this case Linear Discriminant Analysis (LDA) And using the definition of S B Noting that (μ 1 -μ 0 ) T w=α is a scalar this can be written as and since we don t care about the magnitude of w Slide inspired by N. Vasconcelos Lecture 12-51

LDA with N variables and C classes Lecture 12-52

Variables N Sample images: { x,, } 1! x N C classes: Average of each class: µ i = 1 N i å x k x k Îc i Average of all data: µ = 1 N å x k N k= 1 Lecture 12-53

Scatter Matrices Scatter of class i: Within class scatter: Between class scatter: S i = å x c å S W = S i k Îc i= 1 c å S B = N i i= 1 ( x - µ )( x - µ ) T i k ( µ - µ )( µ - µ ) i i k i i T Lecture 12-54

Mathematical Formulation Recall that we want to learn a projection W such that the projection converts all the points from x to a new space z: z = w & x After projection: Between class scatter Within class scatter So, the objective becomes: W opt ~ S ~ S B = W = ~ SB = arg max ~ = arg max W S W W W W W W T T T T S S S S B W B W W W W W Lecture 12-55

Mathematical Formulation W opt = arg max W W W T T S S B W W W Solve generalized eigenvector problem: S w = l S w i =1,!, m B i i W i Lecture 12-56

Mathematical Formulation Solution: Generalized Eigenvectors SB wi = li SW wi i = 1,!, m Rank of W opt is limited Rank(S B ) <= C -1 Rank(S W ) <= N-C Lecture 12-57

PCA vs. LDA Eigenfaces exploit the max scatter of the training images in face space Fisherfaces attempt to maximise the between class scatter, while minimising the within class scatter. Lecture 12-58

Basic intuition: PCA vs. LDA Lecture 12-59

Results: Eigenface vs. Fisherface Input: 160 images of 16 people Train: 159 images Test: 1 image Variation in Facial Expression, Eyewear, and Lighting With glasses Without glasses 3 Lighting conditions 5 expressions Lecture 12-60

Eigenface vs. Fisherface Lecture 12-61

What we have learned today Introduction to face recognition The Eigenfaces Algorithm Linear Discriminant Analysis (LDA) Turk and Pentland, Eigenfaces for Recognition, Journal of Cognitive Neuroscience 3 (1): 71 86. P. Belhumeur, J. Hespanha, and D. Kriegman. "Eigenfaces vs. Fisherfaces: Recognition Using Class Specific Linear Projection". IEEE Transactions on pattern analysis and machine intelligence 19 (7): 711. 1997. Lecture 12-62