Source
- ROCm compatible version of this repository - CycleGAN-Tensorflow-2
Tensorflow 2 implementation of CycleGAN.
Paper: Unpaired Image-to-Image Translation using Cycle-Consistent Adversarial Networks
Author: Jun-Yan Zhu et al.
row 1: summer -> winter -> reconstructed summer, row 2: winter -> summer -> reconstructed winter
row 1: horse -> zebra -> reconstructed horse, row 2: zebra -> horse -> reconstructed zebra
row 1: apple -> orange -> reconstructed apple, row 2: orange -> apple -> reconstructed orange
-
Prerequisites
- Tensorflow 2.0
pip install tensorflow-rocm==2.0.0b3
- (if you meet "tf.summary.histogram fails with TypeError"
pip install --upgrade tb-nightly
) - scikit-image, oyaml, tqdm
- Python 3.6
- ROCm 2.7
- Tensorflow 2.0
-
Dataset
-
download the summer2winter dataset
sh ./download_dataset.sh summer2winter_yosemite
-
download the horse2zebra dataset
sh ./download_dataset.sh horse2zebra
-
see download_dataset.sh for more datasets
-
-
Example of training
HIP_VISIBLE_DEVICES=0 python3 train.py --dataset summer2winter_yosemite
-
tensorboard for loss visualization
tensorboard --logdir ./output/summer2winter_yosemite/summaries --port 6006
-
-
Example of testing
HIP_VISIBLE_DEVICES=0 python3 test.py --experiment_dir ./output/summer2winter_yosemite