Re-implement CycleGAN in Tensorlayer

Prerequisites:

  • Tensorlayer
  • TensorFlow
  • Python

Run:

CUDA_VISIBLE_DEVICES=0 python main.py Copy the code

(if datasets are collected by yourself, you can use dataset_clean.py or dataset_crop.py to pre-process images)

Theory:

The generator process:

The discriminator process:

Result Improvement

  • Data augmentation
  • Resize convolution[4]
  • Instance normalization[5]

data augmentation:

Example Normalization (Comparision by original paperArxiv.org/abs/1607.08…:

Resize convolution (Remove Checkerboard Artifacts):

Final Results:

Reference:

  • [1] the Original Paper: arxiv.org/pdf/1703.10…
  • [2] Original Implement in Torch: github.com/junyanz/Cyc…
  • [3] TensorLayer by HaoDong: github.com/zsdonghao/t…
  • [4] the Resize Convolution: distill. Pub / 2016 / deconv…
  • [5] the Instance Normalization: arxiv.org/abs/1607.08…