AI-Face-FairnessBench

March 2, 2026 Β· View on GitHub

License: CC BY-NC 4.0 Release .10 PyTorch Python

AI-Face-FairnessBench

This repository is the official implementation of our paper AI-Face: A Million-Scale Demographically Annotated AI-Generated Face Dataset and Fairness Benchmark

πŸŽ‰πŸŽ‰πŸŽ‰ Our AI-Face has been accepted by CVPR 2025!

🚨Call for Participation: NeurIPS 2025 Competition on Fairness in AI Face Detection!

We’re thrilled to announce the Competition of Fairness in AI Face Detection, held at the 2nd Workshop on New Trends in AI-Generated Media and Security (AIMS) @ NeurIPS 2025

πŸ”—Competition Website: https://sites.google.com/view/aifacedetection/home

Dataset Overview

Welcome to our work AI-Face, for fairness benchmark in AI-generated face detection.

In this work, we propose: (1) a million-scale demographically annotated with 37 distinct generations methods; and (2) a comprehensive fairness benchmark for training, evaluation, and analysis.

AI-Face Dataset Highlight: The key features of our proposed AI-Face dataset are as follows

βœ… Demographic Annotation: AI-Face provides Skin Tone, Gender, Age annotations, which are highly salient to measuring bias.

βœ… Forgery Diversity: AI-Face comprises 37 distinct deepfake techniques from Deepfake Vidoes, GAN, and Diffusion Models (both representive and SOTA methods are included), facilitating the detection of nowadays' SOTA deepfakes and AIGCs.

βœ… Forgery Scale: AI-Face offers million-level AI-generated data scale for face image.

License

The AI-Face Dataset is licensed under CC BY-NC-ND 4.0

Download

You can access and download the images of AI-Face dataset here.

You can download the annotations here If you have any questions, please send an email to lin1785@purdue.edu, hu968@purdue.edu

1. Installation

You can run the following script to configure the necessary environment:

cd AI-Face-FairnessBench
conda create -n FairnessBench python=3.9.0
conda activate FairnessBench
pip install -r requirements.txt

2. Dataset Preparation and Description

After getting our AI-Face dataset, put the provided train.csv and test.csv within AI-Face dataset under ./dataset.

train.csv and test.csv is formatted:

ColumnDescription
Image PathPath to the image file
GenderGender label: 1 - Male, 0 - Female
AgeAge label: 0 - Child, 1 - Youth, 3 - Adult, 4 - Middle-aged, 5-Senior
Skin ToneSkin Tone label: Monk Skin Tone Scale
Intersection0-(Female,Light), 1-(Female,Medium), 2-(Female,Dark), 3-(Male,Light), 4-(Male,Medium), 5-(Male,Dark)
TargetLabel indicating real (0) or fake (1) image

Instructions

  1. Download image tar files.
  2. Untar each file.
  3. Organize the data as shown below:
AI-Face Dataset

β”œβ”€β”€ deepfakes
  β”œβ”€β”€ dfd
  β”œβ”€β”€ dfdc
  β”œβ”€β”€ ...
β”œβ”€β”€ GANs
  β”œβ”€β”€ AttGAN
  β”œβ”€β”€ STGAN
  β”œβ”€β”€ ...
β”œβ”€β”€ DMs
  β”œβ”€β”€ Palette
  β”œβ”€β”€ StableDiffusion1.5
  β”œβ”€β”€ ...
β”œβ”€β”€ Real
  β”œβ”€β”€ FFHQ
  β”œβ”€β”€ imdb_wiki

3. Load Pretrained Weights

Before running the training code, make sure you load the pre-trained weights. You can download Xception model trained on ImageNet (through this link).

4. Train

To run the training code, you should first go to the ./training/ folder, then run train_test.py:

cd training

python train_test.py 

You can adjust the parameters in train_test.py to specify the parameters, e.g., model, batchsize, learning rate, etc.

--lr: learning rate, default is 0.0005.

--train_batchsize: batchsize for training, default is 128.

--test_batchsize: batchsize for testing, default is 32.

--datapath: /path/to/dataset.

--model: detector name ['xception', 'efficientnet', 'core', 'ucf', 'srm', 'f3net', 'spsl', 'daw_fdd', 'dag_fdd', 'fair_df_detector'], default is 'xception'.

--dataset_type: dataset type loaded for detectors, default is 'no_pair'. For 'ucf' and 'fair_df_detector', it should be 'pair'.

πŸ“ Note

To train ViT-b/16 and UnivFD, please run train_test_vit.py and train_test_clip.py, respectively.

πŸ“¦ Provided Detectors

File namePaper
Xceptionxception_detector.pyXception: Deep learning with depthwise separable convolutions
EfficientNet-B4efficientnetb4_detector.pyEfficientnet: Rethinking model scaling for convolutional neural networks
ViT-B/16train_test_vit.pyAn Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
UCFucf_detector.pyUCF: Uncovering Common Features for Generalizable Deepfake Detection
UnivFDtrain_test_clip.pyTowards Universal Fake Image Detectors that Generalize Across Generative Models
COREcore_detector.pyCORE: Consistent Representation Learning for Face Forgery Detection
F3Netf3net_detector.pyThinking in Frequency: Face Forgery Detection by Mining Frequency-aware Clues
SRMsrm_detector.pyGeneralizing Face Forgery Detection with High-frequency Features
SPSLspsl_detector.pySpatial-Phase Shallow Learning: Rethinking Face Forgery Detection in Frequency Domain
DAW-FDDdaw_fdd.pyImproving Fairness in Deepfake Detection
DAG-FDDdag_fdd.pyImproving Fairness in Deepfake Detection
PG-FDDfair_df_detector.pyPreserving Fairness Generalization in Deepfake Detection

πŸš€ Checkpoints

Checkpoints of detectors trained on our AI-Face can be downloaded through the link.

πŸ“’ Update Notes

This is our second version of the dataset; here, we list the key differences between the first version. For more details on the initial version, refer to our paper.

  1. Annotation Difference. We have Gender, Age, and Race categories in the first version. See the updated annotations in the second version.
ColumnDescription
Image PathPath to the image file
Uncertainty Score GenderUncertainty score for gender annotation
Uncertainty Score AgeUncertainty score for age annotation
Uncertainty Score RaceUncertainty score for race annotation
Ground Truth GenderGender label: 1 - Male, 0 - Female
Ground Truth AgeAge label: 0 - Young, 1 - Middle-aged, 2 - Senior, 3 - Others
Ground Truth RaceRace label: 0 - Asian, 1 - White, 2 - Black, 3 - Others
Intersection0-(Male,Asian), 1-(Male,White), 2-(Male,Black), 3-(Male,Others), 4-(Female,Asian), 5-(Female,White), 6-(Female,Black), 7-(Female,Others)
TargetLabel indicating real (0) or fake (1) image
  1. We used VGGFace2 for annotator training in the first version, while IMDB-WIKI, the gender and age labels from IMDB-WIKI were crawled from Wikipedia and IMDb website, which makes sure the label quality is higher and more reliable.

  2. The difference in the subsets of different versions of AI-Face includes:

CategoryAI-Face v1AI-Face v2
Deepfake Video DatasetsFF++, DFDC, DFC, Celeb-DF-v2FF++, DFDC, DFD, Celeb-DF-v2
GAN Models (10 total)AttGAN, MMDGAN, StarGAN, StyleGANs, MSGGAN, ProGAN, STGAN, VQGANAttGAN, MMDGAN, StarGAN, StyleGANs, MSGGAN, ProGAN, STGAN, VQGAN
DM Models (8 total)DALLE2, IF, Midjourney, DCFace, Latent Diffusion, Palette, Stable Diffusion v1.5, Stable Diffusion InpaintingDALLE2, IF, Midjourney, DCFace, Latent Diffusion, Palette, Stable Diffusion v1.5, Stable Diffusion Inpainting
Fake Face Images1,245,6601,245,660
Real Source DatasetsFFHQ, CASIA-WebFace, IMDB-WIKI, CelebA, real images from FF++, DFDC, DFD, Celeb-DF-v2FFHQ, IMDB-WIKI, real images from FF++, DFDC, DFD, Celeb-DF-v2
Total Real Face Images866,096400,885
Total Subsets3028
Generation Methods5 in FF++, 5 in DFD, 8 in DFDC, 1 in A-Celeb-DF-v2, 10 GANs, 8 DMs5 in FF++, 5 in DFD, 8 in DFDC, 1 in Celeb-DF-v2, 10 GANs, 8 DMs

If you use the AI-face dataset in your research, please cite our paper as:

@inproceedings{lin2025aiface,
  title={AI-Face: A Million-Scale Demographically Annotated AI-Generated Face Dataset and Fairness Benchmark},
  author={Li Lin and Santosh and Mingyang Wu and Xin Wang and Shu Hu},
  booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
  year={2025}
}

Acknowledgement

We acknowledge that part of our code is adapted from DeepfakeBench (NeruIPS 2023), if you cite our paper, please consider citing their paper as well:

@article{yan2023deepfakebench,
  title={Deepfakebench: A comprehensive benchmark of deepfake detection},
  author={Yan, Zhiyuan and Zhang, Yong and Yuan, Xinhang and Lyu, Siwei and Wu, Baoyuan},
  journal={arXiv preprint arXiv:2307.01426},
  year={2023}
}