Face recognition algorithm that follows the observations from the research paper Face Recognition Using Eigenfaces to build a face space and find the projections of the train and test faces.
An eigenface is the name given to a set of eigenvectors when used in the computer vision problem of human face recognition. The approach of using eigenfaces for recognition was developed by Sirovich and Kirby and used by Matthew Turk and Alex Pentland in face classification. The eigenvectors are derived from the covariance matrix of the probability distribution over the high-dimensional vector space of face images.
In this repo, I reimplement the first face recognition algorithm from scratch to better understand the core concept behind eigenvectors and eigenfaces. I tried to keep the code well-organised and clean to make it helpful for others interested in the implementation of this paper.
Want to play with these notebooks online without having to install anything? Use any of the following services.
WARNING: Please be aware that these services provide temporary environments: anything you do will be deleted after a while, so make sure you download any data you care about.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
In order to locally run the repo you should have the following:
If you want to run the code on your local machine, you need to follow the next steps.
- First you need to create a conda environment with the following command:
conda create --name eigenfaces --file requirements.txt python=3.10
- Secondly, you need to activate the environment:
conda activate eigenfaces
- Open in the editor of your choice the notebook eigenfaces from the folder src/notebooks
- Jupyter Notebook - web application for creating and sharing computational documents
- Visual Studio Code - code editor
- Python - programming language
- The papers studied in order to implement the model are:
- Turk, Matthew & Pentland, A.P.. (1991). Face Recognition Using Eigenfaces. Proceedings IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR). 586 - 591. 10.1109/CVPR.1991.139758.
- Pentland, Moghaddam and Starner, "View-based and modular eigenspaces for face recognition," 1994 Proceedings of IEEE Conference on Computer Vision and Pattern Recognition, Seattle, WA, USA, 1994, pp. 84-91, doi: 10.1109/CVPR.1994.323814.
- @gabriel-rusu - Idea & Initial work