/face_comparison

ML project -> comparison of two faces (images) - Face Verification

Primary LanguageJupyter Notebook

face_comparison

ML project -> comparison of two faces (images) - Face Verification

-----------------------------------------------------------------------------

Target of this project is to create Face Verification with input of two face images. Machine Learning predictive model is a Support Vector Machine model.

Training dataset (face dataset)

A training dataset of images of 100 perdon is the kaggle dataset: https://www.kaggle.com/frules11/pins-face-recognition

Openface library

Openface is library to detect faces at the image, create locatization of faces and get landmarks. Openface library : https://cmusatyalab.github.io/openface/

Files Description

model/align_faces.py

Script which create a second faces dataset where all of images from face_dataset are aligned.
Aligned face:
Using face landmark estimation invented in 2014 by Vahid Kazemi and Josephine Sullivan, warp each picture so that the eyes and lips are always in the sample place in the image. This algorithm spot 68 points on the each face and pose and center this landmark.

model/generate_embedings.py

Script which create a dataset of .csv files of each person with dataframe of all embedded images (col = image, values = embedded image)
Embeddings: Respresent image as a vector of 128 numbers

model/svm_model.ipynb

Jupyter notebook script to prepare training and testing dataset and create SVM classifier.
Model Accuracy : 95,6%
Script also save classifier to the .sav file (using pickle)

compare_faces.py

Script which use svm_model to predict input images (the same person - 1; different people - 0).
Process of preprocessing is : images -> align images -> images embedding -> model_prediction