Lecture 17: Face Recogni2on

Similar documents
Lecture 17: Face Recogni2on

Lecture: Face Recognition

Face recognition Computer Vision Spring 2018, Lecture 21

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

Lecture: Face Recognition and Feature Reduction

Lecture 13 Visual recognition

Lecture: Face Recognition and Feature Reduction

COS 429: COMPUTER VISON Face Recognition

PCA FACE RECOGNITION

Example: Face Detection

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

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

Deriving Principal Component Analysis (PCA)

Unsupervised Learning: K- Means & PCA

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

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

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

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

Dr. Ulas Bagci

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

Image Analysis & Retrieval. Lec 14. Eigenface and Fisherface

Reconnaissance d objetsd et vision artificielle

CITS 4402 Computer Vision

Image Analysis & Retrieval Lec 14 - Eigenface & Fisherface

Principal Component Analysis (PCA)

Course 495: Advanced Statistical Machine Learning/Pattern Recognition

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

Advanced Introduction to Machine Learning CMU-10715

What is Principal Component Analysis?

Lecture 7: Con3nuous Latent Variable Models

Principal Component Analysis

Linear Subspace Models

Lecture 13: Tracking mo3on features op3cal flow

Eigenfaces. Face Recognition Using Principal Components Analysis

Principal Component Analysis

Face detection and recognition. Detection Recognition Sally

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

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

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

Image Analysis. PCA and Eigenfaces

Eigenimaging for Facial Recognition

Expectation Maximization

PCA & ICA. CE-717: Machine Learning Sharif University of Technology Spring Soleymani

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

Face Detection and Recognition

1 Principal Components Analysis

Dimensionality reduction

CSC 411 Lecture 12: Principal Component Analysis

Lecture 8: Principal Component Analysis; Kernel PCA

A Unified Bayesian Framework for Face Recognition

Principal Component Analysis (PCA)

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

PCA, Kernel PCA, ICA

STA 414/2104: Lecture 8

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

ECE 661: Homework 10 Fall 2014

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

PCA and LDA. Man-Wai MAK

STA 414/2104: Lecture 8

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

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

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

Locality Preserving Projections

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

An Efficient Pseudoinverse Linear Discriminant Analysis method for Face Recognition

Subspace Methods for Visual Learning and Recognition

Discriminant Uncorrelated Neighborhood Preserving Projections

Lecture 5 Supspace Tranformations Eigendecompositions, kernel PCA and CCA

Pattern Recognition 2

Real Time Face Detection and Recognition using Haar - Based Cascade Classifier and Principal Component Analysis

CS 4495 Computer Vision Principle Component Analysis

CSC321 Lecture 20: Autoencoders

Symmetric Two Dimensional Linear Discriminant Analysis (2DLDA)

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

COMP 562: Introduction to Machine Learning

CS 6140: Machine Learning Spring 2016

Eigenfaces and Fisherfaces

Signal Analysis. Principal Component Analysis

CS 6140: Machine Learning Spring What We Learned Last Week. Survey 2/26/16. VS. Model

November 28 th, Carlos Guestrin 1. Lower dimensional projections

2D Image Processing Face Detection and Recognition

20 Unsupervised Learning and Principal Components Analysis (PCA)

Machine Learning - MT & 14. PCA and MDS

Linear Algebra & Geometry why is linear algebra useful in computer vision?

Simultaneous and Orthogonal Decomposition of Data using Multimodal Discriminant Analysis

CS168: The Modern Algorithmic Toolbox Lecture #8: How PCA Works

Enhanced Fisher Linear Discriminant Models for Face Recognition

Face Recognition and Biometric Systems

Computer Vision. Pa0ern Recogni4on Concepts Part I. Luis F. Teixeira MAP- i 2012/13

Principal Component Analysis (PCA) CSC411/2515 Tutorial

CS 559: Machine Learning Fundamentals and Applications 5 th Set of Notes

Dimension Reduction and Component Analysis

Introduction to Machine Learning

Dimensionality Reduction: PCA. Nicholas Ruozzi University of Texas at Dallas

Dimensionality Reduction and Principal Components

Mathematical foundations - linear algebra

Face Recognition Using Multi-viewpoint Patterns for Robot Vision

Non-parametric Classification of Facial Features

Dimension Reduction and Component Analysis Lecture 4

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

Transcription:

Lecture 17: Face Recogni2on Dr. Juan Carlos Niebles Stanford AI Lab Professor Fei-Fei Li Stanford Vision Lab Lecture 17-1!

What we will learn today Introduc2on to face recogni2on Principal Component Analysis (PCA) The Eigenfaces Algorithm Linear Discriminant Analysis (LDA) Turk and Pentland, Eigenfaces for Recogni2on, Journal of Cogni-ve Neuroscience 3 (1): 71 86. P. Belhumeur, J. Hespanha, and D. Kriegman. "Eigenfaces vs. Fisherfaces: Recogni2on Using Class Specific Linear Projec2on". IEEE Transac-ons on pa7ern analysis and machine intelligence 19 (7): 711. 1997. Lecture 17-2!

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

Faces in the brain Lecture 17-4! Kanwisher, et al. 1997

Face Recogni2on Digital photography Lecture 17-5!

Face Recogni2on Digital photography Surveillance Lecture 17-6!

Face Recogni2on Digital photography Surveillance Album organiza2on Lecture 17-7!

Face Recogni2on Digital photography Surveillance Album organiza2on Person tracking/id. Lecture 17-8!

Face Recogni2on Digital photography Surveillance Album organiza2on Person tracking/id. Emo2ons and expressions Lecture 17-9!

Face Recogni2on Digital photography Surveillance Album organiza2on Person tracking/id. Emo2ons and expressions Security/warfare Tele-conferencing Etc. Lecture 17-10!

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 17-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 However, rela2vely few high dimensional vectors correspond to valid face images We want to effec2vely model the subspace of face images Slide credit: Chuck Dyer, Steve Seitz, Nishino Lecture 17-12!

Image space Face space Compute n-dim subspace such that the projec2on of the data points onto the subspace has the largest variance among all n-dim subspaces. Maximize the scaier of the training images in face space Lecture 17-13!

Key Idea So, compress them to a low-dimensional subspace that captures key appearance characteris2cs of the visual DOFs. USE PCA for es2ma2ng the sub-space (dimensionality reduc2on) Compare two faces by projec2ng the images into the subspace and measuring the EUCLIDEAN distance between them. Lecture 17-14!

What we will learn today Introduc2on to face recogni2on Principal Component Analysis (PCA) The Eigenfaces Algorithm Linear Discriminant Analysis (LDA) Turk and Pentland, Eigenfaces for Recogni2on, Journal of Cogni-ve Neuroscience 3 (1): 71 86. P. Belhumeur, J. Hespanha, and D. Kriegman. "Eigenfaces vs. Fisherfaces: Recogni2on Using Class Specific Linear Projec2on". IEEE Transac-ons on pa7ern analysis and machine intelligence 19 (7): 711. 1997. Lecture 17-15!

technical note PCA Formula2on Basic idea: If the data lives in a subspace, it is going to look very flat when viewed from the full space, e.g. 1D subspace in 2D 2D subspace in 3D This means that if we fit a Gaussian to the data the equiprobability contours are going to be highly skewed ellipsoids Slide inspired by N. Vasconcelos Lecture 17-16!

technical note PCA Formula2on If x is Gaussian with covariance Σ, the equiprobability contours are the ellipses whose x 2 Principal components φ i are the eigenvectors of Σ Principal lengths λ i are the eigenvalues of Σ φ 2 λ 2 λ 1 φ 1 x 1 by compu2ng the eigenvalues we know the data is Not flat if λ 1 λ 2 Flat if λ 1 >> λ 2 Slide inspired by N. Vasconcelos Lecture 17-17!

technical note PCA Algorithm (training) Slide inspired by N. Vasconcelos Lecture 17-18!

technical note PCA Algorithm (tes2ng) Slide inspired by N. Vasconcelos Lecture 17-19!

technical note PCA by SVD An alterna2ve manner to compute the principal components, based on singular value decomposi2on Quick reminder: SVD Any real n x m matrix (n>m) can be decomposed as Where M is an (n x m) column orthonormal matrix of let singular vectors (columns of M) Π is an (m x m) diagonal matrix of singular values N T is an (m x m) row orthonormal matrix of right singular vectors (columns of N) Slide inspired by N. Vasconcelos Lecture 17-20!

technical note PCA by SVD To relate this to PCA, we consider the data matrix The sample mean is Slide inspired by N. Vasconcelos Lecture 17-21!

technical note PCA by SVD Center the data by subtrac2ng the mean to each column of X The centered data matrix is Slide inspired by N. Vasconcelos Lecture 17-22!

technical note PCA by SVD The sample covariance matrix is where x i c is the i th column of X c This can be wriien as Slide inspired by N. Vasconcelos Lecture 17-23!

technical note PCA by SVD The matrix is real (n x d). Assuming n>d it has SVD decomposi2on and Slide inspired by N. Vasconcelos Lecture 17-24!

technical note PCA by SVD Note that N is (d x d) and orthonormal, and Π 2 is diagonal. This is just the eigenvalue decomposi2on of Σ It follows that The eigenvectors of Σ are the columns of N The eigenvalues of Σ are This gives an alterna2ve algorithm for PCA Slide inspired by N. Vasconcelos Lecture 17-25!

technical note PCA by SVD In summary, computa2on of PCA by SVD Given X with one example per column Create the centered data matrix Compute its SVD Principal components are columns of N, eigenvalues are Slide inspired by N. Vasconcelos Lecture 17-26!

technical note Rule of thumb for finding the number of PCA components A natural measure is to pick the eigenvectors that explain p% of the data variability Can be done by ploxng the ra2o r k as a func2on of k E.g. we need 3 eigenvectors to cover 70% of the variability of this dataset Slide inspired by N. Vasconcelos Lecture 17-27!

What we will learn today Introduc2on to face recogni2on Principal Component Analysis (PCA) The Eigenfaces Algorithm Linear Discriminant Analysis (LDA) Turk and Pentland, Eigenfaces for Recogni2on, Journal of Cogni-ve Neuroscience 3 (1): 71 86. P. Belhumeur, J. Hespanha, and D. Kriegman. "Eigenfaces vs. Fisherfaces: Recogni2on Using Class Specific Linear Projec2on". IEEE Transac-ons on pa7ern analysis and machine intelligence 19 (7): 711. 1997. Lecture 17-28!

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

technical note 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 17-30!

technical note Eigenface algorithm 4. Compute the covariance matrix 5. Compute the eigenvectors of the covariance matrix Σ 6. Compute each training image x i s projec2ons as x i ( x c i φ 1, x c i φ 2,..., x c i φ ) K ( a 1, a 2,..., a K ) 7. Visualize the es2mated training face x i x i µ + a 1 φ 1 + a 2 φ 2 +... + a K φ K Lecture 17-31!

technical note Eigenface algorithm a 1 φ 1 a 2 φ 2... a K φ K 6. Compute each training image x i s projec2ons as x i ( x c i φ 1, x c i φ 2,..., x c i φ ) K ( a 1, a 2,..., a K ) 7. Visualize the es2mated training face x i x i µ + a 1 φ 1 + a 2 φ 2 +... + a K φ K Lecture 17-32!

technical note Eigenface algorithm Tes2ng 1. Take query image t 2. Project into eigenface space and compute projec2on t ((t µ) φ 1, (t µ) φ 2,..., (t µ) φ K ) ( w 1, w 2,..., w K ) 3. Compare projec2on w with all N training projec2ons 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 17-33!

Visualiza2on of eigenfaces Eigenfaces look somewhat like generic faces. Lecture 17-34!

Reconstruc2on and Errors K = 4 K = 200 K = 400 Only selec2ng the top K eigenfaces à reduces the dimensionality. Fewer eigenfaces result in more informa2on loss, and hence less discrimina2on between faces. Lecture 17-35!

Summary for Eigenface Pros Non-itera2ve, globally op2mal solu2on Limita2ons PCA projec2on is op&mal for reconstruc&on from a low dimensional basis, but may NOT be op&mal for discrimina&on See supplementary materials for Linear Discrimina2ve Analysis, aka Fisherfaces Lecture 17-36!

What we will learn today Introduc2on to face recogni2on Principal Component Analysis (PCA) The Eigenfaces Algorithm Linear Discriminant Analysis (LDA) Turk and Pentland, Eigenfaces for Recogni2on, Journal of Cogni-ve Neuroscience 3 (1): 71 86. P. Belhumeur, J. Hespanha, and D. Kriegman. "Eigenfaces vs. Fisherfaces: Recogni2on Using Class Specific Linear Projec2on". IEEE Transac-ons on pa7ern analysis and machine intelligence 19 (7): 711. 1997. Lecture 17-37!

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

Basic intui2on: PCA vs. LDA Lecture 17-39!

technical note Linear Discriminant Analysis (LDA) We have two classes such that We want to find the line z that best separates them One possibility would be to maximize Slide inspired by N. Vasconcelos Lecture 17-40!

technical note Linear Discriminant Analysis (LDA) However, this difference can be arbitrarily large by simply scaling w We are only interested in the direc2on, not the magnitude Need some type of normaliza2on Fisher suggested Slide inspired by N. Vasconcelos Lecture 17-41!

technical note Linear Discriminant Analysis (LDA) We have already seen that also Slide inspired by N. Vasconcelos Lecture 17-42!

technical note Linear Discriminant Analysis (LDA) And which can be wriien as Slide inspired by N. Vasconcelos Lecture 17-43!

technical note Visualiza2on x2 S W = S 1 + S 2 Within class scaier S 1 S 2 S B x1 Between class scaier Lecture 17-44!

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

technical note Linear Discriminant Analysis (LDA) Sexng the gradient of With respect to w to zeros we get or This is a generalized eigenvalue problem The solu2on is easy when exists Slide inspired by N. Vasconcelos Lecture 17-46!

technical note Linear Discriminant Analysis (LDA) In this case And using the defini2on of S No2ng that (μ 1 -μ 0 ) T w=α is a scalar this can be wriien as and since we don t care about the magnitude of w Slide inspired by N. Vasconcelos Lecture 17-47!

PCA vs. LDA Eigenfaces exploit the max scaier of the training images in face space Fisherfaces aiempt to maximise the between class sca<er, while minimising the within class sca<er. Lecture 17-48!

Basic intui2on: PCA vs. LDA Lecture 17-49!

Results: Eigenface vs. Fisherface (1) 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 17-50!

Eigenface vs. Fisherface (2) Lecture 17-51!

What we have learned today Introduc2on to face recogni2on Principal Component Analysis (PCA) The Eigenfaces Algorithm Linear Discriminant Analysis (LDA) Turk and Pentland, Eigenfaces for Recogni2on, Journal of Cogni-ve Neuroscience 3 (1): 71 86. P. Belhumeur, J. Hespanha, and D. Kriegman. "Eigenfaces vs. Fisherfaces: Recogni2on Using Class Specific Linear Projec2on". IEEE Transac-ons on pa7ern analysis and machine intelligence 19 (7): 711. 1997. Lecture 17-52!