/BicycleEigenGAN

combine BicycleGAN and EigenGAN

Primary LanguagePythonMIT LicenseMIT

BicycleEigenGAN

  • 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

Model structure

BicycleEigenGAN

Result

  • 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

result
result
result
result
result
result
result

Run

  • bicycleEigenGAN.ipynb

Setup (brought from EigenGAN)

  • 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

      • 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

TODO

  • ResNet
  • Vae
  • random z input
  • tune hyperparameter
  • test quality using FrĂ©chet Inception Distance
  • test diversity using lpips

Acknowledgement and References