This project implements CycleGAN with tensorflow 2.0
you can train on tensorflow official provided dataset. download dataset with the following command
python3 download_dataset.py
also, you can create customized dataset. create two directories "A" and "B" respectively under current directory. put dataset with style A in directory A and ones with style B in directory B. create dataset with the following command
python3 create_dataset.py
after executing successfully, you can find two newly created tfrecord file under directory dataset.
train the model with the following command
python3 train.py
after the training is completed, use the following command to save the model to h5
my pretrained model is shared here.
python3 save_model.py
test on trained model with the following command
python3 test.py
the style translated images of the testset are shown in sequence.
some experimental results of my implement is shown below.