Skip to content

hackerdud3/Face-Recognition-Eigenfaces

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Face Recognition System using Eigenfaces

A face recognition system using algorithm called Eigenface and a benchmarking system to evaluate how accurate the system is in recognizing the faces according to the given dataset

Features

This system can detect faces by treating the face recognition problem as a 2-D recognition problem. We project the set images into a face space known as eigenfaces. Eigenfaces is an algorithm that uses principal component analysis (PCA) to analyze face images and identify patterns (based on ears, eyes, mouth, nose) that represents a face. I also plotted cummulative distribution between the eigenvalues and eigenvectors. There are mainly 3 components in this system

  • Image I/O and Visualization

  • PCA for training

  • Recognition by Nearest Neighbor classification.

MATLAB Usage

I used MATLAB for implementing the face recognition model, training, and testing. MATLAB is a high-level programming language and environment for numerical computation, visualization, and programming. Learn more about MATLAB from the official MATLAB website.

Example Dataset

I considered 32 X 32 8bit images (Nx by Ny) (.TIF files) There are 3 Folders

  • [FA](Image dataset for Training)
  • [FB](Image dataset for testing)
  • [ALL](FA + FB)

Installation

  1. Clone the repository:
    git clone https://github.com/hackerdud3/Face-Recognition-Eigenfaces.git
    
  2. Change the folder path for ALL, training dataset(FA), and testing dataset(FB):
    % Path to training set
    path = "\ALL";
    % Construct DB from this dataset
    path = "\FA";
    % Path to testing set
    path = "\FB";
    
  3. Manually change the K value for selecting the top K eigenvectors:
    %top K eigenvectors 
    k = 10

Try testing out the accuracy with different inputs of K values.

  1. Run the MATLAB script file (.m) from the MATLAB command line window:
    >>EigenFaces
    

Snapshots

Accurate matches

Screenshot 2024-03-13 203120 Screenshot 2024-03-13 202934 Screenshot 2024-03-13 202917 Screenshot 2024-03-13 202831 Screenshot 2024-03-13 202814 Screenshot 2024-03-13 202750

Inaccurate matches

mismatch2 mismatch1 Screenshot 2024-03-13 203558

Plot

Screenshot 2024-03-13 204431

Accuracy

  • Total number of correct matches: 17
  • Total number of incorrect matches: 6
  • Accuracy : 73.9130

The accuracy depends on various parameters including value of K, set of training images, and dimensions of the images (Nx by Ny), which is resolution. I considered 32 x 32 images here and small training se. We can probably improve accuracy if we included more datasets for training and considered images with more dimensions.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages