- Combine BicycleGAN(idea of using latent classifier as style encoder) and EigenGAN
- Way to translate input image with disentangled latent input
- Most code brought from AttGAN and EigenGAN
- epoch 61 trained model output (img size 128, g recon loss 100.0, z_dims 7 * 7)
- first col / second col / remian col
- ori source img / reconstruction img / output results when set latent value -4.5 to 4.5 on firstlayer
- bicycleEigenGAN.ipynb
-
Environment
-
Python 3.6
-
TensorFlow 1.15
-
OpenCV, scikit-image, tqdm, oyaml
-
we recommend Anaconda or Miniconda, then you can create the environment with commands below
conda create -n EigenGAN python=3.6 source activate EigenGAN conda install opencv scikit-image tqdm tensorflow-gpu=1.15 conda install -c conda-forge oyaml
-
NOTICE: if you create a new conda environment, remember to activate it before any other command
source activate EigenGAN
-
-
Data Preparation
-
CelebA-unaligned (10.2GB, higher quality than the aligned data)
-
download the dataset
-
img_celeba.7z (move to ./data/img_celeba/img_celeba.7z): Google Drive or Baidu Netdisk (password rp0s)
-
annotations.zip (move to ./data/img_celeba/annotations.zip): Google Drive
-
-
unzip and process the data
7z x ./data/img_celeba/img_celeba.7z/img_celeba.7z.001 -o./data/img_celeba/ unzip ./data/img_celeba/annotations.zip -d ./data/img_celeba/ python ./scripts/align.py
-
-
- ResNet
- Vae
- random z input
- tune hyperparameter
- test quality using Fréchet Inception Distance
- test diversity using lpips