Face Recognition. Lecture-14

Similar documents
Face Recognition. Lecture-14

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

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

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

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

Regularized Discriminant Analysis and Reduced-Rank LDA

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

Image Analysis & Retrieval. Lec 14. Eigenface and Fisherface

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

Introduction to Machine Learning

Principal Component Analysis and Linear Discriminant Analysis

1 Principal Components Analysis

Lecture: Face Recognition

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

Image Analysis & Retrieval Lec 14 - Eigenface & Fisherface

Statistical Pattern Recognition

Eigenfaces. Face Recognition Using Principal Components Analysis

Image Analysis. PCA and Eigenfaces

Example: Face Detection

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

Machine Learning 11. week

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

ROBERTO BATTITI, MAURO BRUNATO. The LION Way: Machine Learning plus Intelligent Optimization. LIONlab, University of Trento, Italy, Apr 2015

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

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

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

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

Face Detection and Recognition

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

Fisher Linear Discriminant Analysis

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

1 A factor can be considered to be an underlying latent variable: (a) on which people differ. (b) that is explained by unknown variables

Lecture 13 Visual recognition

Motivating the Covariance Matrix

Announcements (repeat) Principal Components Analysis

Principal Component Analysis

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

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

Introduction to Computer Vision

Heeyoul (Henry) Choi. Dept. of Computer Science Texas A&M University

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

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

A Tutorial on Data Reduction. Principal Component Analysis Theoretical Discussion. By Shireen Elhabian and Aly Farag

Exercises * on Principal Component Analysis

Machine Learning 2nd Edition

PCA and LDA. Man-Wai MAK

Principal Component Analysis (PCA)

What is Principal Component Analysis?

Lecture Notes 1: Vector spaces

MATH 20F: LINEAR ALGEBRA LECTURE B00 (T. KEMP)

Problem # Max points possible Actual score Total 120

PCA FACE RECOGNITION

ECE 661: Homework 10 Fall 2014

Linear Dimensionality Reduction

STA 414/2104: Lecture 8

CSE 554 Lecture 7: Alignment

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

Principal Component Analysis

18.S096 Problem Set 7 Fall 2013 Factor Models Due Date: 11/14/2013. [ ] variance: E[X] =, and Cov[X] = Σ = =

Unsupervised Learning

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

Principal Components Analysis (PCA)

Discriminant analysis and supervised classification

Statistical Machine Learning

L11: Pattern recognition principles

Subspace Methods for Visual Learning and Recognition

Principle Components Analysis (PCA) Relationship Between a Linear Combination of Variables and Axes Rotation for PCA

Clusters. Unsupervised Learning. Luc Anselin. Copyright 2017 by Luc Anselin, All Rights Reserved

PCA and LDA. Man-Wai MAK

7. Variable extraction and dimensionality reduction

Lecture: Face Recognition and Feature Reduction

Principal Component Analysis (PCA)

Covariance and Correlation Matrix

Vectors To begin, let us describe an element of the state space as a point with numerical coordinates, that is x 1. x 2. x =

Deriving Principal Component Analysis (PCA)

STA 414/2104: Lecture 8

Uncorrelated Multilinear Principal Component Analysis through Successive Variance Maximization

Face Recognition and Biometric Systems

Mathematical foundations - linear algebra

CITS 4402 Computer Vision

Enhanced Fisher Linear Discriminant Models for Face Recognition

Principal Component Analysis

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

DATA MINING LECTURE 8. Dimensionality Reduction PCA -- SVD

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

Eigenface-based facial recognition

PRINCIPAL COMPONENT ANALYSIS

Lecture: Face Recognition and Feature Reduction

Principal Component Analysis

CSC 411 Lecture 12: Principal Component Analysis

Advanced Introduction to Machine Learning CMU-10715

Clustering VS Classification

Learning with Singular Vectors

Face Recognition. Lauren Barker

CS 340 Lec. 6: Linear Dimensionality Reduction

PCA, Kernel PCA, ICA

Pattern Recognition 2

Spectral Methods for Subgraph Detection

PCA and admixture models

PCA Review. CS 510 February 25 th, 2013

Transcription:

Face Recognition Lecture-14

Face Recognition

imple Approach Recognize faces (mug shots) using gray levels (appearance). Each image is mapped to a long vector of gray levels. everal views of each person are collected in the database during training. During recognition a vector corresponding to an unknown face is compared with all vectors in the database. The face from database, which is closest to the unknown face is declared as a recognized face.

Problems and olution Problems : Dimensionality of each face vector will be very large (250,000 for a 512X512 image!) Raw gray levels are sensitive to noise, and lighting conditions. olution: Reduce dimensionality of face space by finding principal components (eigen vectors) to span the face space Only a few most significant eigen vectors can be used to represent a face, thus reducing the dimensionality

Eigen Vectors and Eigen Values The eigen vector, x, of a matrix A is a special vector, with the following property here is called eigen value To find eigen values of a matrix A first find the roots of: Then solve the following linear system for each eigen value to find corresponding eigen vector

Example Eigen Values Eigen Vectors

Eigen Values

Eigen Vectors

Face Recognition Collect all gray levels in a long vector u: Collect n samples (views) of each of p persons in matrix A (MN X pn): Form a correlation matrix L (MN X MN): Compute eigen vectors,, of L, which form a bases for whole face space

Face Recognition Each face, u, can now be represented as a linear combination of eigen vectors Eigen vectors for a symmetric matrix are orthonormal:

Therefore: Face Recognition

Face Recognition L is a large matrix, computing eigen vectors of a large matrix is time consuming. Therefore compute eigen vectors of a smaller matrix, C: Let be eigen vectors of C, then are the eigen vectors of L:

Training Create A matrix from training images Compute C matrix from A. Compute eigenvectors of C. Compute eigenvectors of L from eigenvectors of C. elect few most significant eigenvectors of L for face recognition. Compute coefficient vectors corresponding to each training image. For each person, coefficients will form a cluster, compute the mean of cluster.

Recognition Create a vector u for the image to be recognized. Compute coefficient vector for this u. Decide which person this image belongs to, based on the distance from the cluster mean for each person.

load faces.mat C=A *A; [vectorc,valuec]=eig(c); ss=diag(valuec); [ss,iii]=sort(-ss); vectorc=vectorc(:,iii); vectorl=a*vectorc(:,1:5); Coeff=A *vectorl; for i=1:30 model(i, :)=mean(coeff((5*(i-1)+1):5*i,:)); end while (1) imagename=input( Enter the filename of the image to Recognize(0 stop): ); if (imagename <1) break; end; imageco=a(:,imagename) *vectorl; disp ( ); disp ( The coefficients for this image are: );

mess1=sprintf( %.2f %.2f %.2f %.2f %.2f, imageco(1),imageco(2),imageco(3),imageco(4), imageco(5)); disp(mess1); top=1; for I=2:30 if (norm(model(i,:)-imageco,1)<norm(model (top, : )-imageco,1)) top=i end end mess1=sprintf( The image input was a image of person number %d,top); disp(mess1); end

14.2 Face Recognition zeliski s book 17

Kirby and irovich (1990) Face image can be compressed: ~ x m M 1 i0 a i u i (c) PCA Reconstruction (85 bytes) (d) JPEG Reconstruction (530 bytes) 18

catter or Co variance matrix: 1 C ( x j m)( x j m) N T Eigen Decomposition: C UU Any arbitrary vector x can be represented: ~ x m M 1 i0 a i u i The distance of a projected face DIF (Distance in face space) DIF ~ x m M 1 2 a i i0 T 1 N N 1 j0 u u i i T j a ( x m). i u i The distance between two faces 19 DIF ~ x ~ y M 1 i0 ( a i b i ) 2

e are not utilizing the eigen value information, compute Mahalonobis distance DIF ~ x m C 1 M 1 i0 a 2 i 2 i Pre scale the eigen vectors by eigenvalues: ˆ 1/ 2 U U Euclidean Mahalonobis 20

Problems in Face Recognition ithin class variation Between class variation 21

Images Taken under Different Illuminations Note the wide range of illumination variation, which can be more dramatic than inter-personal variations 22

LDA (Linear Discriminative Analysis) Fisher Faces lides credit: http://courses.cs.tamu.edu/rgutier/cs790_w02/l6.pdf 23

LDA N N 1 2 : Class -1 : Class - 2 Project X onto a line 24

Find a measure of separation? Distance between projected means It is not a good measure, since it does not consider standard deviation within a class 25

Maximize a function that represents the difference between the means normalized by a measure of the within-class scatter How to find optimum? 26

Find catter Matrices catter Matrices for the projection 27

Find Optimum 28 0 )] ( [ d d J d d T B T 0 ) ( )2 ( )2 ( )] ( [ 2 J d d T B T B T 0 ) ( )2 ( )2 ( )] ( [ J d d T B T B T 0 ) ( ) ( ) ( ) ( )] ( [ J d d T B T B T T 0 )] ( [ J J d d B 0 )] ( [ 1 J J d d B J B 1 Eigen Value problem

Example 29

30

31

32

33

34

35 0.375 0.183 0 6.125 N B 0.457 0.183 0.183 0.246 3N 0.379 0.926 u 0.3889 4.715 0.289 11.796 1 N B

Linear Discriminant Analysis

Linear Discriminant Analysis (LDA) GOAL: Perform dimensionality reduction while preserving class discriminatory information LDA maximizes distance (difference) between the means, normalized by measure of within class scatter Project sample x onto line to obtain scalar y

Linear Discriminant Analysis (LDA) GOAL: Perform dimensionality reduction while preserving class discriminatory information LDA maximizes distance (difference) between the means, normalized by measure of within class scatter (variance) Maximize Between (Inter) Class Minimize ithin (Intra) Class

LDA Explained ithin Class catter Between Class catter

LDA Explained Equivalent to Generalized Eigenvalue Problem Like with PCA, the result is a set of projection vectors

PCA vs. LDA PCA queezes variance into as few dimensions as possible Number of linear functions equal to number of original variables (dimensions) Principal components always orthogonal ( uncorrelated ) LDA Maximizes class discrimination Number of linear functions equal to number of classes LDA s linear scores are not necessarily orthogonal

Failure Case for PCA Green: PCA Orange: LDA hat this graph illustrates that PCA would project the data to the green vector, where the blue and red class would be jumbled up. However, LDA would project to the orange line, where the clusters are maintained.

ources http://matlabdatamining.blogspot.com/2010/ 12/linear discriminant analysis lda.html http://research.cs.tamu.edu/prism/lectures/p r/pr_l10.pdf Richard zeleski, Computer Vision: Algorithms and Applications.