Fast and accurate face recognition system using MORSCMs-LBP on embedded circuits

Because of the current COVID-19 circumstances in the world and the tremendous technological developments, it has become necessary to use this technology to combat the spread of the new coronavirus. The systems that depend on using hands, such as fingerprint systems and PINs in ATM systems, could lead to infection, so they have become undesirable and we can replace them by using facial recognition instead. With the development of technology and the availability of nano devices like the Raspberry Pi, such applications can be implemented easily. This study presents an efficient face recognition system in which the face image is taken by a standalone camera and then passed to the Raspberry Pi to extract the face features and then compare them with the database. This approach is named MORSCMs-LBP by combining two algorithms for feature extraction: Local Binary Pattern (LBP) as a local feature descriptor and radial substituted Chebyshev moments (MORSCMs) as a global feature descriptor. The significant advantage of this method is that it combines the local and global features into a single feature vector from the detected faces. The proposed approach MORSCMs-LBP has been implemented on the Raspberry Pi 4 computer model B with 1 GB of RAM using C++ OpenCV. We assessed our method on various benchmark datasets: face95 with an accuracy of 99.0278%, face96 with an accuracy of 99.4375%, and grimace with 100% accuracy. We evaluated the proposed MORSCMs-LBP technique against other recently published approaches; the comparison shows a significant improvement in favour of the proposed approach.


INTRODUCTION
Since the beginning of creation, people have been recognized by their faces, and over time, there has been a significant breakthrough in the realm of technology, resulting in the construction of a smart society. Face recognition is considered the most challenging pattern recognition application because some conditions can affect the face image, such as illumination, scaling, occlusion, and other factors. It has attracted significant attention because it can identify and verify a person in a digital photo or video frame. Face recognition has been used in many fields, such as helping police find suspects and missing including masked-face detection (SivaKumar et al., 2021), detecting drowsy drivers (Rajendran et al., 2021;Fatima et al., 2020), and many other applications.
Orthogonal moment (OMs) for color images is a widespread topic. A novel color face recognition method called multi-channel orthogonal fractional-order moment proposed by Hosny, Abd Elaziz & Darwish (2021), and this method proved its efficiency, invariance to transformation, and robustness to noise. Orthogonal moments proved its efficiency in various pattern recognition applications such as color image watermark (Darwish, Hosny & Kamal, 2020),  proposed color face recognition technique based on Zernike quaternion moment vector and using quaternion vector moment (QVM) similarity distance to enhance accuracy, and the experiment proved its superiority on all other techniques. Abdelmajid et al. introduced a face recognition system based on quaternion moment and deep neural network (DNN), it is computationally low cost and also accurate (Alami et al., 2019). Hosny (2019) proposed another method for face recognition using exact Gaussian-hermit moments and it could overcome geometric distortions.
The rest of this paper is arranged as follows: materials and methods, then experimental results and discussion and finally conclusion.

Chebyshev rational moments for gray level images
The Chebyshev OMs computations were illustrated by Guo et al. (2017) as: MORSCMs was derived by Guo et al. (2017), For a color image, the multi-channel moments are a set OMs of each color channel, so the =MORSCMs= for the (R, G, and B) channels are as: where m, n are non-negative integers for order and repetition, ἱ = p À 1, the equation of weight function, Wi (r) is: The Rm (r) is the Chebyshev rational polynomials defined as: where a mk defined as: The orthogonality condition of Chebyshev rational moments can be expressed by multiplying polynomials R m r ð Þ, R n r ð Þ and W (r) over the interval [0,1Þ as: and x m p 2 is the normalization constant.
B. Multi-channel radial substituted Chebyshev moments. This method was introduced by Hosny (2019), where Rm (r) is replaced with R m ( _ r) r ¼r 1 þr and dr ! dr ð1 ÀrÞ 2 and radial substituted Chebyshev moment function R m ( _ r) defined as: for m ! 1 And by using recurrence relation R mðrÞ is defined as: R m þ 1ðrÞ ¼ 2 ð2r À 1Þ R mðrÞ À R m À 1ðrÞ for m ! 1 And R0 (r) = 1, R1 (r) = 2r − 1 Then substituted weight function Wi (r) So, the R m ( _ r) is orthogonal over unit disk on the interval [0, 1] as: For a color image, the multi-channel moments are described as set OMs of each color channel (Hosny & Darwish, 2019), so the MORSCMs for the (R, G, and B) channel areas: where the f r ðr; hÞ; f g ðr; hÞ; f b ðr; hÞ respectively, show intensity values of the three red, green, and blue channels.

1) Rotation invariant
The MORSCMs method is invariance to rotation, which means if the image is rotated by an angle (a), then:

2) Scaling invariant
OMs values are invariant to scaling, as the calculation region can cover the whole contents of the image as explained in Guo et al. (2017), so the original image is defined on the unit circle as shown in Fig. 1.

3) Translation invariant
A c ¼ ðp 10 ðf r Þ þ p 10 ðf g Þ þ p 10 ðf b ÞÞ=p 00 B c ¼ ðp 01 ðf r Þ þ p 01 ðf g Þ þ p 01 ðf b ÞÞ=p 00 p 00 ¼ p 00 ðf r Þ þ p 00 ðf g Þ þ p 00 ðf b Þ where (Ac, Bc) illustrates the color image centre point and P01( ft), P00( ft), P10( ft) represent the zero and first order of orthogonal moment for each channel sequentially. So, the MORSCMs is invariance to translation and could be calculated as: where the ( r; h) is the image pixel after moving it to the centroid (Ac, Bc).

Local binary pattern
LBP considered texture descriptor. It has become a widespread approach because of its simplicity and discriminative power. It was first described for texture classification by Ojala, Pietikainen & Maenpaa (2002). It can be computed using the following formula: It works by thresholding the neighbourhood of each pixel in the image, and then it converts them to binary numbers, as shown. where, Then the LBPH is used and calculated as: But it is improved by Hosny & Darwish (2019) to use neighbors of different sizes to take any radius and neighbors that surround the central pixel. It is called a uniform local binary pattern, and it presents less feature vector length. It is computed as: where r is the radius, n is the number of neighbours. Figure 2 shows a sample of how LBP works.

System architecture
The proposed method presents an efficient face detection and recognition system. The computational power is reduced and storage is done with no effect on the efficiency and accuracy. In this work, the face recognition system comprises four basic steps, arranged as: 1. Face detection for the input image using Viola-Jones, the most widely used operator.
2. Cropping the face to facilitate feature extraction.
3. MORCMs and LBP are used to extract features.
4. Finally, the classification step on the extracted features is done using three popular standard classifiers. Figure 3 shows how the proposed algorithm works.

Viola-Jones algorithm
Viola-Jones was first proposed in 2001 by Viola (2001). There are many algorithms for face detection; detailed illustrations of these discussed approaches are available (Fasel & Movellan, 2002;Srivastava et al., 2017;Seredin, 2010).  descriptor for color image representation and recognition. It has proven to be effective in terms of recognition accuracy. In the proposed approach (MORSCMs-LBP), we combined both methods: MORSCMs and LBP. LBP was used as a local texture feature descriptor for the image. The global shape features are extracted using MORCMs. The two feature vectors are merged to get one feature vector, which is used for classification. See Fig. 3. The MORSCMs-LBP implemented over three distinct challenging datasets (faces95, face96, grimace). A detailed explanation of these datasets is introduced in the next section. The most significant advantage of the proposed approach is that it requires less storage capacity and less computational cost, suitable for modern systems such as raspberry pi, compared to other methods.

EXPERIMENTAL RESULTS AND DISCUSSION
As mentioned earlier, this study aims to provide a color face recognition system that works efficiently and takes less computational time. We performed three experiments to evaluate the proposed method. These experiments were performed using three distinct standard datasets (faces 95, faces96, and grimace). We used different moment orders (5, 10, and 15) to test accuracy and reliability. The accuracy is measured using the following equation: where Tp, T n, Fp and Fn are the number of true-positive classified, true-negative classified, false-positive classified, and false-negative classified, respectively. We also computed other efficiency measures such as precision, F-measure, recall, specificity, and they are defined as: We calculated all these metrics for our approach and the results are illustrated in Fig. 5.

System configuration
The experiments were executed on a Raspberry Pi, which is used to acquire the input face image. The used Raspberry Pi contains a Broadcom BCM2711 system on a chip with a 1.5 GHz processor and an ARM Cortex-A72. The GPU of the Raspberry Pi is the VI GPU. OpenGL ES2.0 and OpenCV libraries are used to access fast 3D cores. Several ports are present on the Raspberry Pi 4 Model B board, including two micro-HDMI ports, two USB 3.0 ports, two USB 2.0 ports, and a Gigabit Ethernet port. A total of 1 GB RAM on the B1 computer the default operating system for the Raspberry Pi (aka Raspbian) is built on top of Debian. We also tested a dual Intel (R) Corei7 7700 QH (2.80 GHz) CPU. The used operating system is Windows 10, and the IDE is Visual Studio 2019. Table 1 shows more details about the configuration and hardware specifications of the used device.

Face-95, faces-96, and grimace dataset
We used three different benchmark datasets to perform our experiments and will show some sample images of them. A sequence of 20 images was taken for each person using a fixed camera and 0.5 s between each taken image. During taking the sequence, the person moves one step toward the camera to get different scales. The images in each dataset vary in background, head scale, translation, facial emotions, and image lighting. See Table 2. The used dataset was introduced by Spacek (2009).

Experiment evaluation
In the proposed method, we used MORSCMs-LBP to extract facial features. We used the LBP with 59 features and different moment orders of five, 10, and 15. The number of extracted features is 31, 111, and 241, respectively. The LBP features vector was merged with MORSCMS's features vector to produce a single feature vector as shown in Fig. 3, so the total number of features extracted was 90, 170, and 300, respectively for each moment order. The proposed face recognition system is tested over a very challenging dataset, as illustrated in the earlier section. The accuracy of the obtained results has been confirmed by popular and standard classifiers; the k-nearest neighbor with k = 1, support vector machine, and simple logistic. The experiments proved that our approach is more efficient than other currently proposed approaches. The recognition rates of the proposed approach (MORSCMs-LBP) against the compared methods are depicted in Tables 3, 4, 5. The obtained results showed that MORSCMs-LBP was superior over the compared approaches. Table 3 The accuracy of recognition for the proposed method compared with other state of art methods using standard grimace dataset.

RESULTS
In the first experiment, we used moment order five. Then we increased the moment to 10 to increase the number of extracted features, and finally, we set the moment value to 15. For moment order 15, we could get high accuracy and the number of extracted features is still small. We performed the three experiments on three benchmarked datasets and calculated the recognition rates using different standard classifiers. The results included the following parameters: Recall, precision and f-measure, which were illustrated through Eqs. (25)-(28), are shown in Fig. 5. A comparison between the accuracy results for three datasets using moments is illustrated in Fig. 6. Figure 7 shows the confusion matrix for the KNN classifier with the grimace dataset using moment order 15. The confusion matrix shows that the KNN classifier could recognize all 20 images for each class (i.e., 18 people).

Time analysis
Many factors affect the recognition time, such as the size of the image, the dataset's size, and the size of the feature vector. The length of the feature vector of the proposed approach was very small compared to the other compared approaches, where at moment order 15 (where the best recognition rate was obtained), it was 300, which is so small compared to the other approaches (Sajjad et al., 2020;Karami, Prasad & Shehata, 2017). It takes only 2 s to recognize the image, which is less than the time taken by the ORB, SIFT, and SURF approaches. Figure 8 shows the comparison between the recognition time of the proposed approach and the other compared methods.

CONCLUSIONS
We proposed an efficient face recognition system based on MORSCMs-LBP where we integrated the global features of MORSCMs with the local LBP features to achieve a high recognition rate. MORSCMs are good shape feature descriptors where the basic functions of the MORSCMs can capture different unique types of information from the image according to the different values of moments order. This information may sometimes be an average intensity value, texture information, variance, and edge information in a different orientation. Also, many previous studies (Karanwal & Diwaker, 2021;Guo et al., 2017;Wang et al., 2015;Suk & Flusser, 2009;Ojala, Pietikäinen & Harwood, 1996;Karami, Prasad & Shehata, 2017;Ahonen, Hadid & Pietikäinen, 2004;Hadid, 2008; Figure 9 The diagram shows the whole system for color face recognition and classification. Full-size  DOI: 10.7717/peerj-cs.1008/ fig-9 Huijsmans & Sebe, 2003;Grangier & Bengio, 2008;Ali, Georgsson & Hellstrom, 2008;Nanni & Lumini, 2008;Mäenpää, Viertola & Pietikäinen, 2003;Turtinen, 2006;Heikkila & Pietikainen, 2006;Kellokumpu, Zhao & Pietikäinen, 2008;Oliver et al., 2007;Kluckner et al., 2007;Fisher, Stein & Fisher, 2005;Sharma, Jain & Khushboo, 2019) proved the high efficiency of the LBP as a local feature descriptor for the images. From the above results, we can observe that our proposed face recognition system has high accuracy and less recognition time, where the size of the extracted feature vector is relatively small compared with the other recently published methods (Sajjad et al., 2020;Karami, Prasad & Shehata, 2017). Also, we used the high efficiency of the LBP as a local feature descriptor for the face images. Besides the high accuracy, the low computational complexity of the proposed face recognition system makes it quick where the size of the extracted feature vector is relatively small compared with the other recently published methods. Figure 9 shows the schematic representation of the system. For more reliability, we applied the proposed algorithm using a nano device with the Raspberry Pi. The obtained results show high superiority in terms of accuracy and time when tested over three challenging datasets: Face-95, Face-96, and Grimace.

ADDITIONAL INFORMATION AND DECLARATIONS Funding
The authors received no funding for this work.