BabyGAN
Check how it works online:
StyleGAN-based predictor of children's faces from photographs of theoretical parents. The latent representation is extracted from the input images, after which the algorithm mixes them in certain proportions. The neural network model is based on the GAN architecture. Using latency direction, you can change various parameters: age, face position, emotions and gender.
Based on: StyleGAN
Encoder: StyleGAN-Encoder
Pre-train Models and dictionaries
Follow the LINK and add shortcut to Drive:
The folder structure should be:
.
โโโ data
โ โโโ finetuned_resnet.h5
โโโ karras2019stylegan-ffhq-1024x1024.pkl
โโโ shape_predictor_68_face_landmarks.dat.bz2
โโโ vgg16_weights_tf_dim_ordering_tf_kernels_notop.h5
โโโ vgg16_zhang_perceptual.pkl
โโโ ...
Prerequisites
- 64-bit Python 3.6 installation.
- TensorFlow 1.10.0 with GPU support.
- One or more high-end NVIDIA GPUs with at least 11GB of DRAM.
- NVIDIA driver 391.35 or newer, CUDA toolkit 9.0 or newer, cuDNN 7.3.1 or newer.
Generating latent representation of your images
You can generate latent representations of your own images using two scripts:
- Create folders for photos
mkdir raw_images aligned_images
- Extract and align faces from images
python align_images.py raw_images/ aligned_images/
- Find latent representation of aligned images
python encode_images.py aligned_images/ generated_images/ latent_representations/
Usage BabyGAN
- SOON