This is the official repository of StyleDNA: A High-Fidelity Age and Gender Aware Kinship Face Synthesizer paper. (FG 2021) [colab demo]
- Linux or macOS
- Python3
- PyTorch == 1.9.0+cu111
- dlib == 19.22.1
-
Shape predictor from dlib.
-
StyleGAN2 model pretrained on FFHQ taken from rosinality with 1024x1024 output resolution.
We provide a Jupyter notebook version running on Google Colab for fast inferecing.
Download all the pretrained model weights and put them in ./pretrained_model/
Having your trained model weight, you can use ./inference.py
to test the model on a set of images.
For example,
python3 inference.py --mom_path ./test/mom.png --dad_path ./test/dad.png
We sincerely thanks for great development from other related projects, and we borrow code from
-
stylegan2: https://github.com/rosinality/stylegan2-pytorch
Copyright (c) 2019 Kim Seonghyeon
License (MIT) https://github.com/rosinality/stylegan2-pytorch/blob/master/LICENSE -
pSp: https://github.com/eladrich/pixel2style2pixel
Copyright (c) 2020 Elad Richardson, Yuval Alaluf
License (MIT) https://github.com/eladrich/pixel2style2pixel/blob/master/LICENSE -
InsightFace_Pytorch: https://github.com/TreB1eN/InsightFace_Pytorch
Copyright (c) 2018 TreB1eN
License (MIT) https://github.com/TreB1eN/InsightFace_Pytorch/blob/master/LICENSE -
dlib: http://dlib.net/face_landmark_detection.py.html
License (BSL-1.0) https://github.com/davisking/dlib/blob/master/LICENSE.txt -
Face alignment: https://gist.github.com/lzhbrian/bde87ab23b499dd02ba4f588258f57d5
If you find this code useful for your research, please cite our paper, StyleDNA: A High-Fidelity Age and Gender Aware Kinship Face Synthesizer.
@inproceedings{lin2021styledna,
title={StyleDNA: A High-Fidelity Age and Gender Aware Kinship Face Synthesizer},
author={Lin, Che-Hsien and Chen, Hung-Chun and Cheng, Li-Chen and Hsu, Shu-Chuan and Chen, Jun-Cheng and Wang, Chih-Yu},
booktitle={Proceedings of the IEEE International Conference on Automatic Face and Gesture Recognition (FG)},
year={2021}
}