A facial recognition is a technology capable of identifying or verifying a person from a digital image or a video frame from a video source. There are multiple methods in which facial recognition systems work, but in general, they work by comparing selected facial features from given image with faces within a database.
There are two phases in such a system: Face Detection followed by Face Recognition. Initially, the faces are detected using a Haar Cascade Classifier on an image in conjunction with the cropping of the cardinal section of the face.
A geometric face model is formed with the detection of eyes performed using the Haar Cascade Classifier, while nose detection has been used as a reaffirmation mechanism along with the eyes. Later, HOG (Histogram of Oriented Gradients) features are extracted from large numbers of facial images to be used as part of the recognition mechanism. These HOG features are then labeled together for a face/user and a Support Vector Machine (SVM) model is trained to predict faces that are fed into the system.
Face recognition requires samples to be collected, identified, extracted with necessary (features) information, and stored for recognition. The entire face recognition solution is divided into following major modules:
- Face Capture
- Face Train
- Face Recognition
Face Detection is the fundamental step in any of the operations carried out in the face recognition process. The Haar Feature-based Cascade Classifier is a widely used mechanism for detecting faces. In order to train a classifier to detect faces, two large sets of images are formed, with one set containing images with faces, and the other set without. These images are then used to generate classifier models. The classifier is generated by extracting Haar features from the positive and negative images.
Face Capture
The very first step in face recognition is to collect face samples. This is carried out in three basic steps as follows:
- Detect the face.
- Crop the cardinal section of the face.
- Save the face image.
Face Train
In this stage, features from images associated with each person are gathered. Later, a complete set of information from all of the stored images, isolated per person as a single SVM label, is trained to generate an SVM model.
Face Recognition
The recognition of a face in a video sequence is split into three primary tasks: Face Detection, Face Prediction, and Face Tracking. The tasks performed in the Face Capture program are performed during face recognition as well. To recognize the face obtained, a vector of HOG features of the face is extracted. This vector is then used in the SVM model to determine a matching score for the input vector with each of the labels. The SVM returns the label with the maximum score, which represents the confidence to the closest match within the trained face data.