CelebA-Spoof: Large-Scale Face Anti-Spoofing Dataset with Rich Annotations
- Publication
- ECCV 2020Conference
- First submitted to arXiv
- arXiv:2007.12342
Cite this paper · BibTeX
The citation identifies the linked source version. It cites the original paper and its authors.
@misc{faceantispoofingcelebaspoof2020,
title = {{CelebA-Spoof: Large-Scale Face Anti-Spoofing Dataset with Rich Annotations}},
author = {Yuanhan Zhang and Zhenfei Yin and Yidong Li and Guojun Yin and Junjie Yan and Jing Shao and Ziwei Liu},
year = {2020},
eprint = {2007.12342},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2007.12342}
}
Face Anti-Spoofing (FAS) has become a familiar term in the computer vision community over the past few years. From phone unlocking, access control, to mobile payments, almost every facial interaction system faces the soul-searching question: "Is this face live or spoofed?"
However, as methods continue to evolve one after another, a critical issue has quietly surfaced:
The datasets are no longer enough.
Defining the Problem
Most existing FAS datasets have three obvious issues:
- Lack of Diversity: There aren’t enough facial samples, scenarios are too limited, and the number of devices is small. Common datasets typically have fewer than 2000 people, 4 shooting scenarios, and fewer than 10 devices. How can such data support cross-scenario deployment?
- Sparse Annotations: Datasets often only label "Live" or "Spoof," at most adding the spoof type, but without annotations on lighting conditions or background environments. Models don't learn the "non-facial but highly relevant" real-world clues.
- Performance Saturation: On some datasets (e.g., SiW, OULU-NPU), the recall of ResNet-18 reaches 100.0% or 99.0% at FPR=0.5%. This means: these particular evaluation settings have limited ability to distinguish models.
Limited size and diversity constrain training and reliable evaluation. Near-saturated scores under some conditions also make new methods harder to distinguish. It's rather like grading university students with elementary-school math questions: if everyone scores near the top, what is left to compare?
The authors of this paper took on this issue: Let's tackle it.
Solving the Problem
To solve the above problems, the authors introduced CelebA-Spoof.
The authors position CelebA-Spoof as a large, richly annotated, diverse face anti-spoofing dataset for its time.
Let’s take a look at its specifications:
- Massive Scale: It includes 10,177 different identities and 625,537 images.
- Rich Scenarios and Devices: The images come from over 10 different input devices (mobile phones, tablets, computers, etc.), captured from 8 sessions (including 2 environments × 4 lighting conditions).
- Extensive Annotations: Live images inherit CelebA's 40 facial attributes, while Spoof images are additionally annotated with:
- Spoof type (e.g., print or screen replay)
- Illumination condition (e.g., normal, strong, back, or dark)
- Environment (indoor or outdoor)
The dataset defines 43 attribute types across these groups, allowing FAS to be studied from several angles.
CelebA-Spoof Dataset
CelebA-Spoof was a large, richly annotated FAS dataset, with attention to diversity and semantic information as well as image counts.
The authors didn’t simply use pre-existing data to bulk it up. Instead, they started from the sources of Live and Spoof images, building a high-quality dataset step by step that aligns with real-world application scenarios.
The Live images originate from the 202,599 images in the original CelebA dataset; this is not the final filtered Live count. The authors manually excluded 347 potentially non-genuine images, such as posters and cartoons, to reduce label confusion. “Live” here is a dataset class.
To create Spoof images, the authors sorted the selected live images based on each subject's face size, selecting up to the top k=20 images to serve as the source material for spoof creation. This ensured that the spoof data maintained diversity while keeping a balanced distribution of spoof images across different subjects. Ultimately, 87,926 images were chosen to form the basis of the spoof images.
Next, the authors enlisted 8 data collectors and 2 annotators to develop a rigorous collection process, ensuring sufficient variation in angles, shapes, and devices used for spoof image capturing.
They planned three collection dimensions, as shown in the image below:
- Angles: While recapturing the attack medium, its angle relative to the camera varies across five directions: vertical, down, up, forward, and backward, with inclination from -30° to +30°. These are orientations of the medium and camera, not changes to the photographed person's head pose.
- Shapes: Attack media are presented flat, folded inward or outward, or with a corner bend.
- Devices: Twenty-four sensors across PCs, tablets, phones, and cameras introduce varied recapture conditions.
In addition to the images themselves, CelebA-Spoof also organizes semantic information for each image.
The Live images retain the original 40 facial attributes from CelebA, such as gender, hairstyle, glasses, smile, etc. These attributes, though not originally designed for anti-spoofing tasks, are introduced into the FAS domain for the first time, providing extra clues for the model to understand "facial naturalness."
For Spoof images, three additional semantic attributes are added:
- Spoof Type
- Illumination
- Environment
Environment and illumination define the 8 sessions (2 environments × 4 lighting conditions). Outdoor spoof images expand the capture conditions, but are not unprecedented in FAS datasets: CeFA already included outdoor print attacks.
Finally, the authors also planned the statistical characteristics of CelebA-Spoof:
- Total Images: 625,537 images, with a Live/Spoof ratio of about 1:3.
- Face Bounding Box Size: Mainly between 0.01M and 0.1M pixels, close to mobile phone shooting conditions.
- Train/Validation/Test Split: Split as 8:1:1, with strict guarantees that subjects do not overlap across the three datasets, preventing models from learning "this face has been seen before."
- Lighting Condition Distribution: In addition to normal lighting, it includes 12% dark, 11% back light, and 19% strong light.
- Attack Type Distribution Balance: This allows the model to learn consistent features across various spoof types.
The table below compares CelebA-Spoof with other datasets:
Model Architecture
In addition to the dataset, the authors also proposed a model architecture to test this dataset, called:
- AENet (Auxiliary Information Embedding Network).
As shown in the image above, AENet is not a typical deep network architecture with a stacked design, but rather integrates the multi-level annotation information provided by the CelebA-Spoof dataset through shared backbone features + dual-branch task decoupling.
Let’s break down the structure:
The main body of AENet consists of a pre-trained CNN backbone used to extract mid- to high-level semantic features from the input image. Based on this, the model extends three functional modules:
-
Main Classification Branch (Green): Responsible for predicting whether the image is Live or Spoof, using a traditional softmax classifier.
-
Semantic Prediction Branch (Orange): Using three fully connected prediction heads, this branch predicts three types of semantic information:
- : Facial attributes (for live images)
- : Spoof type (e.g., print, screen replay)
- : Illumination conditions (e.g., low light, backlight)
Training uses the following target encoding:
- Spoof images receive an all-zero target. This is an auxiliary-task encoding, not a claim that attack images cannot show glasses or hairstyles.
- Live images receive “No attack” for and “No illumination” for . The latter means the spoof lighting labels are not applicable, not that a genuine photograph has no illumination.
-
Geometric Prediction Branch (Blue): Through two convolution layers followed by upsampling, the output size is , producing:
- : Depth Map
- : Reflection Map
These maps are auxiliary targets produced by models, not sensor measurements of physical depth and reflectance:
- Spoof depth targets are set to zero to distinguish them from live pseudo-depth targets. A physical 3D mask still has depth.
- Reflection maps provide another recapture cue, without guaranteeing recovery of the material’s true optical properties.
The authors define two loss functions for the three branches, corresponding to the multi-task learning scenario of semantics and geometry.
-
Semantic Learning Loss ():
- : Binary classification task loss (softmax)
- : Facial attribute prediction (binary cross entropy)
- : Spoof type and illumination conditions (softmax)
- Hyperparameters set as: , ,
These coefficients balance auxiliary losses and are experimental settings. Their numerical values should not be interpreted as direct measures of information reliability.
-
Geometric Learning Loss ():
- , : Mean squared error (MSE) for depth and reflection supervision
- The weights are set as
For the generation of ground truth, the authors defined the supervision logic rigorously:
- The depth map for Live images is predicted by PRNet (see Supplementary Info 1).
- The reflection map for Spoof images comes from methods in previous literature (see Supplementary Info 2).
- Spoof depth and live reflection targets are zeroed by design.
Evaluation Metrics
Different papers use different metrics, which can be confusing for readers.
To address this, the authors standardized the following evaluation metrics:
- APCER: The proportion of Spoof images misclassified as Live
- BPCER: The proportion of Live images misclassified as Spoof
- ACER: The average of APCER and BPCER
- EER: Equal Error Rate (the point of intersection where false positive and false negative rates are equal)
- HTER: Half Total Error Rate (commonly used in cross-dataset testing)
- Recall@FPR: Genuine-sample recall at a specified attack acceptance rate. The main tables use FPRs of 1%, 0.5%, and 0.1%. The appendix also defines the inverse view, FPR at fixed recall; do not confuse the two.
- AUC: Area Under the ROC Curve (an overall classification ability indicator)
Within-dataset evaluation reports APCER, BPCER, ACER, EER, AUC, and recall at fixed FPR; cross-dataset evaluation uses HTER. Here APCER pools spoof samples, so it should not be conflated with an APCER calculated for the worst attack category. Cross-dataset thresholds follow the paper’s source-data EER procedure; an optimal target-test threshold is not a known deployment parameter.
Discussion
Ablation Study
As shown in the table above, the authors compared three models:
- Baseline: Only uses binary supervision for Live/Spoof.
- : Only uses semantic supervision (no classification task).
- : Learns both classification and semantic information simultaneously.
-
Question 1: Can semantic information classify by itself?
The results show:
- has 4.17% ACER, above the baseline's 3.8%. Its EER and BPCER are slightly lower, though, so it is not worse on every metric.
- reduces ACER to 2.85%, showing that semantic information helps as auxiliary supervision in this experiment.
-
Question 2: Which semantic information is the most important?
The authors further analyzed the impact of individual semantic dimensions:
- Removing Spoof Type () → APCER rises from 4.62% to 5.31%.
- Removing Face Attribute () → BPCER rises from 1.09% to 1.37%.
In this ablation, helps with spoof errors and with live errors.
In addition to semantic information, the authors also conducted an ablation study on geometric information, testing the following:
For ACER, depth-only reaches 4.51%, above the classification baseline's 3.8%, while reduces it to 3.26%. The other metrics do not all improve together.
Finally, the authors explored the impact of different geometric information on classification:
In figure (a), Replay attacks have lower APCER with (retaining the reflection map). This is consistent with the paper's reading that reflection cues help on replay attacks.
For Print attacks, (retaining the depth map) has the lowest APCER on Posters; the differences for A4 and Photos are smaller. This supports a role for depth cues in some print attacks.
Now looking at image (b), we can see an important observation: the depth map is very sensitive to illumination.
For A4 attacks, excluding the dark samples and keeping only normal, strong, and backlit samples markedly lowers APCER for . This comparison shows that dark samples affect that model's A4 result; it does not make the other three conditions uniformly "stable." The paper attributes the difference to depth supervision's sensitivity to darkness, but the figure does not report a separate error rate for every dark sample.
Overall, neither semantic nor geometric information alone reliably replaces classification supervision in these ablations. As auxiliary tasks, they each improve some reported metrics.
Conclusion
CelebA-Spoof was a leap in scale, and its three axes of semantics, geometry, and capture context made it possible to study FAS as more than a bare Live/Spoof decision. Auxiliary depth supervision existed before this paper; its contribution was to combine a much larger dataset with rich labels and a unified way to test those signals.
For later research, the dataset and baselines became a practical starting point for pretraining and benchmarking. There is a caveat beneath that sturdy foundation: Live images come from CelebA, while Spoof images are recaptures, so a model may learn source and capture-process differences alongside attack cues. That is an inference from how the dataset was built; generalization still needs testing on other sources.