An Efficient Face Recognition Method Using CNN

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

An Efficient Face Recognition Method Using CNN

Chokri Souani
Hana ben Fredj Souhir Sghaier
Laboratory of Microelectronics and
Faculty of ScienceMonastir, University Taif University
Instrumentation, Faculty of Sciences of
of MonastirTunisia
Departement of Sciences and Monastir, Tunisia Higher Institute of
[email protected]
Technology Applied Sciences & Technology,
University of Sousse, Tunisia
Taif, Saud Arabia [email protected]
[email protected]
2021 International Conference of Women in Data Science at Taif University (WiDSTaif ) | 978-1-6654-4948-9/21/$31.00 ©2021 IEEE | DOI: 10.1109/WIDSTAIF52235.2021.9430209

Abstract— Convolutional Neural Networks (CNNs) have face-based CNN applications are often formed by large
shown a great success within the field of face recognition. In private datasets [5].
this paper, we propose a robust face recognition method, which The second problem resides in the field of memory
is based on Principal Component Analysis (PCA) and CNN. In and computational requirements of CNNs
our method, PCA is employed to reduce the size of data.
[11,12]. These problems often prevent using CNNs on
Afterwards, we use a CNN as a classifier for face recognition.
We relatively decrease the number of layers used in the CNN integrated platforms such as tablets and smartphones.
architecture, utilizing the dropout regulation technique. Most Subsequently, we address in this work the problem of face
importantly, we implement the classification step on the GPU recognition taking into account the memory and running time
component. Several experiments have been implemented using issues by using a method to reduce the quantity of memory
available well-known databases. The experimental results and by decreasing the amount of intermediate layers.
verify the effectiveness of our approach, which keeps good Additionally, to decrease the execution time and to accelerate
recognition accuracy. Thus, it expands an important the parallel computation of data, we implement the
acceleration of the classification face compared to the standard classification block on the graphics processor. Nevertheless,
CNN implementation without data reduction. It achieves also
the Graphics Processing Unit (GPU) is an effective device
lower memory consumption due to the smaller amounts of data
processing used through the PCA method. Moreover, our used for accelerating huge calculation algorithms. By using
model is intentionally designed such that both its running time its power of parallel programming, it allows to decrease the
and memory requirements are decreased. execution time during treatment. Accordingly, GPUs are
used to implement different applications which require a lot
of computation in different areas [13]. Among these
applications, we have face recognition models which require
Keywords—Face recognition, Deep learning, Extraction very high performance. As a result, it is important to
features, CNN
effectively implement these methods by GPUs, to speed up
the computation and processing process. This paper presents
a fast hybrid implementation of a face recognition system,
I. INTRODUCTION which contains feature extraction and classification blocks.
The implementation is capable to obtain a good performance
Face recognition is among the most successful
by using the ConvNet classifier based on a parallel
applications of pattern recognition. It is an application
computing unit GPU.
capable of identifying people by a digital image or video
In addition, the idea of using PCA as a features extractor
frame [1]. Face recognition is introduced across different
provides to the optimizing memory consumption and the
applications like visual surveillance and collecting
decrease of elapsed time for the running program.
demographic. Although, researchers have made efforts on
Furthermore, PCA has the characteristic of declining
this field for many years. However, in the real world, face
dimension and correlation elimination [14].
recognition still remains a complicated task. This is due to
The proposed method is composed of two main parts: In
several factors such as ; different facial expressions, changes
the first one, we use the PCA method to reduce the
in lighting, masked parts of faces, etc [2,3]. Thus, more
dimensions of the input data. In the second one, the
efforts have been made to solve these problems and to
implementation of the classifier utilizing ConvNet is done
implement recognition systems in good conditions. Deep
using a GPU processor. The adaptive classifier with the PCA
convolutional neural networks have become the first solution
technique presents more effective results in terms of
for computer vision and object recognition [4-8], especially
processing time and consumption memory. All of these
for face recognition [9,10]. Hence, researchers have
factors enable obtaining a fast and complete recognition
conducted the powerful analysis ability for this type of
model with a significant recognition. This paper is organized
applications. In some cases, the implementation and practical
as follows. The second section describes the preliminary
use of CNN becomes difficult by the interaction of some
knowledge about related feature extraction and classification
problems. The first problem is linked to the large size of
algorithms. The third section presents our novel model based
training data. Collecting wide datasets of faces can increase
on PCA for extracting features and on CNN for the
some protection issues of privacy. Therefore, successful
classification step. Section four illustrates and discusses the

978-1-6654-4948-9/21/$31.00 ©2021 IEEE

Authorized licensed use limited to: Birla Institute of Technology & Science. Downloaded on September 20,2021 at 10:32:51 UTC from IEEE Xplore. Restrictions apply.
experimental results. Finally, the last section summarizes the classifiers. Recently, the face recognition models based on
paper. CNN attain better performances. In this context, several
applications such as; ArcFace [17], VarGFaceNet [18] have
II. RELATED WORK achieve imperative results in uncontrolled environments. In
There are many pattern recognition applications fact, the wide amounts of data and the deep networks are
implemented on totally different platforms. Particularly, Face One of the primary factors for success of these types of
recognition has been, within the last years, a prevailing applications.
analysis field . Furthermore, face recognition consists of two
steps: face detection and face identification [15]. Therefore, Parallel and distributed algorithms are a common
some various classical face recognition methods have been method to overcome high training times in CNNs. Indeed,
studied in the literature, such as [16], and so on. SVMs have there is a huge benefit in massively parallel processing for
been widely used in the field of face recognition, because specific tasks like applying filters on images. Important
they are novel learning machines with a lot of merits, like benefits can be achieved on immense parallel tasks, where
fast solving and strongly generalizing abilities. However, many researchers have previously ported their networks to
these methods cannot achieve a very significant recognition GPUs successfully.
rate. .
In addition, numerous classification algorithms such In this work, part of our contribution, we tend to
as the linear regression classification algorithm and Softmax address this issue taking into consideration the memory and
are effective suggested methods for face classification. Thus, the running time. Furthermore, we focus on face recognition
several face recognition systems have achieved important using the advantages of the PCA technique to cut back data
performances in the literature. For example, in [15], a face and of those parallel implementation of CNN for
recognition model using PCA and ANFIS was put forward. classification. Unlike what has been published in the
Generally, these methods can achieve important accuracy literature, we minimize the number of layers in order to
and their capacity for discrimination has been discussed in reduce the use of calculation blocks, hence decreasing the
several studies. In addition, they can be integrated into weights. Our model is intentionally designed in a way that
numerous frameworks with a better execution but without both its running time and memory requirements are reduced,
changing their possess shape. On the other hand, the obstacle so as to reach the balance of speed and precision.
of facial recognition always lies in the balance of speed and
precision. These methods cannot achieve satisfactory speed III. DESCRIPTION MODEL
on computing devices without a large parallel computing By combining the advantages of both PCA and CNN,
capability. Moreover, they are incapable to adapt to certain we develop our face recognition model. Thus, we use PCA
applications in real time. That makes these algorithms to extract features and decrease the dimensions of process
adequate to acquire information only under limited data. Afterwards, we utilize the CNN architecture as a
conditions. classifier for face recognition. The general procedure of our
In this paper, we are interested in both problems, proposed system is portrayed in Fig.1. In order to reduce the
which are how to extract features and how to design a computational burden of the CNN architecture while
classifier for face recognition by declining the running time decreasing the execution time compared to CPU. We
and memory requirements. Subsequently, our research implement the classification method on GPU component.
includes two technical components. The first is for features Indeed, we use the benefits of the processing power of a
extraction. Among the most common methods that allow GPU and the parallelism treatment in our implementation to
dimension reduction, by extracting the face features, we achieve a good performance.
found: ICA, LDA and PCA. According to [15], the
efficiency of PCA has been verified as a good extractor face In our architecture design, we only use 3×3
features and it could be used for face recognition. We also convolutions with padding “1”. Each convolutional is
have the hashing algorithms such as LSH (Locality Sensitive followed by an activation function ReLU, max (0.x).
Hashing), which permits reducing data dimensions by Moreover, the ReLU operation is used for the elimination of
generating the binary codeword for high dimensional data. overfitting and for the completion of the local convoluted-
Moreover, these approaches need to use many random feature normalization process. Then, we use the pooling
vectors, which leads to a large storage space and a high cost layers. The convolutional region is divided by a pooling
computational. layer into subregions. The spatial size of the intermediate
The idea of utilizing principal components was data is increased by the pooling layer. Hence, the features
developed and used principally for face detection and map size of the convolutional layer is smaller than that of
recognition applications . Besides, it could find the maximal the previous layer, which allows reducing the calculation
variance of data, and it is ideal in terms of minimal time. In our architecture, pooling is, as a matter of fact, plain
reconstruction error [14]. Whereas, the advantages of the old max over 2×2 blocks. As a result, this latter
algorithm were that it can decrease the time complexity convolutional network hidden layer is a network fully linked
because the dimension of the feature space was much less to the output layer Softmax activation function.
than that of the original image space . Fully-connected layers are generally utilized in latter
Concerning the second technical component, which is CNN stages in the aim of connecting to the output layer as
designing novel classifiers for face recognition, there have well as for constructing the desired number of outputs.
been many attractive methods for classifiers such as SVMs, Whereas, Softmax is the latest layer in our architecture of
nearest neighbor classifiers, and minimum distance

Authorized licensed use limited to: Birla Institute of Technology & Science. Downloaded on September 20,2021 at 10:32:51 UTC from IEEE Xplore. Restrictions apply.
classification block. This loss function allows to compute measure the elapsed time of the classification method with
the probability of the output of each class. and without the PCA method. The results of these
experiments are presented from Fig.3. Therefore, it is
observed from these figures that the runtime consumed by
PCA-CNN is smaller than the CNN model. It expands, for
instance, the acceleration of the classification face to 9× on
the ORL dataset.
As a result, the absolute running time values
demonstrate that the time gain becomes really essential
when the input data are processed by PCA in each case.

Classifier

Fig. 1 Architecture of proposed face recognition

IV. EXPERIMENTS

In this section, the performance evaluation of the


proposed approach on GPU is presented. All the methods
are trained with the open source deep learning framework
Tensorflow. We first provide the results of evaluating the
suggested approach in terms of running time, memory usage Fig. 3 Influence of PCA on execution time for ORL dataset
and recognition performance. Besides, we compare the
suggested approach to recognition methods. Our model is
evaluated on various tasks, which a set of experiments are Consequently, PCA is very efficient in minimizing
conducted on ORL (Our Database of Faces) dataset. the input data of the CNN model of the recognition face.
Fig.2 presents some examples from this database.
B. Influence of PCA method on usage memory
Among the parameters that make the object recognition
system heavy is the use of much memory. The positive
influence of the PCA method is confirmed, which enables
treating the CNN input data on the elapsed time.
In this part, we treat the influence of the PCA method on
Fig. 2 Samples from ORL dataset the memory consumption during the running of the
classification part on the graphic processor (GPU). In order
Obviously, face recognition methods based on deep to better understand the memory gains of optimization, we
networks are able to attain imperative performances. compare standard CNN with the optimized method using
In this section, we focus on optimization: The PCA. The comparison is performed in terms of required
objective is to drastically reduce the running time and the memory depending on time.
memory necessities whereas conserving the classification In fact, we train the network architecture with the same
performance based CNN method. dropout amount. Fig.4 show the summary memory
consumption as a function of time with and without PCA for
A. Influence of PCA method on execution time ORL dataset. It should be mentioned that the variation in the
consumption of memory is studied along the duration of
Data processing within a deep neural network treatment for both architectures. Indeed, in the first case, for
requires an excessive execution time, which makes the the ORL database and without PCA, the processing time
recognition face system heavy. Resolving this problem has reaches 160 s. Whereas, with PCA, which allows data
become a priority for this type of application to reach a high reduction, the duration reaches only 13 s.
performance. By keeping the maximal amount of Without PCA, as depicted in Fig.4 (a), we see that at the
information located in the different samples of the database, beginning of treatment, the used amount of memory goes up
the PCA technique has been used to reduce the input data of proportionally with time up to 6 s. Then it becomes flat
deep learning. This allows us to eventually reduce the when 6 s ≤ time ≤ 140 s. It can be noted that it is raised until
maximal data without losing the information required for the 900 MIB and that it remains stable until the end of treatment.
classification step. For Fig.4 (b), the treatment is done only in 13 s, and the
In this part, we will evaluate the importance of the consumption grows progressively up to 700 MIB and
PCA technique and its influence on the treatment with the remains stable until the end of treatment. Moreover, the
neural network in terms of time. In order to better results indicate that the optimized method is more efficient
understand the computational gain of optimization, we in terms of memory consumption than the initial network.

Authorized licensed use limited to: Birla Institute of Technology & Science. Downloaded on September 20,2021 at 10:32:51 UTC from IEEE Xplore. Restrictions apply.
The proposed approach, PCA-CNN, provides reliable dataset. In each case, our model is better than the other
performance improvements by about 22.2% for the ORL systems, which achieves an important recognition rate. For
dataset. It achieves lower memory consumption for the the Extended-Yale face database, we have used all the
CNN architecture on account of the smaller amounts of data samples. In addition, for the LFW database, we have utilized
processing utilizing the PCA method. the maximum of samples that have not occulted information.
This allows us to reach important rate recognition.
Besides, our approach has succeeded to obtain a recognition
technique with higher accuracy, also with lower execution
timing and consumption of memory on different databases.
Moreover, it has been shown that the PCA-CNN system is
efficient for variation illumination conditions, since it
achieves a significant recognition rate using the Extended-
Memory used (in MIB)

Yale Face database which is characterized by a large


variation of light. Thus, this method, is eventually effective
in the presence of pose and facial expression variation, like
on the LFW database.

Time (in seconds)

(a) Without PCA


Memory used (in MIB)

Fig. 5 Accuracy performance for different datasets; A: ORL, B: Extended-


Yale Face, C:Yale Face, D:Face 94, E: LFW

V. CONCLUSION

Time (in seconds) In this paper, we have suggested a hybrid model of


face recognition, which is based on the PCA technique and
(b) With PCA the CNN classifier. Therefore, we have used the advantages
of PCA to reduce dimensions of processed data as well as
Fig. 4 Influence of PCA method on memory usage for ORL dataset
parallel implementation. In addition, we have minimized the
number of layers in order to decrease the use of calculation
C. Analysis of classification results
blocks. Our experiments have been carried out employing
well-known database ORL. An important precision
We have demonstrated the efficiency and flexibility of
performance has been defined using the PCA-CNN set.
the data reduction method using different databases in well-
Furthermore, the proposed optimization methodology is
defined scenarios. We study the classification results of the
simple but efficient in terms of execution time and memory
suggested PCA-CNN model in this section. The comparison
usage on the GPU implementation for the model set PCA-
is made between the following recognition system
CNN. As future work, a larger dataset will be used and
architecture: PCA-Softmax, PCA-Euclidean distance and
treated with a more complex CNN classifier, which can
PCA-SVM for multiple datasets: ORL, LFW, Yale Face,
achieve a reasonable balance between accuracy, time
Extended-Yale Face and Faces49. The results of the
efficiency and memory usage.
comparison are summarized from Fig.23. It can be noticed
that the accuracy of the proposed PCA-CNN technique is
94.2% with the ORL dataset, 98.7% with the Extended-Yale
Face dataset and 86% for Yale Face dataset. Then it reaches
97% with the LFW dataset and 96.5% with the Faces94

Authorized licensed use limited to: Birla Institute of Technology & Science. Downloaded on September 20,2021 at 10:32:51 UTC from IEEE Xplore. Restrictions apply.
REFERENCES

[1] L. Wujun, W. Chongjun, X. Dianjiang, B. Luo and Z. Chen,


“Illumination invariant face recognition based on neural network
ensemble,” 16th IEEE Int. Conf. on Tools with Artificial Intelligence.
USA, pp. 486-490, May 2004.
[2] C. Tian, G. Fan, X. Gao and Q. Tian, “Multiview face recognition:
from tensorface to v-tensorface and k-tensorface” IEEE Transactions
on Systems, Man, and Cybernetics, Part B, Cybernetics. 2012, pp.
320-333, February 2012.
[3] T. Chan, K. Jia, S. Gao, J. Lu, Z. Zeng, and Y. Ma, “A simple deep
learning baseline for image classification?,” IEEE transactions on
image processing”, vol. 24, no 12, pp. 5017-5032, September 2015.
[4] I.J. Goodfellow, Y. Bulatov, J. Ibarz, S. Arnoud, V. Shet, “Multi-digit
number recognition from street view imagery using deep
convolutional neural networks,” arXiv preprint arXiv:1312.6082,
2013
[5] Y. Taigman, M. Yang, M. A. Ranzato, L. Wolf, “ Deepface: Closing
the gap to human-level performance in face verification”. IEEE Int.
Conf. on computer vision and pattern recognition, USA, pp. 1701-
1708, june 2014
[6] O. Vinyals, A. Toshev, S. Bengio, and D. Erhan, “Show and tell: A
neural image caption generator,” IEEE transactions on pattern
analysis and machine intelligence, vol. 39, no. 4, pp. 3156-3164, april
2017.
[7] A. Krizhevsky, I. Sutskever, G.E and Hinton, “Imagenet classification
with deep convolutional neural networks”. IEEE Int.conf. on
Advances in neural information processing systems, pp. 1097-1105,
2012.
[8] K. Simonyan and A. Zisserman, “Very deep convolutional networks
for large-scale image recognition,” arXiv preprint arXiv:1409.1556,
April 2015.
[9] S. Rahimzadeh Arashloo and J. Kittler, “Fast pose invariant face
recognition using super coupled multiresolution Markov random
fields on a GPU” Pattern Recognition Letters, vol. 48, pp. 49-59,
2014.
[10] K. Guo, S. Wu and Y. Xu, “Face recognition using both visible light
image and near-infrared image and a deep network”. CAAI
Transactions on Intelligence Technology, vol. 2, no.1, pp.39-47,
2017.
[11] Y. Gong, L. Liu, M. Yang and L. Bourdev, “Compressing deep
convolutional networks using vector quantization,” arXiv preprint
arXiv:1412.6115, 2014.
[12] K. He and J. Sun, “Convolutional neural networks at constrained time
cost,” IEEE Int. conf. on computer vision and pattern recognition, pp.
5353-5360, 2015.
[13] H. Ben Frej, M. Ltaif, A. Ammar, C. Souani, “Parallel
implementation of Sobel filter using CUDA”IEEE Int. conf. on
Control, Automation and Diagnosis (ICCAD), pp. 209-212, 2017.

[14] W. Zhao, A. Krishnaswamy, R. Chellappa, D.L. Swets, J. Weng,


“Discriminant analysis of principal components for face recognition”
In Face Recognition. Springer, pp. 73-85, 1998
[15] R. Sharma, M.S.Patterh, “A new pose invariant face recognition
system using PCA and ANFIS,” Optik-International Journal for Light
and Electron Optics, vol. 126, n. 23, pp.3483-3487, 2015.
[16] G. FuLu, J. Zou, Y. Wang, “Incremental complete LDA for face
recognition” Pattern Recognition, vol. 45, n. 7, pp. 2510-2521, 2012.
[17] J.Deng, J.Guo, N. Xue and S. Zafeiriou, “Arcface: Additive angular
margin loss for deep face recognition,” In Proceedings of the
IEEE/CVF Conference on Computer Vision and Pattern
Recognition, pp. 4690-4699, 2019.
[18] M. Yan, M. Zhao, Z. Xu, Q. Zhang, G. Wang, Z. Su, “Vargfacenet:
An efficient variable group convolutional neural network for
lightweight face recognition” In : Proceedings of the IEEE/CVF
International Conference on Computer Vision Workshops, 2019.

Authorized licensed use limited to: Birla Institute of Technology & Science. Downloaded on September 20,2021 at 10:32:51 UTC from IEEE Xplore. Restrictions apply.

You might also like