# Face Spoofing Detection with Stacking Ensembles in Work Time Registration System
## 2 Review of Existing Solutions  
Facial recognition systems are constantly gaining popularity. In particular, they are used to confirm the user's authenticity in many applications, for example, logging into a computer. In particular, solutions based on deep learning have been rapidly gaining popularity in recent years. The most successful methods include DeepFace [7], DeepIDs [8], VGG Face [9], SphereFace [10], and the solution that we used in our system: ArcFace. However, a common problem in all face recognition systems is the possibility of fraud, where someone else can obtain unauthorized access to the system using a photo or video of the legitimate user's face. Several systems aiming for face spoofing prevention were constructed using two cameras, a 3D camera, or an additional infrared camera. However, there are cases when we can use only a simple, cheap 2D camera, in particular the front camera of a smartphone or a webcam embedded into a laptop, as in our case. Figure 2: Sample images received by the system. Authentic Image 3 comes from the publicly available Large CrowdCollected Facial Anti-Spoofing Dataset [5]. Spoof Image 1 and Spoof Image 2 come from the publicly available Celeb-A dataset [6]. The remaining images come from our own dataset. However, the lack of 3D is not the only indicator of fraud, and the existence of 3D does not protect against using 3D masks for an attack. There also exist other indicators of an attack, and since we do not have access to the 3D information, we need to use them. Frequently, we do not know what the signals of fraud are. However, in this case, we can use the photos of the real persons' authentications and of the attempts of fraud to train a predictive model to recognize the fraudulent situation. However, the predictive models usually need examples of two classes for the learning process: the real class and the fake class, and during the prediction phase, they predict the face recognition based on the similarity of examples in the training set. For that reason, several solutions were proposed. In previous years, many traditional handcrafted feature-based methods were proposed for face spoofing detection. These algorithms contained methods such as LBP [11; 12], SIFT [13], SURF [14], DoG, and HOG [15], and were designed for extracting spoofing patterns from various color spaces (RGB, HSV, and YCbCr). Also, many methods to detect liveness cues were developed, which tried to detect eye-blinking [16; 17; 18], face and head movement, gaze tracking [19], and remote physiological signals such as rPPG [20; 21; 22; 23]. However, it is easy to cheat the liveness cues with a proper video attack, which, on the one hand, frequently makes them less reliable, and on the other hand, users do not like this (in our application, it would be unacceptable; no one would use it). Although deep learning and CNNs have achieved great success in many computer vision tasks (image classification, semantic segmentation, object detection, etc. ), they contain many tuning parameters (weights) and therefore require large and diverse training datasets in order to avoid overfitting. Thus, in response to that, several hybrid methods were proposed, where features are first extracted from the images, and then the CNNs operate on the extracted features rather than on the original images, which allows reducing the number of parameters and thus avoids overfitting. Below, we briefly list some recently proposed solutions. Traditional image-based approaches focus on image quality and characteristics and therefore employ hand-made features, such as LBP, SIFT, HOG, and SURF, with shallow classifiers to discriminate live and fake faces [24]. [PERSON] et al. [25] combined the LBP and GLCM methods to extract the features used to detect spoof images. The LBP and GLCM are based on texture features, but GLCM uses statistical functions, so the extraction result represents the overall image texture features. [PERSON] et al.