This is the Pytorch implementation of our ICCV 2021 paper
SynFace: Face Recognition with Synthetic Data.
Haibo Qiu, Baosheng Yu, Dihong Gong, Zhifeng Li, Wei Liu and Dacheng Tao
Main packages:
- python=3.6.7
- pytorch=1.8.1
- torchvision=0.9.1
- cudatoolkit=10.2.89
Or directly create a conda env with
conda env create -f environment.yml
-
Clone this repo:
git clone https://github.com/haibo-qiu/SynFace.git
-
Clone the DiscoFaceGAN and insert our files as the mixup face generator (To run DiscoFaceGAN, you also need to satisfy its requirements.):
git clone https://github.com/microsoft/DiscoFaceGAN.git data/DiscoFaceGAN cp data/syn_factors.py data/DiscoFaceGAN/ cp data/syn_images.py data/DiscoFaceGAN/
-
Generate the face images with identity mixup, following with face alignment and crop:
bash data/syn.sh
-
(Optional) Check our generated synthetic dataset via this google drive link.
-
Download the real face data CASIA and LFW from this link
-
Put all these data into
data/datasets/
Simply run the following script:
bash run.sh
To reproduce the results in our paper, please download the pretrained models and put them in pretrained/
, then run:
bash eval.sh
The code of face alignment and crop data/imgs_crop/
is borrowed from face.evoLVe and re-written with multi-processing for acceleration.
If you use our code or models in your research, please cite with:
@inproceedings{qiu2021synface,
title={SynFace: Face Recognition with Synthetic Data},
author={Qiu, Haibo and Yu, Baosheng and Gong, Dihong and Li, Zhifeng and Liu, Wei and Tao, Dacheng},
booktitle={Proceedings of the IEEE/CVF International Conference on Computer Vision},
pages={10880--10890},
year={2021}
}