Practical Implementation of Principle Component Analysis to identify faces.
- Description
- Requirements
- Installation
- Directory Structure
- Usage
- Credits
To recognize human faces, one needs to extract the relevant information in a face image, encode it as effectively as possible. Then it has to be compared with models stored in the database. In Principle Component Analysis (PCA), the variation in a collection of face images, independent of any judgment of features is captured. Hence, in PCA we are finding the direction where the variance is maximum.
PCA is an unsupervised dimentionality reduction algorithm. The goal is to preserve as much as necessary information and also maintain low number of variables..
- Python 3
- Numpy
- Sci-kit Learn
- Pandas
- Matplotlib
- Jupyter Notebook
- Python
Step 1: Visit and download Python from https://www.python.org/downloads/ Step 2: Install and add Python to path
- Numpy
In command prompt
pip install numpy
- Sci-kit Learn
In command prompt
pip install sklearn
- Pandas
In command prompt
pip install pandas
- Matplotlib
In command prompt
pip install matplotlib
- Jupyter
In command prompt
pip install jupyterlab
For conda users
conda install -c conda-forge jupyterlab
To start Jupyter type
jupyter notebook
.
├── src # Source files
│ ├── s1
│ │ ├── 1.pgm
│ │ ├── ...
│ │ ├── 10.pgm
│ ├── s2
│ ├── ...
│ ├── s40
│ ├── pca_face_recognition.ipynb # Jupyter Notebook
│ ├── barbara.pgm
├── LICENSE
└── README.md
Open src/pca_face_recognition.ipynb in Jupyter. After running, you will observe the performance of PCA in identifying faces through the classification accuracy curve.
Ajay Biswas