Next Article in Journal
The Effect of Aromatherapy on Post-Exercise Hypotension: A Pilot Study
Next Article in Special Issue
Image-Level Anti-Personnel Landmine Detection Using Deep Learning in Long-Wave Infrared Images
Previous Article in Journal
A Scalable and Consistent Method for Multi-Component Gravity-Gradient Data Processing
Previous Article in Special Issue
A Multicomponent Face Verification and Identification System
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Face Spoofing Detection with Stacking Ensembles in Work Time Registration System

by
Rafał Klinowski
1 and
Mirosław Kordos
1,2,*
1
Department of Computer Science and Automatics, University of Bielsko-Biala, 43-309 Bielsko-Biała, Poland
2
inEwi, sp. z o. o., ul. 1 Maja 15, 43-300 Bielsko-Biała, Poland
*
Author to whom correspondence should be addressed.
Appl. Sci. 2025, 15(15), 8402; https://doi.org/10.3390/app15158402
Submission received: 29 May 2025 / Revised: 8 July 2025 / Accepted: 18 July 2025 / Published: 29 July 2025
(This article belongs to the Special Issue Application of Artificial Intelligence in Image Processing)

Abstract

This paper introduces a passive face-authenticity detection system, designed for integration into an employee work time registration platform. The system is implemented as a stacking ensemble of multiple models. Each model independently assesses whether a camera is capturing a live human face or a spoofed representation, such as a photo or video. The ensemble comprises a convolutional neural network (CNN), a smartphone bezel-detection algorithm to identify faces displayed on electronic devices, a face context analysis module, and additional CNNs for image processing. The outputs of these models are aggregated by a neural network that delivers the final classification decision. We examined various combinations of models within the ensemble and compared the performance of our approach against existing methods through experimental evaluation.

1. Introduction

In the context of this article, an authentic face refers to the face of a live person in front of a camera. An inauthentic or spoofed face refers to a face shown on an electronic device screen, in video footage, or printed on paper.
This paper introduces a method for verifying the authenticity of faces, intended for use within a work time management system.
The specific issue addressed in the paper is the detection of scenarios in which an employee places a photo or video of another employee in front of the camera to falsely record the attendance of someone who is not physically present. Before detailing the proposed method, we will provide a brief overview of the work time management system, explain how our method interacts with other modules of the system, and outline the requirements it must meet.
The described work time management system is currently in use by several companies. Based on the requirements received, our new facial authenticity recognition module is to be integrated into the system as illustrated in Figure 1.
The facial authenticity recognition module will receive photos of employees whose identities (first and last names) have already been confirmed by the employee identification module, along with the coordinates of their faces within those photos. It must then evaluate the likelihood that the face is authentic (i.e., not spoofed) and forward the result to the work time registration module.
The technical specifications of the work time management system are as follows: the entire system consists of a client-side and a server-side part. The client-side application is implemented in Android, iOS, and in a web browser, and most often uses simple, front smartphone cameras or, sometimes, USB cameras, without infrared, to take pictures of people who register their work time (Figure 1). The server side is based on a server with two AMD EPYC 7282 16-core processors, 256 GB RAM, Nvidia RTX 3050 GPU, 1 TB FDD, and 8 TB HDD, using the Windows Operating System. The client-side application takes the photos, compresses them, and sends them to the server side, where further processing takes place and where our module, presented in this paper, operates.
According to the technical specifications, the authors of this paper were not permitted to modify any system modules other than the one they were developing. They were also not allowed to install infrared-equipped cameras or use Apple’s TrueDepth Camera technology [1] for face recognition. This restriction stemmed from the lack of consent from both clients and the original system developers to alter a well-functioning system and incur additional costs.
The client-side application is activated each time an employee starts or ends their work shift by scanning a QR code. This mechanism ensures that the system does not capture unnecessary photos of individuals merely passing by the camera or images of empty rooms. Once activated, the camera captures photos of the employee and uses the BlazeFace algorithm [2] to locate the face. Only images in which a face is successfully detected are compressed into the WEBP format (5–6 kB) for fast transmission. These are then sent to the server, where they are stored in a database for potential future analysis.
On the server side, the employee identification module processes the incoming photos. It verifies the identity of the person in each image by matching them with the employee associated with the scanned QR code, using the ArcFace algorithm [3]. This module performs with near-perfect accuracy.
Due to the constraints of the system, existing modules could not be modified. As a result, alternatives such as the RetinaFace algorithm [4] could not be integrated for face detection. However, given the high accuracy of the current solution, this limitation was not deemed problematic.
Per the provided specifications, our method receives photos along with face coordinates from the employee identification module, which is already implemented on the server. The image quality is generally suboptimal—photos are highly compressed (WEBP, 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. This limitation necessitated the creation of a custom database containing real and spoofed examples and the development of a bespoke facial authenticity detection 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.
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].
Sthevanie 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.
Chen et al. [26] proposed a two-stream convolutional neural network (TSCNN) that works in two complementary spaces: RGB and multi-scale retinex (MSR) space to take advantage of both texture details in RGB space and illumination invariance of MSR.
Rajeswaran and Kumar [27] developed an approach to convert the image to the L*a*b* color space, which is then passed through HOG (Histogram of Oriented Gradients) for face detection. The detected face is then advanced through the VGG7 CNN architecture for the extraction of features and then classified using a fully connected layer for spoof detection.
Hashemifard et al. [28], instead of completely extracting handcrafted texture features or relying only on deep neural networks, addressed the problem by fusing both wide and deep features in a unified neural architecture. The main idea was to take advantage of the strengths of both methods to derive a well-generalized solution for the problem.
Balamurali [9] performed face detection using MTCNN (Multi-Task Cascaded Convolutional Neural Network) and used the Support Vector Classifier (SVC) to classify real and fake faces.
Ab Wahab et al. [29] presented an Online Attendance System Using Face Recognition to record the daily attendance of students in online classes.
Shu et al. [30] proposed a model that consists of two streams. One stream converts the input RGB images into grayscale ones and conducts multi-scale color inversion to obtain the MSCI images, which are then put into the MobileNet to extract face reflection features. The other stream directly feeds RGB images into the MobileNet to extract face color features. Finally, the features extracted separately from the two branches are fused and then used for face spoofing detection.
Bahia et al. [31] presented face spoofing detection based on the extraction of Heterogeneous Auto-Similarities of Characteristics (HASC) descriptor from the HSV and YCbCr color spaces. The HASC descriptor encodes dependencies between low-level dense features of the color face image using covariance and information-theoretic measures to explore how the features are interrelated in real and fake faces.
Zhang et al. [32] proposed Dual Probabilistic Modeling (DPM), with two dedicated modules, DPM-LQ (Label Quality aware learning) and DPM-DQ (Data Quality aware learning). Both modules were designed based on the assumption that data and labels should form coherent probabilistic distributions. The task of DPM-LQ was to produce feature representations without overfitting to the distribution of noisy semantic labels, and the task of DPM-DQ was to eliminate data noise from ‘False Reject’ and ‘False Accept’ during inference by correcting the prediction confidence of noisy data based on its quality distribution.
Huang et al. [33] since the vision transformer (ViT) has demonstrated significant performance gains in various computer vision tasks by effectively capturing long-range dependencies, recent FAS methods have investigated the potential of leveraging the channel-wise features derived from self-attention (SA) in ViT. While channel-wise features effectively capture discriminative local attention, the complementary information existing between different channels remained undiscovered in prior methods. This paper investigates the unexplored characteristics of complementary channel information within ViT and proposes to incorporate both channel-wise and complementary channel information to learn long-range and discriminative features for FAS. Two modules, Channel Difference Self-Attention (CDSA) and Multi-head Channel Difference Self-Attention (MCDSA), are used to facilitate learning complementary channel characteristics and enhancing both feature discriminability and representational capacity. Using CDSA and MCDSA, the paper presents a custom Channel Difference Transformer (CDformer).
Antil et al. [34] provide a comprehensive review of the state-of-the-art works published over the past decade and discuss the temporal evolution of the FAS/PAD field. The paper reviews different types of attacks against facial authentication systems and covers key features used for FAS models. It also discusses the FAS design approaches followed by the backbone architectures used to design these methods. It also discusses publicly available databases for FAS models, standard protocols, and benchmarking methods. An extensive comparative analysis of experimental results from different PAD methods over the past decade is provided, highlighting limitations and current challenges. It observes a lack of a robust, large-scale general dataset for FAS and underscores the need for new developments in the field.

3. The Proposed Method

This work addresses a specific problem of developing a passive face spoofing detection system that does not require user interaction. The system is tailored for integration with an employee work time registration platform, using photos provided by that system, which were usually taken with a single front smartphone camera without infrared sensors.
The proposed method receives photos from the “Identification of the person in the photo” module, as shown in Figure 1, and detects whether the face visible in the photo is a face of a live person standing in front of a camera or the face was shown to the camera on a photo, video, or in another way.
Our contributions and core innovations comprise:
  • Development of a heterogeneous ensemble combining statistical and deep learning models.
  • Design and implementation of several new models that are used together with already existing models within the ensemble.
  • Designing the CNN architecture presented in Figure 3 and in Table 1, which outperforms both domain-specific and state-of-the-art general-purpose deep learning models. It should be noted that a vital component of this architecture is the pre-processing step.
  • Creation of a smartphone bezel-detection algorithm, which was consistently included in the highest-performing model combinations (see the detailed tables in the Appendix A).
  • Development of a CNN-based smartphone detection model presented in Figure 4 and Table 2.
  • Implementation of a novel face context analysis algorithm.
  • Identification of optimal combinations of models for the ensembles.
  • Integration of the proposed solution into a work time registration system to detect face spoofing attempts.
The proposed method is structured as a two-tiered stacking ensemble, as presented in Figure 5.
The first level of the model consists of the following modules:
  • Smartphone bezel-detection algorithm
  • Smartphone detection using a CNN
  • Face context analysis
  • Image analysis using a CNN
  • (optionally) Image analysis using the second deep neural network
  • (optionally) Image analysis using the third deep neural network
First, each of the modules predicts whether the face visible in the photo is real or spoofed. Then, the predictions of the modules are fed into a neural network that acts as a meta-classifier, producing the final authenticity decision. The individual modules are presented in detail in the following sections.
Explanation why a cascade of models is used for recognition: The experiments showed that the convolutional neural network that we proposed was the best-performing model of the 10 models we tested. However, using a cascade committee of various models in the form of a stacking ensemble yielded further accuracy improvements, justifying our choice of a committee-based approach.

3.1. Smartphone Bezel-Detection Algorithm

The first developed module is a bezel-detection algorithm designed to detect whether a spoof face is displayed on an electronic device such as a smartphone or tablet. It does so by detecting high-contrast edges around the displayed face, and if enough edges of a certain size are detected, then the spoof is detected.
First, pre-processing is performed on each image to normalize it and adapt it to different sizes of input images and positions of faces. The input images undergo resizing to 256 × 256 pixels. Then, the face is detected, and the image is converted to grayscale. An example of this pre-processing is presented in Figure 6.
To detect a bezel, the center point of the detected face is selected, and then the image is analyzed in four directions toward the edges. Iteratively, smaller and smaller fragments of the image are selected, and their average brightness is calculated. If the average is below a set value (in this case, a threshold of 28 for values between 0 and 255), then the fragment is considered a part of the bezel of an electronic device. This is presented in Algorithm 1. If bezels are detected in at least two directions, then the algorithm detects a spoofing attempt. For most cases, this ensures that even if a single bezel is detected due to uniform background colors or elements of the face (like dark hair), the face will not be mistaken for a spoof. This process is depicted in Figure 7.
This algorithm is optimized for computational efficiency to minimize processing time. In addition, all algorithms are executed in parallel, further accelerating the overall analysis.
Algorithm 1: Algorithm used for detecting smartphone bezels.
# Requires a grayscale image with a detected face 
def detect_bezel(gray):
     while current_bezel_size >= min_bezel_size:
         # Select a fragment of the image
         bezel = gray[y_start:y_start + current_bezel_size, x_start:x_end]
         # Check if the average value of the pixels in the fragment is below the threshold
         average = np.mean(bezel)
         if average <= gray_threshold:
             candidates.append((x_start, y_start, x_end, y_start + current_bezel_size, average))
     
        # Move the fragment
         y_start += 1
     
        if y_start + current_bezel_size >= y_end:
             current_bezel_size -= 1
             y_start = 0
			  

3.2. Smartphone Detection Using CNN

Complementing the bezel detector, a smartphone detection algorithm was developed using a convolutional neural network architecture. This module works closely with other parts of the system and helps to detect if a face is displayed on an electronic device, such as a smartphone or a tablet, through features such as shape, bezel, or on-screen elements.
First, a model based on YOLOv4 was developed, but it did not work well in this case, as it was trained to detect whole objects, while in this use case, most of the time, only parts of the device are visible in the camera view. This necessitated the creation of a separate model for this task. The architecture of this model is presented in Figure 4.
The CNN was trained to detect whether there is a smartphone in the image and whether it appears as part of the image (for example, the presented person is holding it), or is used to actively display a spoofed face. Therefore, while this algorithm can provide useful information about the authenticity of the photo, it is best used as part of the whole system.

3.3. Face Context Analysis

This module enhances spoof detection by analyzing regions surrounding the face for inconsistencies. The algorithm aims to detect irregularities in the input image, such as sharp edges or objects, by comparing the area close to the detected face against more distant areas. The advantage of this approach is that it allows the system to more accurately detect spoofed faces displayed on electronic devices or printed by analyzing not just the face, but also its close surroundings.
The area close to the face (the "near" context) is defined as 40% of the width and height of the face outside of the detected face rectangle in all directions. The area further away from the face (the “far” context) is defined as an additional 40% in all directions outside of the close area.
For both areas, edge detection is performed using the Sobel operator. Then, for the detected edges, average pixel intensity is calculated separately for the area closer to the face and further away from it. Then, histograms are computed with the calculated intensities over 64 bins. This method could also be interpreted as a sharpness analysis of the image, as it is based on the amount and intensity of the detected edges. A sample output of this part of the algorithm is shown in Figure 8.
Then, for the histograms generated this way-separately for the close and far areas, four metrics are calculated and compared to each histogram from the dataset already generated this way. Those four metrics are Correlation, Chi-Square, Intersection, and Bhattacharyya distance. The distance between the histograms is then defined as the sum of all four metrics. This calculation is shown in Equation (5). It is important to normalize the metrics by scaling them down to a range of [0; 1], as they all cover different ranges. For Correlation and Intersection, the calculated value is subtracted from 1, as the value of zero means that the histograms are different. This ensures that the value of 1 represents two very different histograms for all matrices and thus a possible spoofing attempt.
c o r r e l a t i o n ( H 1 , H 2 ) = 1 n o r m I ( H 1 ( I ) H 1 ¯ ) ( H 2 ( I ) H 2 ¯ ) I ( H 1 ( I ) H 1 ¯ ) 2 I ( H 2 ( I ) H 2 ¯ ) 2
c h i _ s q u a r e ( H 1 , H 2 ) = n o r m I H 1 ( I ) H 2 ( I ) 2 H 1 ( I )
i n t e r s e c t i o n ( H 1 , H 2 ) = 1 n o r m I min ( H 1 ( I ) , H 2 ( I ) )
b h a t t a c h a r y y a ( H 1 , H 2 ) = n o r m 1 1 H 1 ¯ H 2 ¯ N 2 I H 1 ( I ) · H 2 ( I )
D ( H 1 , H 2 ) = c o r r e l a t i o n ( H 1 , H 2 ) + c h i _ s q u a r e ( H 1 , H 2 ) + i n t e r s e c t i o n ( H 1 , H 2 ) + b h a t t a c h a r y y a ( H 1 , H 2 )
where n o r m ( x ) = 1 1 + e x and H k ¯ = 1 N J H k ( J ) . H 1 and H 2 represent the compared histograms.
Based on these distances, a kNN algorithm is performed to select the three closest neighbors (with the lowest distance to the new histogram), and the spoofing probability is calculated depending on how many of those histograms belong to authentic images and spoof images.
This method strengthens the system’s ability to detect inconsistencies by focusing not only on the face but also on the broader context of the surrounding image. By comparing edge intensities in two areas around the face to known distributions, it is possible to detect sudden changes and edges in the image’s foreground that could indicate a spoof attempt.

3.4. Image Analysis Using CNN

A dedicated CNN was developed to analyze full images and assess face authenticity based on subtle cues, such as face quality, edge presence, and visual consistency. The goal of this module is to analyze elements of the image that would otherwise be difficult to process with algorithms, such as the quality of the face, the appearance of objects or edges close to the face, or the cohesion of the image.
The network architecture consists of two sets of convolutional layers followed by batch normalization layers, ReLU activation functions, pooling, and dropout layers (CONV => RELU => CONV => RELU => POOL => DROPOUT). Then, a single fully connected layer is added to the network. Finally, a SoftMax classifier is deployed to output the probabilities of the face being authentic or spoofed. The full architecture is shown in Figure 3. The face score is determined by the highest of those probabilities.
To better account for real use cases, the images were augmented. The enhancements included a random horizontal flip (mirror flip), a random rotation by up to 5 degrees, and a random change in the brightness and saturation of the image (by up to 10%). Such parameters were intentionally small and were selected to represent real-world conditions. The operations also included scaling the images down to a size of 64 × 64 pixels.
The images used for training and testing were additionally preprocessed by centering them around the detected face; this is to ensure that the network can analyze the face and its close surroundings, and is especially useful if the face is only part of a bigger image. Experimental evaluation has shown a great increase in accuracy after this centering step, compared to when the images are scaled down without centering. This is therefore an integral part of this module that makes it perform better.
The output layer of the convolutional neural network contains a SoftMax classifier, which has two outputs. Each output can be interpreted as the probability that the image belongs to the specific class, which in the case of this system is “authentic” or “spoof”.

3.5. Calculating the Result and Final Probability

A lightweight neural network was developed to aggregate outputs of the above-presented models and to compute the final spoofing probability, instead of relying on pre-defined weights for each module individually. The network takes each partial result and its probability (for example, a result could be “spoof” with probability 80%) and produces a final result, classifying the face as either “authentic” or “spoof” with an associated probability.
The proposed architecture consists of two fully connected layers with ReLU activation functions and an output layer using a sigmoid function classifier (Figure 9 and Table 3). The network accepts floating-point values, which represent the absolute probability of the face being inauthentic. For example, if a face is determined to be authentic with a probability of 80%, then the input would be 20% as the probability that the face is spoofed. The output of the network is a single value [0; 1] that represents the probability that the face is spoofed. If the probability is greater than 0.5, the face is marked as inauthentic.
Due to the sigmoid transfer function in the last layer of this network, its output can be interpreted as the probability that a given face is real. To do this, the network training time should be limited before the predicted values in the final training phase start to be very close to zero or one, but the training time should also be long enough to achieve high classification accuracy.

4. Experimental Evaluation

4.1. Experimental Setup

The proposed face-authenticity detection system was evaluated using four datasets:
  • A small dataset ( N = 477 ) prepared by us, which includes faces captured in the described scenario. There are 242 authentic face images and 234 spoof face images. This is the most realistic database for the purpose of our system. However, this dataset includes faces of individuals who did not agree to publish their images, and for this reason, we cannot share the data. The three remaining datasets are available for download.
  • The open Spoofing Dataset [35] (N = 1054), which includes authentic faces and those displayed on electronic devices (522 authentic images, 532 spoof images).
  • The Large Crowd-collected Facial Anti-Spoofing Dataset by D. Timoschenko et al. [5] (N = 16,284, 1942 authentic images, 14,342 spoof images).
  • Parts of the Celeb-A Dataset by Zhang et al. [6]. This dataset contains over 200 thousand images, which is too much to process with our available resources. Instead, a total of N = 23,052 images were randomly sampled (13,543 authentic images, 9509 spoof images).
Our system was developed in Python using PyTorch, Scikit-Learn, OpenCV, and other libraries. The source code is available at https://github.com/Stukeley/FaceAuthenticityDetection.
Technical specifications of the development and testing system: We used three computers, and the tests were split among them. Two computers were equipped with AMD Ryzen 9 7950X CPU, 128 GB RAM, NVidia RTX4070 GPU, 512 GB FDD, 8 TB HDD, Windows Operating System, and one with 2 x AMD EPYC 7282, 512 GB RAM, NVidia Tesla T4 GPU, 512 GB FDD, 6 TB HDD, Windows Operating System.
We tested our solutions and compared the results with the results obtained with other methods. The other methods include two implementations of facial spoofing detection, for which we were able to find the source code and train them on our data. Unfortunately, many authors either did not provide the source code, which made their methods practically impossible to use, or provided non-working code and did not respond to our emails when we asked for help to run their code. The remaining methods are the newest and well-known deep learning models, where we used the PyTorch implementation.
  • Depth Prediction with CNN [36], a method developed for facial spoofing detection using an open-source implementation by Anand Pandey [37].
  • MobileNet [38] implemented for facial spoofing detection in an open-source code by Nguyen Dinh Quy [39].
  • The ConvNeXt architecture [40] without pre-trained weights for the “BASE” model, using PyTorch implementation.
  • The EfficientNetV2 architecture [41] without pre-trained weights for the “S” model size, using PyTorch implementation.
  • The Vision Transformer architecture [42] without pre-trained weights for the b_16 architecture.
  • The Swin Transformer architecture [43] without pre-trained weights for the V2_S architecture.
To evaluate each system, five runs of a stratified 5-fold cross-validation were performed, starting each time from a different random data split and a different seed for training the models to account for stochasticity in training and testing performance, for a total of 25 training/testing pairs per dataset for each model. In a given cross-validation run, each model was trained using the same data split.
For the bezel-detection algorithm, no training was performed at this step; instead, the parameters, including the grayscale threshold for detected bezels, the minimum size, and the number of bezels detected to consider an image spoofed, were empirically adjusted based on images from previous evaluations.
The following models: ConvNeXt, EfficientNetV2, Vision Transformer, and Swin Transformer were trained with the same parameters: L R = 0.001 , B S = 32 , E P O C H S = 10 , D R O P O U T _ R A T E = 0.25 , which were the default parameters in the PyTorch implementations we used. The image size for all models was set to (64 × 64), except for the Vision Transformer and Swin Transformer architectures, which were instead trained and evaluated using images of size (224 × 224), as these architectures were built to work with larger image sizes. Values different from those chosen were also tested, resulting in similar or worse performance. No pre-trained weights were used, as this makes the comparison between the proposed system and other tested architectures more reliable. All architectures were trained and evaluated on the same datasets.

4.2. Experimental Results

First, we present the partial results of individual models of the proposed system as well as of other tested systems. Then, the results obtained with different stacking and voting committees are presented. The following configurations were tested:
  • Our four developed modules: bezel detection, smartphone detection CNN, context analysis, and image analysis CNN (baseline).
  • Other methods used for face spoofing analysis: Depth prediction, MobileNet, ConvNeXt, EfficientNetV2, Vision Transformer, and Swin Transformer.
  • Various combinations of the above modules and methods in the stacking ensemble (between 2 and 7 models).
  • Various combinations of the above modules and methods in the voting ensemble (between 2 and 7 models).
The obtained results, including the ensembles with 3, 4, 5, 6, and 7 models with the best accuracy across all datasets, are presented in Table 4. The ensembles were chosen based on mean rank across the four datasets, and we selected the best 3-model ensemble, the best 4-model ensemble, and so forth. The ranks and classification accuracy of the ensembles are presented in Table A3.
We have performed hyperparameter optimization for our own neural network models (smartphone detection CNN and image analysis CNN) by varying the learning rate, batch size, epoch count, and dropout rate over the baseline values of L R = 0.001 , B S = 32 , E P O C H S = 10 , D R O P O U T _ R A T E = 0.25 . The reason for using these baseline values as a starting point was to start from the same hyperparameters as the other models (ConvNeXt, EfficientNetV2, Vision Transformer, and Swin Transformer) used. The results are presented in Table A1 and Table A2 in the Appendix A.
Based on the experimental results presented in Table A1, we determined the set of optimal hyperparameters with which the Smartphone Detection CNN and the Image Analysis CNN obtained the highest classification accuracies. The optimal hyperparameters for the smartphone detection CNN: L R = 0.0001 , B S = 32 , E P O C H S = 10 , D R O P O U T _ R A T E = 0.25 The optimal hyperparameters for the image analysis CNN: L R = 0.001 , B S = 32 , E P O C H S = 20 , D R O P O U T _ R A T E = 0.25
As can be seen from Table A2, when the Smartphone Detection CNN and the Image Analysis CNN are not used as standalone models but as part of a stacking ensemble, the hyperparameter optimization still improves the results, though the differences are much smaller, especially for the two largest datasets.
In the analysis conducted here, the threshold of the final classifier network output above which a face is considered spoofed was set to 0.50 . If the probability returned by the network is greater than or equal to 50%, then the system predicts the face as spoofed. Although other threshold values were tested, the results were not sensitive to the change in the threshold value, and for that reason, a threshold value of 50% could be used, as presented in Table A7, Table A8, Table A9 and Table A10 in the Appendix A.
Two conclusions can be drawn from Table 4. First, the best-performing models are stacking ensembles. Second, the best ensembles consisting of between three and seven models include some or all of our proposed methods. The complete results for various combinations of ensembles can be seen in Table A3.
To test the statistical significance of the obtained results, two tests were used:
  • A one-way ANOVA, testing a null hypothesis: “There is no difference among group means”. α = 0.05
  • A rank-based Kruskal–Wallis, testing a null hypothesis: “There is no difference among medians of populations from which the groups are taken”. α = 0.05
To perform these tests, the accuracies obtained for each fold, random seed, and dataset for the ensembles and other methods presented in Table 4 were collected, amounting to a total of 100 values per system for a total of 11 systems. Then, the necessary metrics were calculated based on those values.
  • For the ANOVA test: f = 116.36 , p = 1.73 × 10 145 , which is significantly below the accepted threshold. Therefore, the null hypothesis can be rejected.
  • For the Kruskal–Wallis test: h = 476.42 , p = 4.80 × 10 96 , which is also significantly below the accepted threshold. Therefore, the null hypothesis can be rejected.
This proves that the tested systems differ and that the differences in the results are statistically significant.
The conclusion is that the stacking ensemble increases the accuracy of the system. Adding the ConvNeXt network had a bigger impact on prediction accuracy than further adding other networks, which might be a result of the individual accuracy of those networks being lower than that of ConvNeXt. Only for the Small dataset, including low-accuracy models (ConvNeXt, Vision Transformer-ViT) in the ensemble significantly increases the obtained accuracy.
The results indicate that the system is effective in recognizing spoofing attempts while simultaneously displaying high accuracy in correctly identifying authentic faces. The diversity of datasets used to evaluate the system’s performance shows that it is effective in various cases, with different backgrounds and appearances of the people in front of the camera, as well as that it performs significantly better than other systems when using a small dataset for its training.
As part of further testing, all possible ensemble combinations of the seven methods (Bezel, Smartphone Detection CNN, Context, Image Analysis CNN, EfficientNetV2, ConvNeXt, and ViT) were evaluated in an attempt to find the optimal one, separately for stacking and voting ensembles.
Unfortunately, it was not possible to use the Depth Prediction and MobileNet implementations as parts of the ensemble, as the way these models were implemented made it hard to obtain separate results for each input image, rather than aggregate results for the entire datasets, which was needed to test the ensembles. The full results can be viewed in Table A3 in the Appendix A. As can be seen from the results, the best results were obtained for ensembles encompassing more methods, and removing methods from the ensemble significantly affects the variation of the obtained results in cross-validation. The results also show that stacking ensembles are more effective than voting ensembles.
To test the impact of the selected threshold on the obtained results, multiple values were tested, in increments of 0.05 , and the key metrics of accuracy, precision, recall, and F1-score were noted for the final ensemble (consisting of four implemented methods, ConvNeXt, EfficientNetV2, and Vision Transformer). The results are presented in Table A7, Table A8, Table A9 and Table A10. These results were obtained for a different random seed value; therefore, they differ from the results presented in earlier contexts. The metrics have been calculated for the spoofed faces (positive values).
The obtained results for all metrics are very similar for different threshold values. This is especially noticeable for the larger datasets, where the differences between values are within 1%. This signals that the outputs obtained from the final neural network are often close to 0.00 or 1.00 .
We have applied Platt scaling to the outputs of the final neural network for the ensemble consisting only of our own methods (Bezel, Smartphone Detection CNN, Context, and Image Analysis CNN). This was performed in an attempt to calibrate the final outputs based on expected results. The implementation used a logistic regression model that was trained on the outputs of the final neural network and the expected classes. However, the obtained results did not improve the classification performance, showing slightly lower or slightly higher accuracy. Since the obtained differences in accuracy are inconsistent and minimal, the technique does not provide a clear benefit. The obtained results are presented in Table 5.
An additional commercial system was tested—“A Personalized Benchmark for Face Anti-spoofing” (D. Belli et al.) [44]. However, it did not offer the possibility to train the model using the provided data. Its accuracy was not satisfying, as the system frequently was not able to detect faces in the provided images, and incorrectly marked most authentic images as spoofed. This system was tested for all images from the first, small dataset (N = 477). The obtained results are in Table 6.
Another tested commercial system is the Doubango 3D Passive face liveness detection [45]. However, it was only possible to test a few photos without paying for the system. The system performed perfectly when we showed our face or its photo to a laptop camera. However, for the photos from our work time registration system, the model predicted most authentic faces as spoofed, and even marked some as “deepfake”, with a very high probability. Unfortunately, it was not possible to test the system with more data to obtain more reliable metrics.

5. Conclusions

We proposed a passive face spoofing detection method designed to operate in a work time registration system under real-world constraints: variable lighting, low image quality (6 kB webp format), and no possibility to invest in additional hardware (e.g., infrared). Our approach effectively balances performance, flexibility, and computational efficiency, making it a viable solution for real-world employee authentication systems.
The presented method is based on a stacking committee, where each member model evaluates different aspects of the photo. Experimental evaluation showed that the use of a stacking committee improves the accuracy of the entire system. We experimentally evaluated 240 different committees and different threshold parameters for the final classifier in the committee.
Additionally, the use of a centering step in the CNN analysis improves the accuracy of that module, but not implementing that step only slightly affects the total accuracy of the system. The use of a committee should also increase the adaptability of the system to real-world conditions, as different methods can detect different types of spoofing attacks.
The modular nature of our design supports future expansion by adding additional models. This will be the subject of our future work. Specifically, we plan to examine the possibility of adding new models to the committee, to evaluate grayscale vs. RGB photos as CNN-based network input, and to train the final neural network with different parameters. Moreover, the acquisition and generation of new data specific to the industrial conditions of the employee registration environment are important aspects to further improve the system.

Author Contributions

Conceptualization, M.K. and R.K.; methodology, M.K. and R.K.; software, M.K. and R.K.; validation, M.K. and R.K.; formal analysis, M.K. and R.K.; investigation, M.K. and R.K.; resources, M.K. and R.K.; data curation, M.K. and R.K.; writing—original draft preparation, M.K. and R.K.; writing—review and editing, M.K. and R.K.; visualization, M.K. and R.K.; supervision, M.K. and R.K.; project administration, M.K. and R.K.; funding acquisition, M.K. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by The National Centre for Research and Development of Poland (NCBiR), project nr POIR.01.01.01-00-1144/19.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The data and source code used in the experiments are available at https://github.com/Stukeley/FaceAuthenticityDetection.

Conflicts of Interest

Author Mirosław Kordos was employed by the company inEwi, sp. z o. o. The remaining author declares that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

Appendix A

Table A1. Obtained accuracies [%] in a 5-fold cross-validation for two proposed convolutional neural networks (Smartphone Detection CNN and Image Analysis CNN) with different hyperparameter combinations (learning rate (LR), batch size (BS), epochs, and dropout rate).
Table A1. Obtained accuracies [%] in a 5-fold cross-validation for two proposed convolutional neural networks (Smartphone Detection CNN and Image Analysis CNN) with different hyperparameter combinations (learning rate (LR), batch size (BS), epochs, and dropout rate).
LRBSEpochsDropoutSmartphone CNNImage CNN
Small dataset
0.0132100.2568.07 ± 5.5673.95 ± 2.70
0.00132100.2580.74 ± 4.2885.92 ± 2.19
0.00116100.2583.57 ± 4.1287.80 ± 3.80
0.00164100.2577.47 ± 2.9787.55 ± 3.86
0.00132150.2580.51 ± 4.6486.62 ± 3.31
0.00132200.2585.20 ± 2.6889.91 ± 1.71
0.00132100.1580.51 ± 3.0481.00 ± 2.63
0.00132100.3582.16 ± 2.0382.86 ± 3.48
0.000132100.2588.73 ± 3.0581.22 ± 3.24
Spoofing Dataset
0.0132100.2569.86 ± 2.7284.59 ± 1.80
0.00132100.2586.70 ± 1.9292.25 ± 0.77
0.00116100.2588.13 ± 1.6491.67 ± 1.86
0.00164100.2581.34 ± 2.2092.06 ± 1.50
0.00132150.2588.42 ± 1.9793.01 ± 0.83
0.00132200.2586.12 ± 0.6892.25 ± 1.77
0.00132100.1586.22 ± 2.0690.95 ± 0.63
0.00132100.3586.41 ± 1.2391.58 ± 2.32
0.000132100.2591.10 ± 1.2090.81 ± 2.19
Large Crowd-collected
0.0132100.2587.80 ± 0.3485.03 ± 0.19
0.00132100.2590.63 ± 0.5598.26 ± 0.09
0.00116100.2590.93 ± 0.3398.16 ± 0.12
0.00164100.2589.91 ± 0.1898.24 ± 0.27
0.00132150.2590.16 ± 0.4598.50 ± 0.14
0.00132200.2590.96 ± 0.1098.64 ± 0.13
0.00132100.1590.16 ± 0.5297.10 ± 0.15
0.00132100.3590.16 ± 0.5397.33 ± 0.29
0.000132100.2591.74 ± 0.2097.35 ± 0.24
CelebA
0.0132100.2579.84 ± 0.6284.57 ± 0.38
0.00132100.2589.47 ± 0.5293.80 ± 0.39
0.00116100.2590.99 ± 0.3494.39 ± 0.13
0.00164100.2586.72 ± 0.3793.17 ± 0.21
0.00132150.2590.10 ± 0.5095.16 ± 0.30
0.00132200.2589.94 ± 0.2895.87 ± 0.11
0.00132100.1588.75 ± 0.4994.61 ± 0.13
0.00132100.3589.45 ± 0.3694.95 ± 0.31
0.000132100.2588.83 ± 0.2792.87 ± 0.21
Table A2. Obtained accuracies [%] in a 5-fold cross-validation for the stacking ensembles from Table 4 with default and optimal hyperparameters for our models-Smartphone Detection CNN (S) and Image Analysis CNN (N). The other models used in the ensembles: Bezel (B), Context (C), EfficientNetV2 (E), ConvNeXt (X), and Vision Transformer (V).
Table A2. Obtained accuracies [%] in a 5-fold cross-validation for the stacking ensembles from Table 4 with default and optimal hyperparameters for our models-Smartphone Detection CNN (S) and Image Analysis CNN (N). The other models used in the ensembles: Bezel (B), Context (C), EfficientNetV2 (E), ConvNeXt (X), and Vision Transformer (V).
CombinationDefault ParametersOptimal Parameters
Small dataset
C,N,E89.20 ± 1.7191.78 ± 1.29
S,C,N,E91.31 ± 2.5491.02 ± 3.60
S,C,N,X,E90.84 ± 3.2891.55 ± 3.44
B,S,C,N,X,E91.78 ± 2.6991.55 ± 3.61
B,S,C,N,X,E,V91.78 ± 2.3691.55 ± 3.61
Spoofing Dataset
C,N,E95.56 ± 0.5696.27 ± 1.30
S,C,N,E96.36 ± 0.8396.84 ± 0.23
S,C,N,X,E96.46 ± 0.7897.22 ± 0.36
B,S,C,N,X,E96.75 ± 0.9897.03 ± 0.36
B,S,C,N,X,E,V96.56 ± 1.2697.13 ± 0.68
Large Crowd-collected
C,N,E98.94 ± 0.1299.02 ± 0.08
S,C,N,E98.98 ± 0.2399.13 ± 0.06
S,C,N,X,E99.05 ± 0.1799.12 ± 0.06
B,S,C,N,X,E99.01 ± 0.2299.14 ± 0.11
B,S,C,N,X,E,V99.00 ± 0.2099.16 ± 0.09
CelebA
C,N,E99.04 ± 0.1099.10 ± 0.13
S,C,N,E99.15 ± 0.0899.18 ± 0.07
S,C,N,X,E99.21 ± 0.0699.25 ± 0.10
B,S,C,N,X,E99.20 ± 0.1099.23 ± 0.07
B,S,C,N,X,E,V99.17 ± 0.1199.26 ± 0.10
Table A3. All obtained accuracies [%] for different stacking and voting ensemble combinations over five runs of a 5-fold cross-validation, part 1. The rank was obtained by averaging the position for all four datasets, for each combination. The models used are Bezel (B), Smartphone Detection CNN (S), Context (C), Image Analysis CNN (N), EfficientNetV2 (E), ConvNeXt (X), and Vision Transformer (V).
Table A3. All obtained accuracies [%] for different stacking and voting ensemble combinations over five runs of a 5-fold cross-validation, part 1. The rank was obtained by averaging the position for all four datasets, for each combination. The models used are Bezel (B), Smartphone Detection CNN (S), Context (C), Image Analysis CNN (N), EfficientNetV2 (E), ConvNeXt (X), and Vision Transformer (V).
CombinationSmallSpoofingLargeCelebARank
B,S,C,N,X,E,V (stacking)92.62 ± 3.0596.88 ± 1.4898.99 ± 0.1799.20 ± 0.122.75
S,C,N,X,E (stacking)92.15 ± 3.3696.85 ± 1.5199.00 ± 0.1799.19 ± 0.104.25
B,S,C,N,X,E (stacking)92.46 ± 3.1796.82 ± 1.5498.99 ± 0.1999.18 ± 0.124.5
B,S,C,N,E (stacking)92.63 ± 3.0496.88 ± 1.5398.95 ± 0.2099.12 ± 0.137.25
S,C,N,X,E,V (stacking)91.69 ± 3.7396.93 ± 1.3998.98 ± 0.1899.19 ± 0.107.5
B,S,C,N,E,V (stacking)92.80 ± 3.2196.80 ± 1.5798.95 ± 0.1999.10 ± 0.139
S,C,N,E,V (stacking)92.11 ± 4.0496.89 ± 1.4498.94 ± 0.2199.12 ± 0.1210.75
S,C,N,E (stacking)92.29 ± 3.1696.77 ± 1.4698.93 ± 0.2299.14 ± 0.1111.5
B,S,C,N,X (stacking)91.61 ± 2.6796.12 ± 1.3198.99 ± 0.1799.17 ± 0.1111.75
B,C,N,X,E,V (stacking)92.04 ± 3.4796.30 ± 1.6698.95 ± 0.1499.09 ± 0.1013.25
B,S,C,N,X,V (stacking)91.43 ± 2.9196.07 ± 1.3398.99 ± 0.1799.17 ± 0.0913.75
C,N,X,E,V (stacking)91.28 ± 4.0096.38 ± 1.6998.97 ± 0.1599.05 ± 0.1516.5
S,C,N,X (stacking)90.92 ± 2.8695.96 ± 1.2799.01 ± 0.1899.16 ± 0.1217
B,C,N,X,E (stacking)91.69 ± 3.8396.18 ± 1.6698.95 ± 0.1499.08 ± 0.1317
S,C,N,X,V (stacking)90.73 ± 3.0595.88 ± 1.2898.99 ± 0.1699.16 ± 0.0920.25
B,C,N,E,V (stacking)92.16 ± 3.6696.34 ± 1.6698.89 ± 0.2198.94 ± 0.1820.5
B,S,C,N,V (stacking)91.48 ± 2.7295.91 ± 1.3998.94 ± 0.2099.09 ± 0.1321.25
B,S,C,N (stacking)91.29 ± 2.7295.86 ± 1.3498.95 ± 0.2199.11 ± 0.1222
B,C,N,E (stacking)91.85 ± 4.0796.18 ± 1.6598.91 ± 0.2198.93 ± 0.1723
C,N,X,E (stacking)90.61 ± 3.8096.25 ± 1.8098.95 ± 0.1699.05 ± 0.1123.25
S,C,N,V (stacking)90.73 ± 3.0695.93 ± 1.3898.94 ± 0.2299.07 ± 0.1325
C,N,E,V (stacking)91.19 ± 4.2896.30 ± 1.6298.89 ± 0.2198.96 ± 0.1827
C,N,E (stacking)91.18 ± 3.9596.35 ± 1.6998.89 ± 0.2298.94 ± 0.1727
S,C,N (stacking)90.65 ± 2.9995.81 ± 1.3298.94 ± 0.2399.04 ± 0.1029
B,C,N,X (stacking)89.75 ± 3.8094.43 ± 1.9798.96 ± 0.1698.98 ± 0.1038.25
B,C,N,X,V (stacking)89.40 ± 4.0594.33 ± 2.0098.97 ± 0.1598.98 ± 0.1040.25
B,S,C,X,E,V (stacking)90.02 ± 4.1595.97 ± 1.7496.53 ± 0.4199.03 ± 0.1241.25
B,S,N,X,E (stacking)91.74 ± 3.2295.62 ± 1.8898.37 ± 0.2997.15 ± 0.2841.25
B,S,C,X,E (stacking)90.11 ± 4.1295.80 ± 1.7896.57 ± 0.4299.01 ± 0.1243.75
B,S,N,X,E,V (stacking)91.60 ± 3.4695.55 ± 2.1298.37 ± 0.3297.10 ± 0.2643.75
S,N,X,E,V (stacking)91.55 ± 3.9095.58 ± 2.2598.37 ± 0.3197.09 ± 0.2744
B,S,N,E (stacking)92.16 ± 3.2895.74 ± 2.1298.30 ± 0.3696.68 ± 0.3444.75
S,N,X,E (stacking)91.40 ± 3.7095.68 ± 1.9698.35 ± 0.3297.10 ± 0.2845.25
B,S,N,E,V (stacking)92.12 ± 3.2495.69 ± 2.1998.31 ± 0.3496.63 ± 0.3545.75
C,N,X (stacking)87.78 ± 4.2094.43 ± 2.0198.96 ± 0.1699.00 ± 0.1347.75
C,N,X,V (stacking)87.97 ± 3.8594.33 ± 2.0598.96 ± 0.1598.99 ± 0.1047.75
B,C,N (stacking)89.76 ± 3.9694.38 ± 1.9298.90 ± 0.2298.84 ± 0.1347.75
B,C,N,V (stacking)89.73 ± 3.8794.31 ± 1.9998.91 ± 0.2198.87 ± 0.1248.5
S,C,X,E,V (stacking)88.75 ± 5.0295.87 ± 1.8096.46 ± 0.3999.01 ± 0.1350.5
S,N,E,V (stacking)91.74 ± 3.8695.59 ± 2.1898.29 ± 0.3796.64 ± 0.3450.5
S,C,E,V (stacking)89.16 ± 4.3896.04 ± 1.8396.13 ± 0.3598.93 ± 0.1850.75
S,C,X,E (stacking)88.80 ± 4.7095.86 ± 1.8096.49 ± 0.4398.99 ± 0.1151
B,S,C,E,V (stacking)89.60 ± 4.3895.84 ± 1.7896.13 ± 0.3798.93 ± 0.1752
S,C,N,E (voting)91.92 ± 3.4796.27 ± 1.5494.67 ± 1.3098.02 ± 0.3553.25
B,S,C,N,E (voting)92.04 ± 3.2694.61 ± 2.1996.70 ± 0.4097.37 ± 0.5154
S,N,E (stacking)91.21 ± 3.8195.66 ± 2.0898.29 ± 0.3696.66 ± 0.3654
B,S,C,E (stacking)89.44 ± 4.3895.84 ± 1.7396.08 ± 0.3798.91 ± 0.1654.5
S,C,N (voting)90.48 ± 2.1994.87 ± 1.7197.14 ± 0.3498.69 ± 0.1756.25
S,C,E (stacking)88.70 ± 5.0095.93 ± 1.9396.11 ± 0.3798.92 ± 0.1556.5
C,N (stacking)88.02 ± 3.5894.43 ± 1.9498.89 ± 0.2298.83 ± 0.1357
B,S,N,X,V (stacking)91.10 ± 2.1193.98 ± 1.4398.36 ± 0.3297.01 ± 0.3457.75
B,N,X,E,V (stacking)91.24 ± 4.2194.71 ± 2.1998.31 ± 0.3196.42 ± 0.2558.75
C,N,V (stacking)87.88 ± 3.6894.33 ± 2.0098.88 ± 0.2298.86 ± 0.1459
B,N,X,E (stacking)90.58 ± 4.7994.73 ± 2.1198.31 ± 0.3496.39 ± 0.3061.75
B,S,N,X (stacking)90.42 ± 2.9193.67 ± 1.6898.36 ± 0.3296.97 ± 0.3662.75
C,N,E (voting)89.00 ± 3.8495.47 ± 1.6696.53 ± 0.3898.10 ± 0.2263
N,X,E,V (stacking)89.69 ± 4.7994.69 ± 2.2298.31 ± 0.3196.42 ± 0.3265
B,S,N,V (stacking)91.41 ± 2.8593.85 ± 1.5898.30 ± 0.3796.32 ± 0.2365.25
S,N,X,V (stacking)88.89 ± 3.3693.93 ± 1.3598.38 ± 0.3296.97 ± 0.3966.5
Table A4. All obtained accuracies [%] for different stacking and voting ensemble combinations over five runs of a 5-fold cross-validation, part 2.
Table A4. All obtained accuracies [%] for different stacking and voting ensemble combinations over five runs of a 5-fold cross-validation, part 2.
CombinationSmallSpoofingLargeCelebARank
B,N,E,V (stacking)91.51 ± 3.9194.64 ± 2.2798.26 ± 0.3395.59 ± 0.6666.5
B,S,N (stacking)91.38 ± 2.8593.45 ± 1.7098.30 ± 0.3696.39 ± 0.2567
S,N,X (stacking)88.64 ± 3.2393.72 ± 1.7698.37 ± 0.3096.98 ± 0.3668.75
N,X,E (stacking)89.26 ± 5.3694.75 ± 2.2598.28 ± 0.3396.39 ± 0.2769.25
B,C,X,E,V (stacking)86.50 ± 6.0395.15 ± 2.0996.10 ± 0.4298.93 ± 0.1270
B,N,E (stacking)91.38 ± 4.2994.60 ± 2.2398.24 ± 0.3595.58 ± 0.6770
B,S,C,X,V (stacking)87.37 ± 3.2593.47 ± 1.9396.42 ± 0.4298.98 ± 0.1070.75
B,C,X,E (stacking)86.08 ± 6.0395.17 ± 2.0496.11 ± 0.4498.91 ± 0.1071.25
C,N (voting)85.89 ± 3.6594.49 ± 1.7398.20 ± 0.2398.89 ± 0.1471.25
B,S,C,X (stacking)87.01 ± 3.5293.37 ± 1.9696.41 ± 0.4498.95 ± 0.1173.75
N,E,V (stacking)89.70 ± 4.8794.75 ± 2.2698.25 ± 0.3495.57 ± 0.6774.25
C,X,E,V (stacking)84.62 ± 6.9395.29 ± 1.9296.03 ± 0.4698.95 ± 0.1075.25
S,N,V (stacking)89.07 ± 2.9593.94 ± 1.5698.28 ± 0.3796.39 ± 0.2775.75
S,N (stacking)89.05 ± 3.0393.53 ± 1.7898.30 ± 0.3796.35 ± 0.2376.25
B,C,E,V (stacking)86.78 ± 5.8095.15 ± 2.0495.61 ± 0.4498.63 ± 0.3677.75
N,E (stacking)89.31 ± 5.3194.56 ± 2.2898.25 ± 0.3495.57 ± 0.7078
S,C,X,V (stacking)85.36 ± 3.7793.50 ± 1.8396.32 ± 0.4398.96 ± 0.1178.25
S,C,X (stacking)85.29 ± 3.3393.44 ± 1.9496.33 ± 0.4498.94 ± 0.1180.75
C,X,E (stacking)84.14 ± 7.1995.29 ± 2.0095.98 ± 0.4498.89 ± 0.1481.5
B,C,E (stacking)86.45 ± 5.8995.07 ± 2.1895.57 ± 0.4798.59 ± 0.3481.5
B,S,C,N (voting)90.14 ± 3.0491.05 ± 2.0798.06 ± 0.2397.22 ± 0.3181.5
B,S,C,V (stacking)86.59 ± 3.0693.46 ± 1.9895.89 ± 0.3798.84 ± 0.1383.25
B,S,C (stacking)86.97 ± 3.0693.43 ± 1.9895.84 ± 0.3798.79 ± 0.1384.25
S,C,N,X,E (voting)89.00 ± 3.8094.19 ± 2.2394.27 ± 1.3297.30 ± 0.3884.25
S,N,E (voting)91.24 ± 3.9294.94 ± 2.1093.40 ± 1.4595.73 ± 0.5484.75
B,N,X,V (stacking)89.10 ± 3.8991.46 ± 1.9998.32 ± 0.3296.01 ± 0.5685.75
C,E,V (stacking)84.71 ± 7.0695.11 ± 2.0895.53 ± 0.4598.62 ± 0.3587
S,C,N,E,V (voting)89.06 ± 2.9594.29 ± 2.3092.78 ± 1.6397.37 ± 0.3788
C,E (stacking)84.57 ± 6.9094.98 ± 2.2495.50 ± 0.4698.58 ± 0.3389
B,C,N,E (voting)89.11 ± 2.6793.30 ± 2.6395.49 ± 3.4096.64 ± 0.8189.5
S,C,V (stacking)85.22 ± 3.6593.44 ± 1.8995.89 ± 0.3498.83 ± 0.0990
S,C,E (voting)88.00 ± 4.2195.36 ± 2.1892.54 ± 1.1296.92 ± 0.4690
S,C (stacking)85.08 ± 3.7193.40 ± 1.9795.82 ± 0.3598.78 ± 0.1493
B,N,X (stacking)88.37 ± 4.4291.35 ± 1.8898.31 ± 0.3395.99 ± 0.5593.5
N,X,V (stacking)86.73 ± 3.9991.53 ± 2.0598.31 ± 0.3496.00 ± 0.5394.25
B,C,N (voting)86.66 ± 4.4190.74 ± 2.1697.42 ± 0.3597.17 ± 0.3096.75
B,N,V (stacking)88.16 ± 4.0791.56 ± 1.8998.26 ± 0.3494.80 ± 0.30100.25
B,S,C,N,X,E (voting)88.72 ± 3.4590.94 ± 2.7795.35 ± 0.9396.98 ± 0.58103
B,S,C,N,E,V (voting)88.82 ± 3.1491.35 ± 3.1994.20 ± 1.3896.98 ± 0.55103.5
N,X (stacking)86.16 ± 4.4791.35 ± 1.9998.29 ± 0.3395.92 ± 0.57103.5
S,N (voting)89.29 ± 3.6992.39 ± 2.2693.90 ± 0.7995.69 ± 0.34103.5
B,N (stacking)88.04 ± 4.4291.36 ± 1.8898.27 ± 0.3694.78 ± 0.27104.25
S,C (voting)84.41 ± 3.3492.34 ± 1.9194.73 ± 0.4098.71 ± 0.20104.75
B,S,C,E (voting)88.93 ± 4.0192.66 ± 2.8292.49 ± 2.9296.06 ± 0.79105.5
B,C,N,X,E (voting)85.67 ± 4.5690.41 ± 2.6496.55 ± 0.4096.67 ± 0.66107
N,V (stacking)86.58 ± 4.0991.40 ± 2.0798.24 ± 0.3494.79 ± 0.29110.5
B,S,C,N,X (voting)86.06 ± 4.4086.84 ± 3.4297.05 ± 0.4697.00 ± 0.57110.75
B,S,N,E (voting)91.21 ± 3.9892.53 ± 2.7991.93 ± 3.1294.68 ± 0.78112
B,C,X (stacking)80.06 ± 3.6591.62 ± 2.0995.90 ± 0.4898.74 ± 0.19112.25
S,C,N,X (voting)85.64 ± 3.7790.39 ± 2.2194.89 ± 0.8197.89 ± 0.25112.25
B,C,X,V (stacking)80.11 ± 4.4891.45 ± 2.2695.92 ± 0.4998.79 ± 0.13114.5
C,X,V (stacking)77.60 ± 3.9391.62 ± 2.1495.85 ± 0.4698.82 ± 0.12115
C,X (stacking)77.83 ± 4.2291.93 ± 1.8395.84 ± 0.5098.74 ± 0.18115.25
B,S,C,N,V (voting)85.28 ± 5.0088.25 ± 3.7496.01 ± 0.4596.68 ± 0.24115.75
B,C,N,E,V (voting)86.07 ± 4.1890.69 ± 3.1695.64 ± 0.7196.48 ± 0.55115.75
C,N,X,E (voting)84.85 ± 4.9492.88 ± 2.3493.43 ± 1.4495.91 ± 0.43117.25
B,C (stacking)80.28 ± 3.7591.72 ± 1.9395.22 ± 0.4398.19 ± 0.18117.75
B,C,V (stacking)80.16 ± 3.5591.51 ± 2.3095.30 ± 0.4598.33 ± 0.18118.5
C,N,X (voting)79.35 ± 4.0388.61 ± 2.3597.03 ± 0.3897.96 ± 0.26119
S,C,N,V (voting)84.65 ± 3.3391.06 ± 2.8592.93 ± 0.8897.52 ± 0.22119.75
B,S,X,E,V (stacking)88.24 ± 5.5792.59 ± 3.3392.31 ± 0.8294.15 ± 0.46121.75
Table A5. All obtained accuracies [%] for different stacking and voting ensemble combinations for five runs of a 5-fold cross-validation, part 3.
Table A5. All obtained accuracies [%] for different stacking and voting ensemble combinations for five runs of a 5-fold cross-validation, part 3.
CombinationSmallSpoofingLargeCelebARank
B,S,C,N,X,E,V (voting)86.19 ± 4.4788.13 ± 4.9893.64 ± 1.4496.60 ± 0.53123.25
B,S,N (voting)89.29 ± 3.0187.68 ± 2.5496.49 ± 0.4091.81 ± 0.62123.5
C,V (stacking)77.92 ± 4.1191.38 ± 2.3895.25 ± 0.4798.32 ± 0.21124.5
S,X,E,V (stacking)86.82 ± 5.8992.63 ± 3.5092.21 ± 0.7994.16 ± 0.43126.25
B,S,X,E (stacking)87.86 ± 5.5492.51 ± 3.4592.28 ± 0.8094.07 ± 0.49126.5
B,S,N,X,E (voting)87.64 ± 4.3187.92 ± 2.9394.17 ± 0.9994.84 ± 0.85129.75
C,N,V (voting)78.65 ± 4.1789.24 ± 3.1896.00 ± 0.3196.70 ± 0.26130.5
S,X,E (stacking)86.49 ± 6.1392.55 ± 3.4792.18 ± 0.7394.06 ± 0.49130.75
C,N,E,V (voting)84.45 ± 4.6892.69 ± 2.3091.44 ± 2.1495.68 ± 0.37132
S,C,X,E (voting)83.66 ± 5.4992.02 ± 2.5592.18 ± 1.3795.88 ± 0.39132.5
B,S,N,E,V (voting)87.94 ± 3.7388.66 ± 3.3692.69 ± 1.3694.37 ± 0.59134
S,N,X,E (voting)85.98 ± 5.1691.57 ± 2.8891.76 ± 1.6094.88 ± 0.51134.25
S,C,N,X,E,V (voting)85.10 ± 4.2090.16 ± 3.9291.56 ± 1.6296.60 ± 0.38134.75
B,S,E (stacking)88.51 ± 5.1592.64 ± 3.4091.04 ± 0.7092.00 ± 1.32135.5
C,X,E (voting)81.31 ± 5.4092.36 ± 2.2692.49 ± 1.0395.87 ± 0.46136.25
B,S,E,V (stacking)87.91 ± 5.5592.57 ± 3.3791.15 ± 0.6292.23 ± 1.44137.5
B,S,C,X,E (voting)83.93 ± 4.9388.23 ± 3.3693.58 ± 0.9495.72 ± 0.81138
N,X,E (voting)84.40 ± 5.0791.04 ± 2.4193.41 ± 1.2694.90 ± 0.52138.25
B,S,C,E,V (voting)85.38 ± 4.5088.87 ± 3.6392.03 ± 1.2295.59 ± 0.58138.5
C,N,X,E,V (voting)81.75 ± 3.4389.34 ± 4.0092.82 ± 1.4596.54 ± 0.40139.5
S,C,N,X,V (voting)81.75 ± 3.7086.88 ± 4.7492.91 ± 1.0197.07 ± 0.37140.75
B,S,C (voting)85.25 ± 3.8487.59 ± 2.8194.91 ± 0.5393.44 ± 0.49143
S,E,V (stacking)86.63 ± 5.9292.55 ± 3.4990.98 ± 0.6992.04 ± 1.60143
S,C,E,V (voting)83.93 ± 4.6291.95 ± 2.7490.20 ± 1.6295.71 ± 0.37144.75
S,N,X (voting)83.70 ± 4.7186.94 ± 2.9093.82 ± 0.9295.31 ± 0.57145.25
S,E (stacking)86.45 ± 5.9692.55 ± 3.4690.92 ± 0.7391.75 ± 1.63146.5
B,C,E (voting)85.34 ± 5.1192.44 ± 3.2987.01 ± 12.9895.20 ± 0.67148.5
S,N,E,V (voting)86.87 ± 3.6291.30 ± 2.9089.97 ± 1.7494.36 ± 0.44148.5
  B,S,C,N,X,V (voting) 80.70 ± 4.8582.72 ± 6.6794.33 ± 0.9196.26 ± 0.65148.75
C,E (voting)83.78 ± 6.6393.05 ± 3.2089.75 ± 1.0894.44 ± 1.08149.25
B,C,N,X (voting)79.01 ± 5.1681.14 ± 4.1997.39 ± 0.3494.70 ± 2.28149.75
N,E,V (voting)84.91 ± 4.5090.86 ± 2.6391.46 ± 1.9393.85 ± 0.44151.5
C,E,V (voting)81.10 ± 4.7091.72 ± 2.6590.56 ± 1.4095.58 ± 0.38151.75
S,C,X (voting)77.32 ± 4.0786.65 ± 2.9493.12 ± 0.8896.57 ± 0.50152.25
B,N,E (voting)87.55 ± 4.2791.28 ± 3.0688.32 ± 14.0393.50 ± 0.79155.25
B,C,N,V (voting)76.95 ± 5.7183.22 ± 4.9197.59 ± 0.2793.37 ± 0.36155.25
S,N,X,E,V (voting)84.35 ± 4.3987.84 ± 4.1690.98 ± 1.6094.96 ± 0.53156
B,C,N,X,E,V (voting)80.38 ± 4.6983.94 ± 6.4493.31 ± 1.4695.49 ± 0.85156.75
B,C,N,X,V (voting)74.90 ± 5.2675.22 ± 9.7596.07 ± 0.5595.30 ± 0.99157.5
B,S,X,V (stacking)84.54 ± 3.9687.20 ± 2.8292.04 ± 0.8293.25 ± 0.97158.5
B,C,X,E (voting)79.10 ± 5.0686.99 ± 2.6592.46 ± 0.5295.41 ± 0.48160.25
B,S,X (stacking)84.55 ± 3.4586.91 ± 2.7691.94 ± 0.8393.18 ± 1.14160.5
B,X,E (stacking)83.45 ± 7.7391.46 ± 3.8190.69 ± 0.8593.16 ± 1.08160.5
X,E,V (stacking)83.21 ± 7.9191.48 ± 3.8090.69 ± 0.8393.09 ± 1.15161.5
X,E (stacking)83.21 ± 7.9191.48 ± 3.8090.70 ± 0.8692.98 ± 1.27161.5
B,S,C,X (voting)78.03 ± 4.3781.40 ± 4.1594.48 ± 0.6094.77 ± 1.58162
S,C,X,E,V (voting)80.40 ± 4.0987.88 ± 4.4590.60 ± 1.4095.85 ± 0.47162.25
B,X,E,V (stacking)83.31 ± 7.8791.44 ± 3.8390.69 ± 0.8493.04 ± 1.16163
S,N,V (voting)82.93 ± 4.2887.54 ± 3.3291.30 ± 0.9093.65 ± 0.43166
S,C,V (voting)75.50 ± 4.9187.27 ± 3.1490.75 ± 0.8095.92 ± 0.39166.75
S,X,V (stacking)82.04 ± 4.3087.24 ± 2.6991.83 ± 0.8993.21 ± 1.04166.75
B,S,N,X (voting)82.07 ± 4.8480.53 ± 5.0194.22 ± 0.7592.54 ± 2.28167
B,S,C,X,E,V (voting)79.73 ± 4.8384.40 ± 6.1791.56 ± 1.4095.23 ± 0.81167.5
 B,S,N,X,E,V (voting) 82.44 ± 4.9883.41 ± 6.7091.47 ± 1.5994.15 ± 0.91168.75
S,X,E (voting)81.92 ± 6.0188.47 ± 3.1690.53 ± 1.2693.64 ± 0.64170.25
B,C,E,V (voting)79.13 ± 4.7087.53 ± 2.7890.50 ± 0.9995.03 ± 0.36171.5
S,E (voting)83.53 ± 7.1492.28 ± 3.4886.35 ± 5.7291.57 ± 0.52172
B,C (voting)77.57 ± 5.6785.87 ± 2.6292.48 ± 0.5093.76 ± 0.35172.25
S,X (stacking)81.69 ± 4.1786.87 ± 2.6791.83 ± 0.8693.08 ± 1.19172.25
B,S,E (voting)86.88 ± 5.4188.09 ± 3.4283.54 ± 13.0590.54 ± 0.80173.75
Table A6. All obtained accuracies [%] for different stacking and voting ensemble combinations for five runs of a 5-fold cross-validation, part 4.
Table A6. All obtained accuracies [%] for different stacking and voting ensemble combinations for five runs of a 5-fold cross-validation, part 4.
CombinationSmallSpoofingLargeCelebARank
B,S,C,V (voting)75.54 ± 5.4183.36 ± 4.5493.20 ± 0.5893.05 ± 0.62174.75
B,S,V (stacking)84.90 ± 3.6287.07 ± 2.7890.51 ± 0.6190.42 ± 0.50174.75
N,E (voting)83.45 ± 7.4291.50 ± 4.0087.02 ± 4.3891.51 ± 0.50175.5
B,S,N,V (voting)80.79 ± 5.8782.62 ± 5.2692.92 ± 0.8090.41 ± 0.54177.5
B,S,C,X,V (voting)73.99 ± 4.9974.77 ± 9.0492.53 ± 0.9394.42 ± 1.00178
B,C,X,E,V (voting)75.14 ± 5.6676.44 ± 9.3191.86 ± 1.2394.47 ± 1.09178.75
B,S,N,X,V (voting)77.61 ± 5.3274.28 ± 9.3593.09 ± 0.9893.02 ± 1.19179.5
S,E,V (voting)82.59 ± 5.0888.43 ± 3.6088.82 ± 1.0392.57 ± 0.49179.5
B,S (stacking)84.83 ± 3.6486.89 ± 2.6590.42 ± 0.6489.87 ± 0.44179.75
B,N,X,E,V (voting)77.18 ± 5.4874.97 ± 9.8992.63 ± 1.3393.15 ± 1.33180
B,E (stacking)83.73 ± 7.5691.48 ± 3.8088.69 ± 0.7581.54 ± 14.09180
B,E,V (stacking)83.63 ± 7.6291.48 ± 3.8088.87 ± 0.5881.94 ± 13.52180.25
E,V (stacking)83.21 ± 7.9191.48 ± 3.8088.66 ± 0.8480.37 ± 15.74183.5
B,N,X (voting)73.36 ± 5.4265.93 ± 6.6596.03 ± 0.4890.38 ± 3.32184
B,E (voting)83.82 ± 7.2491.13 ± 3.9178.57 ± 19.9588.66 ± 0.54184.75
B,N,V (voting)71.29 ± 5.8171.32 ± 6.8196.07 ± 0.4784.98 ± 0.56184.75
B,N,X,E (voting)81.35 ± 4.7681.93 ± 3.8790.99 ± 1.2491.52 ± 2.41185
C,X (voting)61.02 ± 8.3574.35 ± 8.3991.69 ± 0.9695.12 ± 0.45185.75
S,V (stacking)81.74 ± 4.1087.17 ± 2.7290.53 ± 0.6490.29 ± 0.67186
B,C,X (voting)70.49 ± 4.8567.88 ± 6.3394.33 ± 0.6492.55 ± 2.91186.25
C,N,X,V (voting)69.69 ± 7.2270.90 ± 8.2891.93 ± 1.1194.24 ± 1.16187.5
S,C,X,V (voting)69.17 ± 7.4275.52 ± 5.0290.72 ± 0.9794.70 ± 0.78189.5
C,X,E,V (voting)73.11 ± 6.2180.56 ± 4.3789.75 ± 1.3994.74 ± 0.29190.25
B,S,X,E (voting)81.14 ± 4.9982.87 ± 3.8089.49 ± 1.7891.80 ± 1.62192.25
B,N,E,V (voting)82.15 ± 5.4383.79 ± 4.3589.43 ± 0.9589.72 ± 0.45193.5
B,C,V (voting)68.83 ± 5.4073.65 ± 6.7293.82 ± 0.3789.35 ± 0.59194.25
B,C,X,V (voting)66.87 ± 5.8368.09 ± 7.1691.69 ± 1.0893.89 ± 1.05195.5
C,X,V (voting)66.16 ± 6.8669.85 ± 7.8591.28 ± 1.0094.13 ± 1.13195.75
N,X,V (voting)69.02 ± 6.6569.43 ± 8.0592.06 ± 1.1592.51 ± 1.25195.75
B,S,E,V (voting)81.95 ± 5.6184.58 ± 4.3187.78 ± 1.7789.67 ± 0.47197.75
B,S,X,E,V (voting)76.41 ± 5.3774.93 ± 8.8390.30 ± 1.2892.16 ± 1.23198.75
S,N,X,V (voting)70.56 ± 7.7570.47 ± 8.6890.32 ± 1.1692.95 ± 1.13203.25
X,E (voting)71.61 ± 11.6681.96 ± 10.6089.37 ± 1.3190.93 ± 0.87205.25
S,X,E,V (voting)70.25 ± 6.9976.43 ± 5.3889.42 ± 1.2891.88 ± 0.93206.75
B,S,X (voting)71.92 ± 4.6266.49 ± 6.4191.45 ± 0.8087.76 ± 3.08207.5
B,N (voting)83.15 ± 4.3780.15 ± 3.1079.40 ± 2.4072.50 ± 0.57207.75
B,S (voting)81.93 ± 4.2081.35 ± 3.2975.78 ± 1.0373.24 ± 0.58209
B,X,E,V (voting)70.95 ± 6.8969.21 ± 7.9789.54 ± 1.2191.43 ± 1.19210.5
N,X,E,V (voting)68.87 ± 6.7669.86 ± 8.1289.66 ± 1.3391.36 ± 1.35212
B,N,X,V (voting)68.58 ± 6.5766.24 ± 6.7091.29 ± 1.1487.29 ± 2.21212.75
B,X,V (stacking)70.50 ± 5.3364.03 ± 6.2190.44 ± 1.0090.38 ± 4.04213.75
B,X (stacking)70.83 ± 4.0460.59 ± 3.6190.47 ± 1.0590.37 ± 4.05214
S,X (voting)57.41 ± 7.7867.26 ± 7.4890.75 ± 0.9289.92 ± 1.89214.5
X,E,V (voting)68.23 ± 6.9769.21 ± 8.0489.54 ± 1.2191.35 ± 1.35215.25
E,V (voting)74.34 ± 12.1375.00 ± 15.9587.88 ± 0.6684.67 ± 0.35216.25
B,S,V (voting)70.35 ± 5.4870.72 ± 5.9889.86 ± 0.5982.61 ± 0.66216.75
S,X,V (voting)67.38 ± 6.6968.14 ± 7.7889.29 ± 0.9391.09 ± 1.25217.25
B,E,V (voting)75.49 ± 6.2673.47 ± 6.4082.48 ± 11.3385.58 ± 0.46218.25
N,X (voting)55.58 ± 7.9457.30 ± 5.4191.02 ± 1.0188.35 ± 3.40218.5
X,V (stacking)52.69 ± 8.0562.61 ± 6.6490.48 ± 1.0590.37 ± 4.05220
B,X,E (voting)74.55 ± 5.6767.81 ± 5.5783.67 ± 11.3489.31 ± 2.92220
B,S,X,V (voting)68.55 ± 6.6266.71 ± 6.9489.85 ± 0.9087.80 ± 1.42220
C,V (voting)60.94 ± 5.0869.60 ± 12.0488.26 ± 0.8088.40 ± 0.35223.25
B,X (voting)58.23 ± 7.6955.88 ± 5.3090.48 ± 1.0385.75 ± 3.25224
B,X,V (voting)62.96 ± 5.3557.91 ± 4.7489.61 ± 0.9183.13 ± 2.03226.5
B,V (stacking)70.38 ± 4.3265.07 ± 6.2987.91 ± 0.6671.16 ± 6.14229
S,V (voting)55.94 ± 5.8965.45 ± 11.1488.06 ± 0.7377.51 ± 0.83232
X,V (voting)53.58 ± 8.0554.93 ± 11.9888.09 ± 0.7083.93 ± 1.22233.25
N,V (voting)53.77 ± 5.7557.35 ± 10.4888.08 ± 0.7775.69 ± 0.54234
B,V (voting)58.70 ± 5.8556.35 ± 10.5287.92 ± 0.6973.96 ± 0.41234
Table A7. Obtained metrics [%] in a 5-fold cross-validation for different values of threshold of the stacking ensemble B,S,C,N,X,E,V. The threshold is the probability above which images are considered spoofed. Small dataset.
Table A7. Obtained metrics [%] in a 5-fold cross-validation for different values of threshold of the stacking ensemble B,S,C,N,X,E,V. The threshold is the probability above which images are considered spoofed. Small dataset.
ThresholdAccuracyPrecisionRecallF1-Score
0.0593.60 ± 1.7588.25 ± 5.2498.84 ± 1.4293.13 ± 2.55
0.1095.13 ± 2.4290.9 ± 6.8698.84 ± 1.4294.53 ± 3.36
0.1595.74 ± 3.0992.19 ± 7.7898.84 ± 1.4295.19 ± 3.99
0.2096.05 ± 2.8192.66 ± 7.5198.84 ± 1.4295.46 ± 3.87
0.2596.35 ± 2.4793.33 ± 6.4398.84 ± 1.4295.86 ± 3.22
0.3096.65 ± 2.2393.82 ± 6.1898.84 ± 1.4296.14 ± 3.13
0.3596.96 ± 1.9394.55 ± 5.0198.84 ± 1.4296.56 ± 2.46
0.4096.05 ± 2.0694.43 ± 5.1996.73 ± 3.1695.46 ± 3.02
0.4596.04 ± 2.2995.65 ± 3.8695.12 ± 4.1895.33 ± 3.32
0.5096.04 ± 2.2995.65 ± 3.8695.12 ± 4.1895.33 ± 3.32
0.5595.74 ± 2.2495.61 ± 3.8794.52 ± 3.6095.02 ± 3.22
0.6096.04 ± 2.0796.56 ± 2.8294.52 ± 3.6095.48 ± 2.57
0.6595.43 ± 1.6796.56 ± 2.8293.27 ± 3.3194.83 ± 1.99
0.7095.13 ± 2.0196.56 ± 2.8292.71 ± 4.1394.51 ± 2.19
0.7595.13 ± 2.0196.56 ± 2.8292.71 ± 4.1394.51 ± 2.19
0.8095.43 ± 2.1597.13 ± 2.5592.71 ± 4.1394.80 ± 2.39
0.8595.74 ± 2.2298.28 ± 2.2591.71 ± 5.1594.82 ± 3.30
0.9095.13 ± 2.0099.38 ± 1.2589.50 ± 5.8894.06 ± 3.15
0.9593.92 ± 2.5399.33 ± 1.3387.13 ± 5.5792.73 ± 3.15
Table A8. Obtained metrics [%] in a 5-fold cross-validation for different values of threshold of the stacking ensemble B,S,C,N,X,E,V. The threshold is the probability above which images are considered spoofed. Spoofing dataset.
Table A8. Obtained metrics [%] in a 5-fold cross-validation for different values of threshold of the stacking ensemble B,S,C,N,X,E,V. The threshold is the probability above which images are considered spoofed. Spoofing dataset.
ThresholdAccuracyPrecisionRecallF1-Score
0.0597.23 ± 1.7796.56 ± 3.9793.40 ± 7.4294.67 ± 3.38
0.1097.23 ± 1.7795.64 ± 4.1295.49 ± 6.7595.32 ± 3.20
0.1597.60 ± 1.3295.43 ± 3.9296.46 ± 6.1095.74 ± 3.01
0.2097.96 ± 1.1295.52 ± 3.7196.99 ± 5.5896.08 ± 2.86
0.2597.96 ± 1.1295.59 ± 3.5697.34 ± 5.1796.31 ± 2.74
0.3098.20 ± 0.9495.75 ± 3.4497.55 ± 4.8396.51 ± 2.63
0.3598.44 ± 1.0595.98 ± 3.3897.66 ± 4.5696.70 ± 2.56
0.4098.32 ± 1.0496.19 ± 3.3097.68 ± 4.3696.83 ± 2.49
0.4598.44 ± 1.1296.38 ± 3.2597.70 ± 4.1896.94 ± 2.44
0.5098.44 ± 1.1296.54 ± 3.1997.71 ± 4.0497.03 ± 2.39
0.5598.32 ± 1.0496.67 ± 3.1497.70 ± 3.9197.10 ± 2.34
0.6098.20 ± 1.0196.78 ± 3.0897.67 ± 3.7897.14 ± 2.29
0.6598.20 ± 1.2796.89 ± 3.0497.62 ± 3.6997.18 ± 2.26
0.7098.44 ± 1.1297.04 ± 3.0197.57 ± 3.6197.23 ± 2.24
0.7598.44 ± 1.1297.16 ± 2.9797.53 ± 3.5497.28 ± 2.21
0.8098.44 ± 1.1297.28 ± 2.9497.49 ± 3.4797.32 ± 2.18
0.8598.44 ± 1.1297.39 ± 2.9097.44 ± 3.4497.36 ± 2.16
0.9098.32 ± 1.3497.50 ± 2.8697.38 ± 3.4497.38 ± 2.16
0.9597.24 ± 1.1297.59 ± 2.8397.19 ± 3.5397.33 ± 2.15
Table A9. Obtained metrics [%] in a 5-fold cross-validation for different values of threshold of the stacking ensemble B,S,C,N,X,E,V. The threshold is the probability above which images are considered spoofed. Large Crowd-collected dataset.
Table A9. Obtained metrics [%] in a 5-fold cross-validation for different values of threshold of the stacking ensemble B,S,C,N,X,E,V. The threshold is the probability above which images are considered spoofed. Large Crowd-collected dataset.
ThresholdAccuracyPrecisionRecallF1-Score
0.0597.97 ± 0.3497.60 ± 2.7697.32 ± 3.4997.40 ± 2.13
0.1098.45 ± 0.2997.64 ± 2.7097.43 ± 3.4597.48 ± 2.11
0.1598.56 ± 0.2897.68 ± 2.6597.54 ± 3.4197.55 ± 2.09
0.2098.70 ± 0.2197.72 ± 2.6097.64 ± 3.3797.62 ± 2.08
0.2598.80 ± 0.1697.76 ± 2.5697.72 ± 3.3397.69 ± 2.06
0.3098.92 ± 0.1797.81 ± 2.5297.80 ± 3.2997.76 ± 2.05
0.3598.95 ± 0.1397.86 ± 2.4997.88 ± 3.2597.82 ± 2.03
0.4098.94 ± 0.1497.90 ± 2.4597.94 ± 3.2197.87 ± 2.02
0.4598.96 ± 0.1697.94 ± 2.4298.00 ± 3.1797.93 ± 2.00
0.5098.92 ± 0.1997.98 ± 2.3998.06 ± 3.1397.98 ± 1.99
0.5598.87 ± 0.2198.02 ± 2.3698.10 ± 3.0998.02 ± 1.97
0.6098.85 ± 0.2498.06 ± 2.3398.15 ± 3.0598.06 ± 1.95
0.6598.80 ± 0.2098.10 ± 2.3198.18 ± 3.0198.10 ± 1.94
0.7098.69 ± 0.2298.13 ± 2.2898.21 ± 2.9798.13 ± 1.92
0.7598.58 ± 0.2598.17 ± 2.2698.24 ± 2.9498.16 ± 1.90
0.8098.49 ± 0.2098.21 ± 2.2498.25 ± 2.9098.19 ± 1.88
0.8598.21 ± 0.3398.24 ± 2.2298.26 ± 2.8698.21 ± 1.86
0.9097.99 ± 0.3298.27 ± 2.2098.26 ± 2.8298.23 ± 1.84
0.9597.37 ± 0.3498.31 ± 2.1898.23 ± 2.7998.24 ± 1.81
Table A10. Obtained metrics [%] in a 5-fold cross-validation for different values of threshold of the stacking ensemble B,S,C,N,X,E,V. The threshold is the probability above which images are considered spoofed. CelebA dataset.
Table A10. Obtained metrics [%] in a 5-fold cross-validation for different values of threshold of the stacking ensemble B,S,C,N,X,E,V. The threshold is the probability above which images are considered spoofed. CelebA dataset.
ThresholdAccuracyPrecisionRecallF1-Score
0.0598.54 ± 0.1098.27 ± 2.1698.27 ± 2.7698.24 ± 1.79
0.1098.78 ± 0.1598.25 ± 2.1498.31 ± 2.7498.25 ± 1.77
0.1598.96 ± 0.1298.24 ± 2.1298.34 ± 2.7198.26 ± 1.75
0.2099.03 ± 0.1398.24 ± 2.0998.37 ± 2.6998.27 ± 1.73
0.2599.08 ± 0.1298.24 ± 2.0798.40 ± 2.6698.29 ± 1.71
0.3099.12 ± 0.1298.24 ± 2.0598.42 ± 2.6498.30 ± 1.70
0.3599.13 ± 0.1198.25 ± 2.0398.45 ± 2.6298.32 ± 1.68
0.4099.18 ± 0.1298.25 ± 2.0098.47 ± 2.5998.33 ± 1.67
0.4599.22 ± 0.1498.26 ± 1.9998.49 ± 2.5798.35 ± 1.65
0.5099.24 ± 0.1298.28 ± 1.9798.50 ± 2.5498.36 ± 1.64
0.5599.25 ± 0.1298.29 ± 1.9598.52 ± 2.5298.38 ± 1.63
0.6099.27 ± 0.1298.31 ± 1.9398.53 ± 2.5098.39 ± 1.61
0.6599.24 ± 0.1398.33 ± 1.9298.54 ± 2.4798.40 ± 1.60
0.7099.20 ± 0.1398.34 ± 1.9198.54 ± 2.4598.42 ± 1.59
0.7599.10 ± 0.1598.36 ± 1.8998.54 ± 2.4398.43 ± 1.58
0.8099.07 ± 0.1698.38 ± 1.8898.54 ± 2.4198.43 ± 1.56
0.8598.90 ± 0.1898.40 ± 1.8798.53 ± 2.3998.44 ± 1.55
0.9098.71 ± 0.1798.42 ± 1.8698.50 ± 2.3798.44 ± 1.54
0.9598.26 ± 0.1798.45 ± 1.8598.46 ± 2.3798.43 ± 1.53

References

  1. Apple Inc. About Face ID Advanced Technology. 2024. Available online: https://support.apple.com/en-us/102381 (accessed on 14 April 2024).
  2. Bazarevsky, V.; Kartynnik, Y.; Vakunov, A.; Raveendran, K.; Grundmann, M. BlazeFace: Sub-millisecond Neural Face Detection on Mobile GPUs. arXiv 2019, arXiv:1907.05047. [Google Scholar] [CrossRef]
  3. Deng, J.; Guo, J.; Zafeiriou, S. ArcFace: Additive Angular Margin Loss for Deep Face Recognition. arXiv 2018, arXiv:1801.07698. [Google Scholar] [CrossRef]
  4. Deng, J.; Guo, J.; Ververas, E.; Kotsia, I.; Zafeiriou, S. RetinaFace: Single-Shot Multi-Level Face Localisation in the Wild. In Proceedings of the 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Seattle, WA, USA, 13–19 June 2020; pp. 5202–5211. [Google Scholar] [CrossRef]
  5. Timoshenko, D.; Simonchik, K.; Shutov, V.; Zhelezneva, P.; Grishkin, V. Large Crowdcollected Facial Anti-Spoofing Dataset. In Proceedings of the 2019 Computer Science and Information Technologies (CSIT), Chennai, India, 19–20 January 2019; pp. 123–126. [Google Scholar] [CrossRef]
  6. Zhang, Y.; Yin, Z.; Li, Y.; Yin, G.; Yan, J.; Shao, J.; Liu, Z. CelebA-Spoof: Large-Scale Face Anti-Spoofing Dataset with Rich Annotations. In Proceedings of the European Conference on Computer Vision (ECCV), Glasgow, UK, 23–28 August 2020. [Google Scholar]
  7. Taigman, Y.; Yang, M.; Ranzato, M.A.; Wolf, L. Deepface: Closing the gap to human-level performance in face verification. In Proceedings of the Conference on Computer Vision and Pattern Recognition (CVPR), Columbus, OH, USA, 23–28 June 2014; pp. 1701–1708. [Google Scholar]
  8. Sun, Y.; Wang, X.; Tang, X. Deeply learned face representations are sparse, selective, and robust. In Proceedings of the Conference on Computer Vision and Pattern Recognition (CVPR), Boston, MA, USA, 7–12 June 2015; pp. 2892–2900. [Google Scholar]
  9. Balamurali, K. Face Spoof Detection Using VGG-Face Architecture. J. Phys. Conf. Ser. 2011, 1917, 012010. [Google Scholar] [CrossRef]
  10. Liu, W.; Wen, Y.; Yu, Z.; Li, M.; Raj, B.; Song, L. Sphereface: Deep hypersphere embedding for face recognition. In Proceedings of the Conference on Computer Vision and Pattern Recognition (CVPR), Honolulu, HI, USA, 21–26 July 2017. [Google Scholar]
  11. de Freitas Pereira, T.; Anjos, A.; De Martino, J.M.; Marcel, S. Lbp-top based countermeasure against face spoofing attacks. In Proceedings of the ACCV, Daejeon, Republic of Korea, 5–6 November 2012. [Google Scholar]
  12. Boulkenafet, Z.; Komulainen, J.; Hadid, A. Face anti-spoofing based on color texture analysis. In Proceedings of the ICIP, Quebec City, QC, Canada, 27–30 September 2015. [Google Scholar]
  13. Patel, K.; Han, H.; Jain, A.K. Secure face unlock: Spoof detection on smartphones. IEEE Trans. Inf. Forensics Secur. 2016, 11, 2268–2283. [Google Scholar] [CrossRef]
  14. Boulkenafet, Z.; Komulainen, J.; Hadid, A. Face antispoofing using speeded-up robust features and fisher vector encoding. IEEE Signal Process. Lett. 2016, 24, 141–145. [Google Scholar]
  15. Komulainen, J.; Hadid, A.; Pietikäinen, M. Context based face anti-spoofing. In Proceedings of the BTAS, Arlington, VA, USA, 29 September–2 October 2013. [Google Scholar]
  16. Pan, G.; Sun, L.; Wu, Z.; Lao, S. Eyeblink-based anti-spoofing in face recognition from a generic webcamera. In Proceedings of the Conference on Computer Vision and Pattern Recognition (CVPR), Minneapolis, MN, USA, 18–23 June 2007. [Google Scholar]
  17. Jee, H.K.; Jung, S.U.; Yoo, J.H. Liveness detection for embedded face recognition system. Int. J. Biol. Med. Sci. 2006, 1, 235–238. [Google Scholar]
  18. Li, J.W. Eye blink detection based on multiple gabor response waves. In Proceedings of the ICMLC, Kunming, China, 12–15 July 2008; Volume 5, pp. 852–2856. [Google Scholar]
  19. Ali, A.; Deravi, F.; Hoque, S. Liveness detection using gaze collinearity. In Proceedings of the ICEST, Houston, TX, USA, 25–29 June 2012. [Google Scholar]
  20. Li, X.; Komulainen, J.; Zhao, G.; Yuen, P.C.; Pietikäinen, M. Generalized face anti-spoofing by detecting pulse from face videos. In Proceedings of the ICPR, Cancun, Mexico, 4–8 December 2016. [Google Scholar]
  21. Liu, Y.; Jourabloo, A.; Liu, X. Learning deep models for face anti-spoofing: Binary or auxiliary supervision. In Proceedings of the Conference on Computer Vision and Pattern Recognition (CVPR), Salt Lake City, UT, USA, 18–22 June 2018. [Google Scholar]
  22. Lin, B.; Li, X.; Yu, Z.; Zhao, G. Face liveness detection by rppg features and contextual patch-based cnn. In Proceedings of the ICBEA, Stockholm, Sweden, 29–31 May 2019; ACM: New York, NY, USA, 2019. [Google Scholar]
  23. Yu, Z.; Peng, W.; Li, X.; Hong, X.; Zhao, G. Remote heart rate measurement from highly compressed facial videos: An end-to-end deep learning solution with video enhancement. In Proceedings of the ICCV, Seoul, Republic of Korea, 27 October–2 November 2019. [Google Scholar]
  24. Boulkenafet, Z.; Komulainen, J.; Hadid, A. Face spoofing detection using colour texture analysis. IEEE Trans. Inf. Forensics Secur. 2016, 11, 1818–1830. [Google Scholar] [CrossRef]
  25. Sthevanie, F.; Ramadhani, K.N. Spoofing detection on facial images recognition using LBP and GLCM combination. J. Phys. Conf. Ser. 2018, 971, 012014. [Google Scholar] [CrossRef]
  26. Chen, H.; Hu, G.; Lei, Z.; Chen, Y.; Robertson, N.M.; Li, S.Z. Attention-Based Two-Stream Convolutional Networks for Face Spoofing Detection. IEEE Trans. Inf. Forensics Secur. 2019, 15, 578–593. [Google Scholar] [CrossRef]
  27. Rajeswaran, S.; Kumar, S. Face-Spoof detection system using convolutional neural network. In Proceedings of the International Conference on Recent trends in Electronics, Computing and Communication Engineering (ICRTECC), Chennai, India, 25–26 April 2019. [Google Scholar]
  28. Hashemifard, S.; Akbari, M. A Compact Deep Learning Model for Face Spoofing Detection. arXiv 2021, arXiv:2101.04756v1. [Google Scholar] [CrossRef]
  29. Ab Wahab, K.; Yew, L.W.; Jusoh, N.A. Online Attendance System Using Face Recognition. Eng. Agric. Sci. Technol. J. 2022, 1, 57–61. [Google Scholar] [CrossRef]
  30. Shu, X.; Li, X.; Zuo, X.; Xu, D.; Shi, J. Face spoofing detection based on multi-scale color inversion dual-stream convolutional neural network. Expert Syst. Appl. 2023, 224, 119988. [Google Scholar] [CrossRef]
  31. Bahia, Y.Z.; Meriem, F.; Messaoud, B. Face spoofing detection using Heterogeneous Auto-Similarities of Characteristics. Eng. Appl. Artif. Intell. 2024, 130, 107788. [Google Scholar] [CrossRef]
  32. Zhang, Y.; Wu, Y.; Yin, Z.; Shao, J.; Liu, Z. Robust face anti-spoofing with Dual Probabilistic Modeling. Pattern Recognit. 2025, 172, 111700. [Google Scholar] [CrossRef]
  33. Huang, P.K.; Chong, J.X.; Hsu, M.T.; Hsu, F.Y.; Hsu, C.T. Channel difference transformer for face anti-spoofing. Inf. Sci. 2025, 702, 121904. [Google Scholar] [CrossRef]
  34. Antil, A.; Dhiman, C. Unmasking Deception: A Comprehensive Survey on the Evolution of Face Anti-spoofing Methods. Neurocomputing 2025, 617, 128992. [Google Scholar] [CrossRef]
  35. Face. Spoofing Dataset. 2024. Available online: https://universe.roboflow.com/face-hgc6e/spoofing-wqkzq (accessed on 18 February 2025).
  36. Ma, X.; Geng, Z.; Bie, Z. Depth Estimation from Single Image Using CNN-Residual Network. Semantic Scholar. 2017. Available online: https://cs231n.stanford.edu/reports/2017/pdfs/203.pdf (accessed on 21 July 2021).
  37. Pandey, A. Face Liveness Detection Using Depth Map Prediction. Available online: https://github.com/anand498/Face-Liveness-Detection (accessed on 8 July 2025).
  38. Xiao, J.; Wang, W.; Zhang, L.; Liu, H. A MobileFaceNet-Based Face Anti-Spoofing Algorithm for Low-Quality Images. Electronics 2024, 13, 2801. [Google Scholar] [CrossRef]
  39. Quy, N.D. Face Anti-Spoofing Using MobileNet. Available online: https://github.com/dinhquy94/face-antispoofing-using-mobileNet (accessed on 8 July 2025).
  40. Liu, Z.; Mao, H.; Wu, C.; Feichtenhofer, C.; Darrell, T.; Xie, S. A ConvNet for the 2020s. arXiv 2022, arXiv:2201.03545. [Google Scholar] [CrossRef]
  41. Tan, M.; Le, Q.V. EfficientNetV2: Smaller Models and Faster Training. arXiv 2021, arXiv:2104.00298. [Google Scholar] [CrossRef]
  42. Dosovitskiy, A.; Beyer, L.; Kolesnikov, A.; Weissenborn, D.; Zhai, X.; Unterthiner, T.; Dehghani, M.; Minderer, M.; Heigold, G.; Gelly, S.; et al. An Image is Worth 16×16 Words: Transformers for Image Recognition at Scale. arXiv 2020, arXiv:2010.11929. [Google Scholar] [CrossRef]
  43. Liu, Z.; Hu, H.; Lin, Y.; Yao, Z.; Xie, Z.; Wei, Y.; Ning, J.; Cao, Y.; Zhang, Z.; Dong, L.; et al. Swin Transformer V2: Scaling Up Capacity and Resolution. In Proceedings of the 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), New Orleans, LA, USA, 18–24 June 2022; pp. 11999–12009. [Google Scholar] [CrossRef]
  44. Belli, D.; Das, D.; Major, B.; Porikli, F. A Personalized Benchmark for Face Anti-spoofing. In Proceedings of the 2022 IEEE/CVF Winter Conference on Applications of Computer Vision Workshops (WACVW), Waikoloa, HI, USA, 4–8 January 2022; pp. 338–348. [Google Scholar] [CrossRef]
  45. Doubango AI. Doubango AI 3D Passive Face Liveness Detection. Available online: https://github.com/DoubangoTelecom/FaceLivenessDetection-SDK (accessed on 8 July 2025).
Figure 1. Work time management system. The block of the module presented in this paper is marked in red.
Figure 1. Work time management system. The block of the module presented in this paper is marked in red.
Applsci 15 08402 g001
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.
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.
Applsci 15 08402 g002
Figure 3. Proposed architecture of the neural network for detecting images of spoofed faces.
Figure 3. Proposed architecture of the neural network for detecting images of spoofed faces.
Applsci 15 08402 g003
Figure 4. Proposed CNN architecture to detect smartphones in images.
Figure 4. Proposed CNN architecture to detect smartphones in images.
Applsci 15 08402 g004
Figure 5. Face authenticity detection module.
Figure 5. Face authenticity detection module.
Applsci 15 08402 g005
Figure 6. The input image (left) and the image preprocessed by the bezel-detection algorithm (right).
Figure 6. The input image (left) and the image preprocessed by the bezel-detection algorithm (right).
Applsci 15 08402 g006
Figure 7. The output image generated by the bezel-detection algorithm from the image in Figure 6. The red rectangle represents the detected face, while the green rectangles represent the detected bezels.
Figure 7. The output image generated by the bezel-detection algorithm from the image in Figure 6. The red rectangle represents the detected face, while the green rectangles represent the detected bezels.
Applsci 15 08402 g007
Figure 8. An example of edges for a spoof image displayed on a smartphone.
Figure 8. An example of edges for a spoof image displayed on a smartphone.
Applsci 15 08402 g008
Figure 9. The proposed architecture of the neural network used as the final classifier.
Figure 9. The proposed architecture of the neural network used as the final classifier.
Applsci 15 08402 g009
Table 1. Details about the proposed neural network architecture for the image analysis module.
Table 1. Details about the proposed neural network architecture for the image analysis module.
Layer (Type: Depth-Idx) Output ShapeParam #
SpoofDetectionNet[32, 2]
Conv2d: 1-1[32, 16, 64, 64]448
BatchNorm2d: 1-2[32, 16, 64, 64]32
Conv2d: 1-3[32, 16, 64, 64]2320
BatchNorm2d: 1-4[32, 16, 64, 64]32
MaxPool2d: 1-5[32, 16, 32, 32]
Dropout: 1-6[32, 16, 32, 32]
Conv2d: 1-7[32, 32, 32, 32]4640
BatchNorm2d: 1-8[32, 32, 32, 32]64
Conv2d: 1-9[32, 32, 32, 32]9248
BatchNorm2d: 1-10[32, 32, 32, 32]64
MaxPool2d: 1-11[32, 32, 16, 16]
Dropout: 1-12[32, 32, 16, 16]
Flatten: 1-13[32, 8192]
Linear: 1-14[32, 64]524,352
BatchNorm1d: 1-15[32, 64]128
Dropout: 1-16[32, 64]
Linear: 1-17[32, 2]130
Total params: 541,458
Trainable params: 541,458
Non-trainable params: 0
Table 2. Details about the proposed neural network architecture for the smartphone detection module.
Table 2. Details about the proposed neural network architecture for the smartphone detection module.
Layer (Type: Depth-Idx)Output ShapeParam #
BezelDetectionNet[32, 2]
Conv2d: 1-1[32, 32, 128, 128]896
BatchNorm2d: 1-2[32, 32, 128, 128]64
MaxPool2d: 1-3[32, 32, 64, 64]
Conv2d: 1-4[32, 64, 64, 64]18,496
BatchNorm2d: 1-5[32, 64, 64, 64]128
MaxPool2d: 1-6[32, 64, 32, 32]
Conv2d: 1-7[32, 128, 32, 32]73,856
BatchNorm2d: 1-8[32, 128, 32, 32]256
MaxPool2d: 1-9[32, 128, 16, 16]
Conv2d: 1-10[32, 256, 16, 16]295,168
BatchNorm2d: 1-11[32, 256, 16, 16]512
MaxPool2d: 1-12[32, 256, 8, 8]
Linear: 1-13[32, 1024]16,778,240
Linear: 1-14[32, 512]524,800
Linear: 1-15[32, 2]1026
Total params: 17,693,442
Trainable params: 17,693,442
Non-trainable params: 0
Table 3. Details about the proposed neural network architecture used as the final classifier.
Table 3. Details about the proposed neural network architecture used as the final classifier.
Layer (Type: Depth-Idx)Output ShapeParam #
ProbabilityNN[1, 1]
Linear: 1-1[1, 10]50
Linear: 1-2[1, 1]11
Sigmoid: 1-3[1, 1]
Total params: 61
Trainable params: 61
Non-trainable params: 0
Table 4. Prediction accuracy [%] of the evaluated methods and ensembles in five runs of a 5-fold cross-validation (a total of 25 training/test pairs). At the bottom, the best-performing ensembles of 3, 4, 5, 6, and 7 models are presented. The complete results of 240 different stacking and voting ensembles are presented in the Appendix A.
Table 4. Prediction accuracy [%] of the evaluated methods and ensembles in five runs of a 5-fold cross-validation (a total of 25 training/test pairs). At the bottom, the best-performing ensembles of 3, 4, 5, 6, and 7 models are presented. The complete results of 240 different stacking and voting ensembles are presented in the Appendix A.
Our MethodsSmall datasetSpoofing DataCrowd-collectedCelebA
Bezel (B)70.99 ± 4.2257.67 ± 3.0537.63 ± 0.6947.05 ± 0.50
Smartphone CNN (S)81.35 ± 3.8386.78 ± 2.6390.27 ± 0.5989.26 ± 0.47
Context (C)77.98 ± 4.2191.95 ± 1.8690.47 ± 1.0598.22 ± 0.17
Image analysis CNN (N)85.64 ± 4.5991.03 ± 1.9898.20 ± 0.3694.71 ± 0.24
Other MethodsSmall datasetSpoofing DataCrowd-collectedCelebA
EfficientNetV2 (E)83.21 ± 7.9191.48 ± 3.8088.53 ± 0.9591.50 ± 0.44
ConvNeXt (X)54.71 ± 6.4756.03 ± 4.6090.47 ± 1.0590.37 ± 4.05
MobileNet71.73 ± 2.3373.86 ± 0.8990.83 ± 0.1987.96 ± 0.34
Depth prediction53.25 ± 3.3341.27 ± 5.2589.37 ± 7.0185.75 ± 8.27
ViT (V)52.52 ± 6.0456.56 ± 10.4687.92 ± 0.6575.49 ± 0.55
Swin Transformer (T)50.32 ± 3.4359.48 ± 5.5488.07 ± 0.6758.75 ± 0.32
EnsemblesSmall datasetSpoofing DataCrowd-collectedCelebA
C,N,E (stacking)91.18 ± 3.9596.35 ± 1.6998.89 ± 0.2298.94 ± 0.17
S,C,N,E (stacking)92.29 ± 3.1696.77 ± 1.4698.93 ± 0.2299.14 ± 0.11
S,C,N,X,E (stacking)92.15 ± 3.3696.85 ± 1.5199.00 ± 0.1799.19 ± 0.10
B,S,C,N,X,E (stacking)92.46 ± 3.1796.82 ± 1.5498.99 ± 0.1999.18 ± 0.12
B,S,C,N,X,E,V (stacking)92.62 ± 3.0596.88 ± 1.4898.99 ± 0.1799.20 ± 0.12
Table 5. Comparison of accuracy [%] obtained for the stacking ensemble consisting of our own methods (B,S,C,N) with and without Platt scaling with constant parameters and static random seed.
Table 5. Comparison of accuracy [%] obtained for the stacking ensemble consisting of our own methods (B,S,C,N) with and without Platt scaling with constant parameters and static random seed.
SmallSpoofingCrowdCelebA
Baseline90.64 ± 2.7795.37 ± 1.1096.83 ± 0.2898.59 ± 0.38
Platt scaling86.35 ± 2.1394.49 ± 1.7997.00 ± 0.6698.64 ± 0.15
Table 6. Obtained results for the commercial system “A Personalized Benchmark for Face Anti-spoofing” for the small dataset (N = 477).
Table 6. Obtained results for the commercial system “A Personalized Benchmark for Face Anti-spoofing” for the small dataset (N = 477).
OutcomeAuthentic FacesSpoof Faces
Authentic80
Spoof230144
Not detected590
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Klinowski, R.; Kordos, M. Face Spoofing Detection with Stacking Ensembles in Work Time Registration System. Appl. Sci. 2025, 15, 8402. https://doi.org/10.3390/app15158402

AMA Style

Klinowski R, Kordos M. Face Spoofing Detection with Stacking Ensembles in Work Time Registration System. Applied Sciences. 2025; 15(15):8402. https://doi.org/10.3390/app15158402

Chicago/Turabian Style

Klinowski, Rafał, and Mirosław Kordos. 2025. "Face Spoofing Detection with Stacking Ensembles in Work Time Registration System" Applied Sciences 15, no. 15: 8402. https://doi.org/10.3390/app15158402

APA Style

Klinowski, R., & Kordos, M. (2025). Face Spoofing Detection with Stacking Ensembles in Work Time Registration System. Applied Sciences, 15(15), 8402. https://doi.org/10.3390/app15158402

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop