Skip to content Skip to navigation

Connexions

You are here: Home » Content » Obtaining the Eigenface Basis

Navigation

Content Actions

  • Download module PDF
  • Add to ...
    Add the module to:
    • My Favorites
    • A lens
    • An external social bookmarking service
    • My Favorites (What is 'My Favorites'?)
      'My Favorites' is a special kind of lens which you can use to bookmark modules and collections directly in Connexions. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need a Connexions account to use 'My Favorites'.
    • A lens (What is a lens?)

      Definition of a lens

      Lenses

      A lens is a custom view of Connexions content. You can think of it as a fancy kind of list that will let you see Connexions through the eyes of organizations and people you trust.

      What is in a lens?

      Lens makers point to Connexions materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

      Who can create a lens?

      Any individual Connexions member, a community, or a respected organization.

    • External bookmarks
  • E-mail the authors

Lenses

What is a lens?

Definition of a lens

Lenses

A lens is a custom view of Connexions content. You can think of it as a fancy kind of list that will let you see Connexions through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to Connexions materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual Connexions member, a community, or a respected organization.

This content is ...

Affiliated with (What does "Affiliated with" mean?)

This content is either by members of the organizations listed or about topics related to the organizations listed. Click each link to see a list of all content affiliated with the organization.
  • Rice University ELEC 301 Projects

    This module is included inLens: Rice University ELEC 301 Project Lens
    By: Rice University ELEC 301As a part of collection:"ELEC 301 Projects Fall 2004"

    Click the "Rice University ELEC 301 Projects" link to see all content affiliated with them.

Recently Viewed

Obtaining the Eigenface Basis

Module by: Jon Krueger, Marshall Robinson, Doug Kochelek, Matthew Escarra

Summary: This page explains how to set up our face recognition system for detection. It is centered around the creation of the "eigenface" basis for "face space." It also discusses simplifying the eigenface basis to a level that is both managable and accurate.

Introduction to Eigenface System

The eigenface face recognition system can be divided into two main segments: creation of the eigenface basis and recognition, or detection, of a new face. The system follows the following general flow:

Figure 1: A robust detection system can yield correct matches when the person is feeling happy or sad.
Summary of Overall Face Recognition Process
Summary of Overall Face Recognition Process (workflow.jpg)

Deriving the Eigenface Basis

The eigenface technique is a powerful yet simple solution to the face recognition dilemma. In fact, it is really the most intuitive way to classify a face. As we have shown, old techniques focused on particular features of the face. The eigenface technique uses much more information by classifying faces based on general facial patterns. These patterns include, but are not limited to, the specific features of the face. By using more information, eigenface analysis is naturally more effective than feature-based face recognition.

Eigenfaces are fundamentally nothing more than basis vectors for real faces. This can be related directly to one of the most fundamental concepts in electrical engineering: Fourier analysis. Fourier analysis reveals that a sum of weighted sinusoids at differing frequencies can recompose a signal perfectly! In the same way, a sum of weighted eigenfaces can seamlessly reconstruct a specific person’s face.

Determining what these eigenfaces are is the crux of this technique.

Before finding the eigenfaces, we first need to collect a set of face images. These face images become our database of known faces. We will later determine whether or not an unknown face matches any of these known faces. All face images must be the same size (in pixels), and for our purposes, they must be grayscale, with values ranging from 0 to 255. Each face image is converted into a vector Γn Γn of length N (N=imagewidth*imageheight). The most useful face sets have multiple images per person. This sharply increases accuracy, due to the increased information available on each known individual. We will call our collection of faces “face space.” This space is of dimension N.

Figure 2
Example Images from the Rice Database
Example Images from the Rice Database (25rice.jpg)

Next we need to calculate the average face in face space. Here M is the number of faces in our set:

Ψ= 1 M n=1 M Γ n Ψ= 1 M n=1 M Γ n (1)

Figure 3
Average Face from Rice Database
Average Face from Rice Database (average.jpg)

We then compute each face’s difference from the average:

Φ i = Γ i Ψ Φ i = Γ i Ψ (2)

We use these differences to compute a covariance matrix (C) for our dataset. The covariance between two sets of data reveals how much the sets correlate.

C= 1 M n=1 M Φ n Φ n T = 1 M n=1 M ( var( p 1 ) cov( p 1 , p N ) cov( p N , p 1 ) var( p N ) ) n =A A T C= 1 M n=1 M Φ n Φ n T = 1 M n=1 M ( var( p 1 ) cov( p 1 , p N ) cov( p N , p 1 ) var( p N ) ) n =A A T (3)

Where A=[Φ1 Φ2...Φ M]A=[Φ1 Φ2...Φ M] and pipi = pixel i of face n.

The eigenfaces that we are looking for are simply the eigenvectors of C. However, since C is of dimension N (the number of pixels in our images), solving for the eigenfaces gets ugly very quickly. Eigenface face recognition would not be possible if we had to do this. This is where the magic behind the eigenface system happens.

Simplifying the Initial Eigenface Basis

Based on a statistical technique known as Principal Component Analysis (PCA), we can reduce the number of eigenvectors for our covariance matrix from N (the number of pixels in our image) to M (the number of images in our dataset). This is huge! In general, PCA is used to describe a large dimensional space with a relative small set of vectors. It is a popular technique for finding patterns in data of high dimension, and is used commonly in both face recognition and image compression.* PCA is applicable to face recognition because face images usually are very similar to each other (relative to images of non-faces) and clearly share the same general pattern and structure.

PCA tells us that since we have only M images, we have only M non-trivial eigenvectors. We can solve for these eigenvectors by taking the eigenvectors of a new M x M matrix:

L= A T A L= A T A (4)

Because of the following math trick:

A T A v i = μ i v i A A T A v i = μ i A v i A T A v i = μ i v i A A T A v i = μ i A v i

Where vivi is an eigenvector of L. From this simple proof we can see that A v i A v i is an eigenvector of C.

The M eigenvectors of L are finally used to form the M eigenvectors ul ul of C that form our eigenface basis:

u l = k=1 M v lk Φ k u l = k=1 M v lk Φ k (5)

It turns out that only M-k eigenfaces are actually needed to produce a complete basis for the face space, where k is the number of unique individuals in the set of known faces.

In the end, one can get a decent reconstruction of the image using only a few eigenfaces (M’), where M’ usually ranges anywhere from .1M to .2M. These correspond to the vectors with the highest eigenvalues and represent the most variance within face space.

Figure 4
Top Ten Eigenfaces from Rice Database
Top Ten Eigenfaces from Rice Database (10rice-eig.jpg)

These eigenfaces provide a small yet powerful basis for face space. Using only a weighted sum of these eigenfaces, it is possible to reconstruct each face in the dataset. Yet the main application of eigenfaces, face recognition, takes this one step further.

*For more information on Principal Component Analysis, check out this easy to follow tutorial.

Comments, questions, feedback, criticisms?

Send feedback