Real Time Face Recognition of Human Faces by using LBPH and Viola Jones Algorithm

In our social life face is the primitive center for consideration, which plays a vital task for identification and an emotion. Live Face Recognition has attained enormously consideration in security systems, due to its non intrusiveness, accurate and fast results etc. Real time human Face recognition executes in two levels, such as Face detection and Face recognition. For face detection we are using viola-jones algorithm because of its high precision and high real time permit rate which is deployed in opencv by python language. In Face recognition two categories are considered: training phase and evaluation phase. In training phase, the algorithm is trained with the samples of the image to be learned and In estimation phase, the test image is compared among all the trained samples in the dataset. The facial features is extracted with the detected faces from live stream by Local Binary Patterns Histogram (LBPH). By using the LBPH, face recognition is finished using Euclidean distance classifier. The Experimental results getting after implementations and testing is of accuracy 85%-95%. Keywords— LBPH, Viola Jones, Euclidean Distance, OpenCV, Webcam


I. INTRODUCTION
Face recognition has become a widespread topic of study in recent times since rise in plea designed for security along with the swift development of mobile devices. Face recognition is efficient to various applications such as entrance control, personality authentication, security systems, surveillance systems unlocking of smart phones and social media networks etc. Entrance control includes offices, computers, phones, ATMs, etc. Most of these practices at present do not use face recognition as the standard form of conceding entry, but with advanced technologies in computers along with suitable algorithms, facial recognition is achieving more consideration in replacing passwords and fingerprint scanners.
Ever since the event of 9/11 there has a more apprehensive importance on developing security systems to make sure the safety of citizens, specifically in places such as airports, companies, border crossings where identification and verification is essential. Face recognition systems potentially has the skill to alleviate the risk and eventually avert future attacks from occurring [1].
Surveillance cameras with face recognition capacity can support in efforts of finding these individuals.
Alternatively, these surveillance systems will also assist to identify the locations of lost persons, even though this is reliant on robust facial recognition algorithms with a fully developed database of faces. And finally, facial recognition has raised in social media applications on platforms which is Face book which suggest users to tag friends who have been identified in images. It is clear that, there are numerous applications for facial recognition systems [2].
In this paper face recognition for human faces are employed through Viola Jones algorithm for face identification , LBPH in favor of feature extraction , Euclidean distance classifier is for face recognition. In general the steps employed to achieve this are the following: creating a dataset, face acquisition, feature extraction, and finally classification. The entire work is done in opencv using python.

II. RELATED WORK
Nawaf Hazim Barnouti [3] in the year 2016 proposed an automatic face recognition system based on exterior-based methods.Viola-Jones method is used to detect and gather faces in each database. Square Euclidean Distance is used to determine the distance between two images, which leads to find image similarity.
Ningthoujam Sunita Devi [4] presented a methodology for face recognition based on information theory approach of coding and decoding the face image. Proposed methodology is combination of two stages -Feature extraction using principle component analysis and recognition using the feed forward back propagation Neural Network. The proposed method has been tested on Oracle Research Laboratory (ORL) face database containing 400 images.
The major problem of face recognition is large variability of recorded images due to pose, illumination conditions, facial expressions, use of cosmetics, different hairstyles, presence of glasses, beard etc. algorithm is used to examine the sub-window which is capable of detecting the faces from a given input image. The proposed model deploys in two phases such as enrollment and testing. Each phase encounters face acquisition, preprocessing, feature extraction. After enrollment and testing phases a classifier is worn to organize whether the test image and dataset image are matching. The standard image processing advance probable to rescale the input image to unusual sizes and afterward run the fixed size detector during these images. This access turns exposed to be relatively time consuming caused by the calculation of diverse size images [5].

Flow chart
Fig 2 represents the proposed face recognition flow chart , first we create the datset using the webcam or camera attached to the computer,then face detection using Viola-Jones algorithm, feature extraction by using Local Binary Pattern Histogram (LBPH) and then the classification using the machine learning algorithm. Our entire simulation is done by using PYTHON Programming in ANACONDA NAVIGATOR Tool.

Creating the dataset
The datasets are created using the webcam or the camera attached to the computer. We take the 100 samples per person and store it in the dataset. We can store the innumerable person's samples. We will give one id number to each person in the dataset [6].

Face detection
The next step is the face detection .  We use the two rectangle Haar like feature. Some properties common to human faces are: 1. The eye region is darker than the upper-cheeks. 2. The nose bridge region is brighter than the eyes.

Composition of properties forming match able facial features:
 Location and size: eyes, mouth, bridge of nose  Value: oriented gradients of pixel intensities We take the image and convert it into 24X24 window and smear each Haar feature to that window pixel by pixel. Each feature is related to a specific location in the subwindow. The value is calculated by applying Haar features is Value = Σ (pixels in black area) -Σ (pixels in white area)

ii. Integral images
The second step of the Viola-Jones face detection algorithm is to convert an input image into an integral image is shown in fig 4. The integral image at the location (x,y) contains the sum of the pixels to the above and to the left of (x ,y) [7]. This makes the calculation of the addition to the entire pixels within any specified rectangle using only four values. In the integral image, these values are the pixels that resemble with the edges of the rectangle in the input image.

iii. Adaboost machine learning method
Viola-jones algorithm [5] uses a 24X24 window as the base window size to evaluate all the features in an image. It will results in a 160,000+ features, all the features are not important to us. So we eliminate the features which are not important.
Adaboost is a machine learning algorithm which helps in umpiring only the most outstanding features from 160,000+ features. After these features forms a weighted arrangement of all the features which are used in gaging and deciding any given window has face or not. These features are called weak classifiers [8].

iv. Face Detection
The cascading classifier is an assembly of stages that contains a strong classifier. The work of this stage is to combine the weak classifiers and extraction is shown in fig  5. input image detected face extracted face

Feature Extraction
From the detected face, we extract the features by using Local Binary Pattern Histohram(LBPH) is shown cmpletely in fig 6.The LBPH feature vector, is computed which is given below:  Divide the examined window into cells (e.g. 8x8 pixels for each cell).  For each pixel in a cell keeping center pixel value as the reference, compare the pixel to each of its 8 neighbors (on its left-top, left-middle, left-bottom, right top, etc.).  when the center pixel's value is greater than the neighbor's value, assign "1". Otherwise, assign "0". This gives an 8-digit binary number (which is usually converted to decimal).  Compute the histogram, over the cell, of the frequency of each "number" occurring (i.e., each combination of which pixels are smaller and which are greater than the center) [9].

Classification (Face Recognition)
The extracted features are fed to the classifier. For classification we use the K-nearest neighbor classifier. The simplest K-nearest neighbor classifier is the Euclidean distance classifier. The Euclidean distance is calculated by comparing the test image features with features stored in the dataset. The minimum distance value between the t.est image feature value and feature values stored in the dataset gives the recognition rate [10].

IV. RESULTS AND DISCUSSION
While creating the dataset, we assign id number to each person along with his/her name. During recognition, if the test person is found in the dataset the classifier classifies shows the name of the person along with the recognition rate , if the test person is not found in the dataset, the classifier shows as an unknown person which is depicted in fig 7 & 8. The feature extraction by using the LBPH , the different illuminations of faces are captured in a certain time period [11] .   Fig 9: A detected image, LBP image, Histogram. Fig 9 shows detected image though a full picture, later in training stage the detected image is converted into gray then system generates histogram which is easy to calculate by through this method [12]. From this proposed system the results are of accuracy 85%-95% recognition rate even under the different conditions like illumination, background, rotation, different poses, presence of beard or glasses etc. From the above figure 10 a)which represents the chart to deploy recognition rate Vs number of persons for performance analysis and b), it is clear that the proposed LBP algorithm gave better results and confidence compared to other algorithms. Although other algorithms will not give accurate measures and confidence, so we have chosen the LBP algorithm [13].

IV. CONCLUSION AND FUTURE SCOPE
In this project face detection is carried out by using Viola-Jones face detection algorithm, feature extraction by using Local Binary Patterns Histograms and classification by using Euclidean distance classifier. The proposed system is implemented using Opencv and anaconda. From the above graphs I can conclude that LBPH and Euclidean distance has better recognition rate. The results achieving for this methods is of accuracy 85%-95%.
On the base of analysis carried out in the present examine, the following suggestions are accessible for further research and it is valuable to concentrate on the following issues in future work. The proposed system is modified to support in all the conditions such as brightness, wearing goggles, beard, in case of twins by minimum distance classifier. The proposed method is tailored in the evolution of genetic properties for facial expressions is studied for different security metrics is helpful in securing government confidential databases and criminal detection.