The code repo for the paper "Learning a Spoof Pattern Generation Network with Identity Disentanglement for Semi-Supervised Cross-Domain Face Anti-Spoofing"
The network architecture of the proposed S2PLN method:
- Release training and inference code.
- Release pretrained models.
- python 3.7
- pytorch 1.7.1
- torchvision 0.8.2
- cuda 11.0
To install the required packages, you can run pip install -r requirements.txt
Download the OULU-NPU(O), CASIA-FASD(C), Idiap Replay-Attack(I), MSU-MFSD(M), MS-Celeb- 1M and LFW datasets
All video frames of the four datasets are pre-processed with the MTCNN algorithm to perform face detection and cropping, and the cropped RGB face images are resized to 224 ร 224 ร 3.
To generate the data label list, you can run the following command:
python datalabel/generate_label.py
We would like to express our gratitude to SSDG, which are of great help to our work.