Experiments with face editting along axis in latent space with StyleGAN — I reconstructed stylegan`s work from several repositories for generated and real images, combine them, tried to find pitch_boundary(for pitch-axis) from several photos with my 'by-eye' scores. Added scripts for generating faces of persons that do not exist and interpolating with params in latent space.
I used conda (channels: conda-forge pytorch) for the packages:
tqdm
numpy
pillow
tensorflow==1.15.0
tensorflow-gpu
keras
dlib
opencv
imutils
torch
https://colab.research.google.com/drive/1LoQtE8UJfICMa4_bCernbjCcC784P2kw?usp=sharing
- download pre-trained stylegan_ffhq-generator model, pre-trained stylegan_celebahq-generator model, or pre-trained pggan_celebahq-generator model, to the models/pretrain folder.
- generate faces of persons (1-4 batch!) that do not exist:
python generate_photo.py --num_samples=4 --noise_seed=1 --resolution=1024
- edit faces in latent space with params (one can change each parameter in params.json within (-3, 3)):
python manipulate_photo_with_params.py --latent_file='latents/sample_base.npy' --params_file='params.json' --resolution=1024
- generate linear interpolations in latent space with bound parameters from params.json
python linear_interpolations.py --latent_file='latents/sample_base.npy' --params_file='params.json' --num_steps=6 --resolution=1024 --show_interpolations=False
