Recognition Part II Ali Farhadi CSE 455.

Slides:



Advertisements
Similar presentations
Principal Component Analysis Based on L1-Norm Maximization Nojun Kwak IEEE Transactions on Pattern Analysis and Machine Intelligence, 2008.
Advertisements

Face Recognition Method of OpenCV
Computer Vision Spring ,-685 Instructor: S. Narasimhan Wean 5403 T-R 3:00pm – 4:20pm Lecture #20.
Principal Component Analysis CMPUT 466/551 Nilanjan Ray.
Face Recognition and Feature Subspaces
Dimensionality Reduction Chapter 3 (Duda et al.) – Section 3.8
© 2003 by Davi GeigerComputer Vision September 2003 L1.1 Face Recognition Recognized Person Face Recognition.
Data-driven Methods: Faces : Computational Photography Alexei Efros, CMU, Fall 2007 Portrait of Piotr Gibas © Joaquin Rosales Gomez.
Principal Component Analysis
CS 790Q Biometrics Face Recognition Using Dimensionality Reduction PCA and LDA M. Turk, A. Pentland, "Eigenfaces for Recognition", Journal of Cognitive.
Face detection and recognition Many slides adapted from K. Grauman and D. Lowe.
Eigenfaces As we discussed last time, we can reduce the computation by dimension reduction using PCA –Suppose we have a set of N images and there are c.
Face Recognition using PCA (Eigenfaces) and LDA (Fisherfaces)
Project 4 out today –help session today –photo session today Project 2 winners Announcements.
Face Recognition Jeremy Wyatt.
Computer Vision I Instructor: Prof. Ko Nishino. Today How do we recognize objects in images?
Face Collections : Rendering and Image Processing Alexei Efros.
Eigen Value Analysis in Pattern Recognition
Face Recognition: An Introduction
Project 2 due today Project 3 out today –help session today Announcements.
Understanding Faces Computational Photography
Face Detection and Recognition
Face Detection and Recognition Readings: Ch 8: Sec 4.4, Ch 14: Sec 4.4
CS 485/685 Computer Vision Face Recognition Using Principal Components Analysis (PCA) M. Turk, A. Pentland, "Eigenfaces for Recognition", Journal of Cognitive.
Dimensionality Reduction: Principal Components Analysis Optional Reading: Smith, A Tutorial on Principal Components Analysis (linked to class webpage)
Face Recognition and Feature Subspaces
Face Recognition and Feature Subspaces
Face Detection and Recognition Computational Photography Derek Hoiem, University of Illinois Lecture by Kevin Karsch 12/3/13 Chuck Close, self portrait.
Feature extraction 1.Introduction 2.T-test 3.Signal Noise Ratio (SNR) 4.Linear Correlation Coefficient (LCC) 5.Principle component analysis (PCA) 6.Linear.
1 Recognition by Appearance Appearance-based recognition is a competing paradigm to features and alignment. No features are extracted! Images are represented.
Face Recognition: An Introduction
PCA explained within the context of Face Recognition Berrin Yanikoglu FENS Computer Science & Engineering Sabancı University Updated Dec Some slides.
Using Support Vector Machines to Enhance the Performance of Bayesian Face Recognition IEEE Transaction on Information Forensics and Security Zhifeng Li,
Classification Course web page: vision.cis.udel.edu/~cv May 12, 2003  Lecture 33.
Face Recognition: An Introduction
CSE 185 Introduction to Computer Vision Face Recognition.
Data-driven Methods: Faces : Computational Photography Alexei Efros, CMU, Fall 2012 Portrait of Piotr Gibas © Joaquin Rosales Gomez.
Lecture 15: Eigenfaces CS6670: Computer Vision Noah Snavely.
Elements of Pattern Recognition CNS/EE Lecture 5 M. Weber P. Perona.
Dimensionality reduction
MACHINE LEARNING 7. Dimensionality Reduction. Dimensionality of input Based on E Alpaydın 2004 Introduction to Machine Learning © The MIT Press (V1.1)
CS 691B Computational Photography Instructor: Gianfranco Doretto Data Driven Methods: Faces.
Point Distribution Models Active Appearance Models Compilation based on: Dhruv Batra ECE CMU Tim Cootes Machester.
CS 2750: Machine Learning Dimensionality Reduction Prof. Adriana Kovashka University of Pittsburgh January 27, 2016.
2D-LDA: A statistical linear discriminant analysis for image matrix
Recognition Readings – C. Bishop, “Neural Networks for Pattern Recognition”, Oxford University Press, 1998, Chapter 1. – Szeliski, Chapter (eigenfaces)
Face Recognition and Feature Subspaces Devi Parikh Virginia Tech 11/05/15 Slides borrowed from Derek Hoiem, who borrowed some slides from Lana Lazebnik,
3D Face Recognition Using Range Images Literature Survey Joonsoo Lee 3/10/05.
Face detection and recognition Many slides adapted from K. Grauman and D. Lowe.
Face Detection and Recognition Readings: Ch 8: Sec 4.4, Ch 14: Sec 4.4
University of Ioannina
Recognition with Expression Variations
Lecture 8:Eigenfaces and Shared Features
CS 2750: Machine Learning Dimensionality Reduction
Face Recognition and Feature Subspaces
Recognition: Face Recognition
Data-driven Methods: Faces
Announcements Project 1 artifact winners
Outline Peter N. Belhumeur, Joao P. Hespanha, and David J. Kriegman, “Eigenfaces vs. Fisherfaces: Recognition Using Class Specific Linear Projection,”
In summary C1={skin} C2={~skin} Given x=[R,G,B], is it skin or ~skin?
Computational Photography
CS4670: Intro to Computer Vision
CS4670: Intro to Computer Vision
Announcements Project 2 artifacts Project 3 due Thursday night
Announcements Project 4 out today Project 2 winners help session today
Where are we? We have covered: Project 1b was due today
Announcements Artifact due Thursday
Face/Flesh Detection and Face Recognition
Announcements Artifact due Thursday
The “Margaret Thatcher Illusion”, by Peter Thompson
Presentation transcript:

Recognition Part II Ali Farhadi CSE 455

Face recognition: once you’ve detected and cropped a face, try to recognize it Detection Recognition “Sally”

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) Project into a new subspace (or kernel space) (e.g., “Eigenfaces”=PCA) Measure face features

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”

What makes face recognition hard? Expression

What makes face recognition hard? Lighting

What makes face recognition hard? Occlusion

What makes face recognition hard? Viewpoint

Simple idea for face recognition Treat face image as a vector of intensities Recognize face by nearest neighbor in database

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

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

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

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

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

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

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?

Visualization of eigenfaces Principal component (eigenvector) uk μ + 3σkuk μ – 3σkuk

Projecting onto the eigenfaces The eigenfaces v1, ..., vK span the space of faces A face is converted to eigenface coordinates by

Recognition with eigenfaces Algorithm Process the image database (set of images with labels) Run PCA—compute eigenfaces Calculate the K coefficients for each image Given a new image (to be recognized) x, calculate K coefficients Detect if x is a face If it is a face, who is it? Find closest labeled face in database nearest-neighbor in K-dimensional space

Choosing the dimension K NM i = 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

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

Representation and reconstruction Face x in “face space” coordinates: Reconstruction: = = + ^ x = µ + w1u1+w2u2+w3u3+w4u4+ …

Reconstruction P = 4 P = 200 P = 400 After computing eigenfaces using 400 face images from ORL face database

Eigenvalues (variance along eigenvectors)

Note Preserving variance (minimizing MSE) does not necessarily lead to qualitatively good reconstruction. P = 200

Recognition with eigenfaces Process 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) = (u1T(xi – µ), … , ukT(xi – µ)) Given novel image x Project onto subspace: (w1,…,wk) = (u1T(x – µ), … , ukT(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

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?

Enhancing gender more same original androgynous more opposite D. Rowland and D. Perrett, “Manipulating Facial Appearance through Shape and Color,” IEEE CG&A, September 1995 Slide credit: A. Efros

Changing age Face becomes “rounder” and “more textured” and “grayer” original shape color both D. Rowland and D. Perrett, “Manipulating Facial Appearance through Shape and Color,” IEEE CG&A, September 1995 Slide credit: A. Efros

Which face is more attractive? http://www.beautycheck.de

Which face is more attractive? right left

Which face is more attractive? 0.5(attractive + average) attractive

Which face is more attractive? http://www.beautycheck.de

Which face is more attractive? right left

Which face is more attractive? 0.5(adult+child) adult

Question Would PCA on image pixels work well as a general compression technique? P = 200

Limitations The direction of maximum variance is not always good for classification

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

Illustration of the Projection Using two classes as example: x2 x2 x1 x1 Poor Projection Good

Comparing with PCA

Variables N Sample images: c classes: Average of each class: Average of all data:

Scatter Matrices Scatter of class i: Within class scatter: Between class scatter:

Illustration x2 Within class scatter x1 Between class scatter

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

Illustration x2 x1

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 Note: x in step 2 refers to PCA coef; x in step 4 refers to original data

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 Reference: Eigenfaces vs. Fisherfaces, Belheumer et al., PAMI 1997

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

1. Identify a Specific Instance Frontal faces 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) Project into a new subspace (or kernel space) (e.g., “Eigenfaces”=PCA) Measure face features Make 3d face model, compare shape+appearance (e.g., AAM)

Large scale comparison of methods FRVT 2006 Report

FVRT Challenge Frontal faces FVRT2006 evaluation False Rejection Rate at False Acceptance Rate = 0.001

FVRT Challenge Frontal faces FVRT2006 evaluation: controlled illumination

FVRT Challenge Frontal faces FVRT2006 evaluation: uncontrolled illumination

FVRT Challenge Frontal faces FVRT2006 evaluation: computers win!

Face recognition by humans Face recognition by humans: 20 results (2005) Slides by Jianchao Yang

Result 17: Vision progresses from piecemeal to holistic

Things to remember 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 room for improvement in general conditions