Dostroajan: Facial Recognition Based System Input Control Agent

Speed, time and safety are of great importance in many operations conducted today. There are standards such as ISO 27001, ITIL (Information Technologies Infrastructure Library), COBIT (Control Objectives for Information and Related Technology), which are globally recognized not only regarding access to information and the use of information but also information retention. Governmental institutions and many large companies use fingerprint, card reading, iris recognition and facial recognition systems in entrances and exits, regarding the protection of information. The facial recognition system application developed within the scope of this study performs the facial recognition by using Convolutional Neural Networks (CNN), which is one of the deep learning algorithms and restricts the use of your personal computer by people you do not know. In addition to this restriction, it takes a photo of the person who wants to use your personal computer and sends this photo to the mobile phone of the owner of the computer, who was previously defined in the system and informs him/her. Regarding the testing of the face recognition system application FEI (Faculdade de Engenharia Industrial - Faculty of Industrial Engineering) facial database was used. In this facial database, there are 14 different poses of 200 people (one is neutral, one is smiling, one is not smiling, and the others are at different angles). Trials were made to access the system with a total of 2800 photographs and as a result of the trials, success was achieved with a ratio of 76.31% in the worst angle and light and a ratio of 99.15% in the best angle and light.

The facial recognition system application developed within the scope of this study performs the facial recognition by using Convolutional Neural Networks (CNN), which is one of the deep learning algorithms and restricts the use of your personal computer by people you do not know.In addition to this restriction, it takes a photo of the person who wants to use your personal computer and sends this photo to the mobile phone of the owner of the computer, who was previously defined in the system and informs him/her.
Regarding the testing of the face recognition system application FEI (Faculdade de Engenharia Industrial-Faculty of Industrial Engineering) facial database was used.In this facial database, there are 14 different poses of 200 people (one is neutral, one is smiling, one is not smiling, and the others are at different angles).Trials were made to access the system with a total of 2800 photographs and as a result of the trials, success was achieved with a ratio of 76.31% in the worst angle and light and a ratio of 99.15% in the best angle and light.

INTRODUCTION
Today, when the data increase rapidly, the security of the systems where these data are stored is very important.Many applications have been developed to prevent unauthorized access to systems and are still being developed.Developing technologies use different methods such as password usage, fingerprint reader, voice recognition, iris recognition and facial recognition regarding the protection of data.Along with the developments in artificial intelligence, many solutions (such as endpoint security, network security, password management, log management, e-mail security, system access controls) are offered in the field of information security.Advances in image processing, which is a common ground of the fields of artificial intelligence and information security bring along innovative solutions.One of these solutions is that the person can be identified based on his/her image.This process, known as facial recognition, is an important property of supervisory systems and computer-human interactive systems (Taşova, 2011, Kaplan, 2018).
Facial recognition is based on the ability to re-identify a person.The ability to re-identify a person depends on the working of many complex layers within a certain hierarchy.This identification process is quite complicated and difficult for reasons such as photographs taken at various times using various cameras, ambient light and differences in perspective.Two separate images of the same person may look quite different for the reasons mentioned above or the images of two different people may look very similar (Ahmed et al., 2015).
The redefinition of the image performed by classical artificial neural network modeling, the connections between the neurons and the layers and the learned parameters present great computational difficulties.At this point, convolutional neural networks come into play.In 2012, the deep learning model based on the evolutionary neural network was first presented by Krizhevski et al. in the ILSVRC'12 competition.They won the competition with a great percentage of identification accuracy with the work they performed.Since then, deep learning models based on convolutional neural networks have become more popular in the field of computer vision.The model fundamentally works on the basis of comparing two images and producing a similarity score as a result of this comparison or classification of the image.
In this study, facial recognition application was performed by using Convolutional Neural Networks, which is one of the deep learning algorithms based on image processing and an application was developed aimed at preventing unauthorized access to the systems.For the face recognition process to be performed, primarily, the images of the users authorized to use the system must be introduced to the system in advance.The image of the user attempting to access the system is captured by a camera connected to the system and matched with the previously recorded images.The user who succeeds in this matching process will be able to access the system.In case the pairing process fails, the image of the user attempting to enter the system is sent to the system authority by a text message.The application runs in the background of the system and does not show any signs of functioning while it is logged in.The application, which consumes a very small dimension (5.1 mb) of source in the memory, is activated as soon as the system is turned on.

Related Studies
There are many studies on facial recognition systems based on the re-identification of the person.Depending on the development of technology, it can be said that these studies continue increasingly.
In their study, Pala et al. (2018) compared the Haar Wavelet Artificial Neural Network model with the convolutional neural network model and proposed the Haar Wavelet Transform based neural network structure.In the study, where they used the MNIST data set, they found that the multilayered structure adopted in the design of the convolutional neural network increased the network depth and thus caused significant problems.Erdem, M. E. and Topal, C. (2018), in their study, proposed the 2B patch warping based face pre-frontalization method, which has a simple but effective flow due to its low calculation cost.They found that "Face Fronting" technique increases the accuracy of face and motion recognition applications.Kaplan, A. (2018), in his study, realized the determination of whether an image involves a face or not and the detection of the places of faces on the photograph by using image processing

Dostroajan: Facial Recognition Based System Input Control Agent
Faruk AYATA, Hayati ÇAVUŞ, Mevlüt İNAN, Ebubekir SEYYARER, Emre BİÇEK, Erol KINA 85 techniques.He emphasized that the application he developed should work with high performance and speed as a real-time application.Rashid, E. (2018), in his study, designed a personal security system with facial recognition using a Raspberry Pi-based camera system.Zhang, Z. et al. (2018), in their study, proposed a new deep model called integration evolutionary neural network (ICNN) for the re-identification of the person in camera networks, in which they jointly learned universal and local characteristics.They evaluated the proposed ICNN in three large-scale databases.They obtained an accuracy of 92.13% in Market 1501, 61.4% in CUHK03 and 85.3% in Duke MTMC-re ID.Sharma, R et al. (2019), in their study, proposed a new real-time face detection system that detects inclined, closed or differently illuminated faces.They proposed a system using Viola Jones and Modified Affin Transformation in order to overcome the problems of angle and light.
Chahar, H.And Nain, N. ( 2017) tried the studies on image and video based facial recognition in various data sets and the results of the study are shown in Table 1.2018) stated that the facial recognition systems used in their study could be overcome by displaying the image, video or three-dimensional artificial mask of the person concerned, and that such security weaknesses were aimed to be eliminated by affirming that the person is alive through the detection of his/her blink and mimics but the desired level of success could not be achieved and produce solutions to three-dimensional masks.They used the CMU, Grimace, Yale, Face 95 and FEI data sets to test the application and achieved an accuracy of 95%.
In the application developed by Cataline et al. ( 2017) for access to some special systems, facial recognition is performed in accordance with the 5sec video image taken from the camera and access is prevented if a second face, other than that of the person defined in the system is detected.

Face Recognition Methods
Yan, Kriegman and Ahuja (2007) made a classification consisting of four main topics for face recognition methods.These are:

Method based upon knowledge
Knowledge-based method.There are certain set of rules and face detection is performed within the framework of the rules.It needs nose, mouth and eyes on the face for face detection.The problem with this method is the creation of the appropriate set of rules.Whether the rules are detailed or general makes face recognition very difficult.

Feature-based method
This method detects the faces by removing the structural features of the face.These features may be light, head angle, facial tissue, skin color, etc.This method gave very good results in images containing more than one face.

Template-based method
It uses predefined or parameterized face templates for face detection.The human face can be divided into different definitions as nose, mouth, eyes and face circumference.The applicability of this method may be simple but insufficient for face detection.

Appearance-based method
It uses the learning set that includes various face patterns and makes face detection by learning human face models.It gives much better results than the other methods.It uses statistical analysis, machine learning, and deep learning techniques to detect face image.Appearancebased method uses the following methods for face recognition applications: • Support Vector Machine

• Sparse Network of Winnows
• Naive Bayes Classifiers • Hidden Markov Model • Information Theoretical Approach • Inductive Learning

Experimental Study
The facial recognition system application requires training regarding the images of the people who have access to the computer for establishing the control of whether the person who wishes to access the computer is among the people who have the right to access the computer.Therefore, the images of the people who were granted access to the folder specified as the first step should be discarded.In the absence of a previously captured image, the desired number of images can be recorded using the program provided below with the pseudo code and the interface (figure 2) to generate the test data.

Pseudo Code
İnput: Capture image from camera  When logged on, the program starts running automatically and continues running in the background until the computer is shut down.The program uses a very small amount of the system resources.
The program, which starts to run when logged in, first takes a picture of the person using the computer and performs the identification process by applying face-recognition methods based on appearance on this image.

89
In this method, the techniques of statistical analysis, machine learning, and deep learning are used to detect face image.Face detection is performed on the image taken from the camera using Convolutional Neural Networks, which is one of the Deep Learning algorithms.
Figure 3.The logic of Convolutional Neural Network.
In the work of the Convolutional Neural Network, the image is fragmented.Each divided part is filtered.After the applied filter, the image shrinks.The pixels obtained after the reduction process are interpreted and the problem is solved (Cengil and Çınar, 2016).
As shown in Figure 3, the first few steps of the identification process consist of Convolution and Pooling layers.In the last stage, there is the Fully Connected layer and the Classification layer.In summary, this architecture consists of several trainable sections arranged one after the other.Finally, a final output is generated, and this output is used to be able to make comparison with the correct result.As a result of the comparison, an error occurs as much as the difference between the correct result and the final output.The back-propagation algorithm is used for this error to be transferred to all weights.Weights should be updated with each iteration to reduce the error (İnik and Ülker, 2017).
In the study, platform-independent Dlib library in C ++ programming language was used for face detection.The Dlib library is a library that has been developed since 2002, includes deep learning, machine learning and computer vision algorithms, and offers service to a wide audience through the C ++ and Python API. Figure 4 shows the block diagram of the system.Face detection, face recognition and face comparison operations are performed by using CNN structure of the image taken from the camera together with the images recorded in the system.The system is activated by the matching of people in the images; if there is no matching, the computer is restarted and informing is performed by sending the image of the person who wants to access the system to the mobile phone registered in the system.

Pseudo code
İnput: Capture image from camera Output: Permission to system The pseudo code of the system developed above is seen.A snapshot of the person who wants to access the computer is taken and saved to the computer with a file name.Then, the image_compare function, the image of the person who wants to access the computer and the image of people who were previously recorded in the computer for testing the system and who have access to the system are analyzed using deep learning methods and comparison is made.If the result of the comparison is positive, the system is turned on, but if it is negative, the snapshot of the person who wants to access the computer is saved to the ftp server in the system, then the warning message information is sent to the specified mobile phone and finally the system is turned off. Figure 4 shows the message information sent to the mobile phone.By clicking on the link in the message, the photo of the unauthorized person is accessed.
Figure 5. Intrusion system warning message information.
The program prepared was designed to run on Windows operating system.As shown in Figure 6, the program runs in the background of the computer and uses a very little amount of system resources.FEI face database was used for the test of the system.Each photograph of the 200 people in the FEI face database taken in 14 different angles and lights was used for testing on the program.

Results
In this study, a prototype security system was developed for the security of personal computers.Face detection, face recognition and face comparison processes were performed with the video camera integrated in personal computers, and if the result of the comparison process was positive, the person was allowed to have access to the computer and if it was negative, a message was sent to the mobile phone of the person identified in the system and s/he was enabled to have access to the photograph of the person who requested access to the computer.That camera has become a standard equipment in today's laptops increases the usability of this system prepared.
In the software of this study, the image processing, machine learning and deep learning methods combined under Python programming language were used.For face detection, face recognition and face comparison operations, Python api, based on Convolutionary Neural Networks, which is one of the deep learning algorithms prepared independent of platform in Dlib library, was used.
FEI face image database was used for testing the system.The success rates for 14 different exposures are shown in figure 7.According to these results, the system achieved 99.15% success at the best angle and light and 76.31% success at the worst angle and light.As a result, this system is expected to form the basis of the systems to be developed for the protection of personal computers, in today's world where information security and face recognition systems are crucial.
Sharma et al. (2016) conducted a CNN-based facial recognition using the dlib library.They performed the tests of the study based on the FAREC dataset and achieved 96% success.Guo and Li (2016) used CNN for facial recognition in their study, but they used SVM (Support Vector Machine) as the classifier.They conducted the tests on the FERET dataset.As a result of the tests, they achieved a high recognition rate with less training time.Vinay et al. (2017) used F-CNN and G-CNN architectures in their face recognition application.

Figure 2 .
Figure 2. Training data creation program interface.

Figure 4 .
Figure 4. Block diagram of the developed system.

Figure 6 .
Figure 6.The image of the program working in the background.