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
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
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.
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)
- Clone the repository:
git clone https://github.com/hackerdud3/Face-Recognition-Eigenfaces.git
- 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";
- 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.
- Run the MATLAB script file (.m) from the MATLAB command line window:
>>EigenFaces
- 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.