# Face Spoofing Detection with Stacking Ensembles in Work Time Registration System
## 1 Introduction
The image quality is generally suboptimal--photos are highly compressed (WEBP,  
Figure 1: Work time management system. The block of the module presented in this paper is marked in red. 5-6 kB), often taken under poor lighting conditions, and frequently depict employees in a hurry, not properly positioned in front of the camera. Several example images taken under these conditions are presented in Figure 2. Nonetheless, our method is designed to operate effectively under these constraints, as we had no control over photo quality. Typically, the problem of facial authenticity detection is studied in the context of users logging into an operating system or application. Many well-established methods exist for that use case and are thoroughly documented in the literature. However, the conditions and requirements in a work time registration system differ substantially, as previously described. In fact, state-of-the-art methods designed for login systems performed poorly in our settings, achieving only around 50% accuracy, and most authentic faces were incorrectly classified as spoofed. This issue also extended to a prominent commercial solution discussed in the experimental section. These systems perform well under ideal conditions: good lighting, a properly aligned face, and a high-quality USB camera. In contrast, the work time registration environment caused significant performance drops, leading us to conclude that image quality is a critical factor. To explore this hypothesis, we captured several high-quality images using a full-frame camera and displayed them on a 4K-resolution notebook screen, simulating spoofing attempts. These images were often recognized as authentic by existing systems. This confirmed that photo quality can heavily influence the results. Since no available solution performed reliably under our specific conditions, we were compelled to develop a custom method, which is presented in this paper. One of the key problems in the industry is the potential for fraud in work time registration. To prevent this, it is essential to ensure that the person registering work time is physically present and not being impersonated via photo or video. Therefore, we evaluated various face recognition algorithms and methods for determining whether a face belongs to a live person or is a spoofed image. This task is very different from facial authentication for login purposes and thus comes with its own set of unique requirements. First, employees often do not actively cooperate with the system, so we cannot expect them to align their faces perfectly with the camera. Moreover, we cannot require active liveness detection (e.g., blinking, smiling). Second, the system must function with low-cost, widely available cameras--such as front-facing smartphone cameras--where the user interface appears on the same screen. Third, the system must be capable of serving thousands of employees logging their start times each morning through a centralized server. This requires strong image compression to save bandwidth, and the face-authenticity detection must be computationally efficient to provide feedback within one second, ensuring responsiveness under high load. Fourth, there is a limited amount of training data, particularly examples of fraudulent attempts. We cannot ask users to intentionally spoof the system just to expand the dataset. Importantly, the system is not expected to detect all fraudulent attempts, especially if doing so would result in a high number of false positives, which could disrupt company operations. If one fraud attempt is missed, the individual is likely to try again, increasing the likelihood of being detected on a subsequent attempt. Furthermore, systems designed to detect screens or smartphones displaying a face often failed in our scenario, where only a partial view of the screen might be visible. For example, YOLO struggled to detect partially visible objects effectively.