Face recognition is used for to unlocking cell phones. And with recent advancements in deep learning,In this repository how to develop a face recognition system that can detect faces in images, identify the faces, and even modify faces with "digital makeup" like you've experienced in popular mobile apps
Step 1: Locate and extract faces from each image Step 2: Identify facial features in each image Step 3: Align faces to match pose template Step 4: Encode faces using a trained neural network Step 5: Check Euclidean distance between face encodings
Use of face recognition
- Identify verification’
- Automatically organizing new photo libraries by person.
- Tracking a specific person
- Counting unique people
- Finding people with similar appearances.
pip install pillow
pip install face-recognition
if you are using google Co-lab set to Run time to GUP
Histogram of Oriented Gradients (HOG)
Analyzing an Image as a Histogram of Oriented Gradients
Identify key pint on the face – tip of the nose , center of the eye
Identifying Face Landmarks with a Machine learning model
Calculate affine Transform
Finally -
measure each eye, size of the cheekbones and the width of mouth and so on
Here are two face , lets take three measurements for each face
i. Length of nose – 2.5 (left) | 2 (right)
ii. Width of mouth – 2.5 and 3
iii. Distance of one eye to other 4 and 3.5
That distance is relay small or close each other(two point) that may be a same person.
using face_encodings library - output 128 values
Face distance threshold – Set a face maximum distance that is still considered the same face . Lets assume the threshold value is 0.6.
- If the distance (a,b) > 0.6, not , match
- If the distance (a,b) =< 0.6, they match
- he lower the distance , the better the match
- How to drawaing a image (makeup)
- Choose best image from collection of images