Abstract
In this paper, a new method of training pipeline is discussed to achieve significant performance on the task of anti-spoofing with RGB image. We explore and highlight the impact of using pseudo-depth to pre-train a network that will be used as the backbone to the final classifier. While the usage of pseudo-depth for anti-spoofing task is not a new idea on its own, previous endeavours utilize pseudo-depth simply as another medium to extract features for performing prediction, or as part of many auxiliary losses in aiding the training of the main classifier, normalizing the importance of pseudo-depth as just another semantic information. Through this work, we argue that there exists a significant advantage in training the final classifier can be gained by the pre-trained generator learning to predict the corresponding pseudo-depth of a given facial image, from a Generative Adversarial Network framework. Our experimental results indicate that our method results in a much more adaptable system that can generalize beyond intra-dataset samples, but to inter-dataset samples, which it has never seen before during training. Quantitatively, our method approaches the baseline performance of the current state of the art anti-spoofing models with 15.8x less parameters used. Moreover, experiments showed that the introduced methodology performs well only using basic binary label without additional semantic information which indicates potential benefits of this work in industrial and application based environment where trade-off between additional labelling and resources are considered.
Introduction
Facial recognition systems are increasingly vulnerable to presentation attacks, such as high-resolution printed photos or video replays on tablets. While specialized hardware like infrared or depth cameras can mitigate these risks, many legacy and low-cost devices rely solely on standard 2D RGB cameras. To address this, researchers often employ "pseudo-depth" estimation—treating the 3D structure of a face as a cue to distinguish real faces from flat spoofs.
Traditionally, pseudo-depth is used as an auxiliary loss during the training of a main classifier. This paper proposes a shift in paradigm: using a Generative Adversarial Network (GAN) to pre-train the classifier's backbone on a pseudo-depth generation task. This approach yields a highly adaptable, lightweight model that achieves near state-of-the-art performance with significantly fewer parameters, proving especially robust in "in the wild" scenarios where the model encounters unseen data distributions.
Methodology: The PDGAN Framework
The core of the proposed method is the Pseudo-Depth GAN (PDGAN). Instead of initializing a classifier with standard ImageNet weights, the authors pre-train an encoder-decoder architecture to translate RGB images into pseudo-depth maps.
1. Ground Truth Generation
To train the generator, target depth maps are created for the training set. "Live" faces are processed through an off-the-shelf depth estimator (PRNet) to generate a detailed 3D target. In contrast, "spoof" faces—which are physically flat—are assigned a target map of all zeros. This stark contrast forces the network to learn geometric and textural features that define 3D structure.
2. Adversarial Pre-training and Fine-Tuning
The PDGAN follows an image-to-image translation framework. To stabilize training, the discriminator includes an auxiliary classifier (C) to predict the live/spoof status. Once pre-training is complete, the decoder is discarded. The trained encoder—a lightweight ResNet-18 variant with only 1/4 the standard channels—serves as the backbone for a final binary classifier, which is then fine-tuned using standard binary cross-entropy loss.
Key Insights
- Generation as a Prior: Forcing the network to generate a depth map, rather than just using it as a penalty, compels the encoder to internalize the fundamental differences between real faces and flat spoofs. PCA visualizations confirm that PDGAN pre-training separates real and spoof images in the embedding space much more effectively than standard ImageNet pre-training.
- Efficiency of Binary Labels: For lightweight networks, complex semantic labels (e.g., specific attack types) can actually degrade performance. The binary live/spoof distinction, reinforced by the zeroed-out spoof depth maps, provides a sufficient and efficient training signal.
Experimental Results
The model was evaluated on the CelebA-Spoof dataset for intra-dataset performance and on Rose-Youtu and SiW for inter-dataset generalization.
- High Efficiency: The model utilizes only 0.71M parameters, making it 15.8x smaller than the state-of-the-art AENet (11.2M parameters).
- Performance: On CelebA-Spoof, the model achieved an AUC of 0.9845 and an Average Classification Error Rate (ACER) of 0.0635.
- Generalization: In inter-dataset tests, the PDGAN-pretrained backbone consistently outperformed ImageNet-pretrained baselines, demonstrating superior adaptability to unseen domains.
Conclusion
By elevating pseudo-depth from an auxiliary loss to a primary pre-training task, this work demonstrates that lightweight models can achieve competitive anti-spoofing performance. While training stability remains a challenge due to the zero-map targets for spoofs, the PDGAN framework offers a resource-efficient alternative for industrial applications where computational constraints and labeling costs are critical factors.
Summary updated