Approaches for implementing face recognition
In this section, we will be implementing the FR application. We are using the face_recognition
library. We have already configured the environment for that. We will be implementing the following approaches here:
The HOG-based approach
The CNN-based approach
Real-time face recognition
Now let's start coding!
Implementing the HOG-based approach
In this approach, we are using the HOG algorithm to find out two things: the total number of faces in the image, and the paces. We are using the API of the face_recgnition
library. You can find the code by clicking on the following GitHub link: https://github.com/jalajthanaki/Face_recognition/blob/master/face_detection_example.py. The code snippet is provided in the following diagram:
In the preceding diagram, we have given an image as input, and with the help of the API of the face_recognition
library, we can find the pixel location of the face in an...