Skip to content

Cycle-Consistent Adversarial Networks (CycleGAN) using Tensorflow 2.0

Notifications You must be signed in to change notification settings

emla2805/cycleGAN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unpaired Image-to-Image Translation (CycleGAN)

Tensorflow 2.0 implementation of Unpaired Image-to-Image Translation using Cycle-Consistent Adversarial Networks, aka. CycleGAN, with the original implementation at pytorch-CycleGAN-and-pix2pix.

CycleGAN makes it possible to translate an image from a source domain X to target domain Y, without the need of paired datasets, by learning the mapping G: X --> Y such that images from G(X) cannot be told apart from Y. Well, that's the idea anyway...

Samples

Horse -> Zebra

Zebra -> Horse

Requirements

Create a Python 3 virtual environment and activate it:

virtualenv -p python3 venv
source ./venv/bin/activate

Next, install the required dependencies:

pip install -r requirements.txt

Usage

To transform images from the test set using a pre-trained model specify the log directory containing model checkpoints.

Transform images

python transform.py \
    --log-dir log/dir/ \
    --num-samples 5

Train model

python train.py \
    --log-dir log/dir/ \
    --dataset horse2zebra

To track metrics, start Tensorboard

tensorboard --logdir log/dir/

and navigate to localhost:6006.

About

Cycle-Consistent Adversarial Networks (CycleGAN) using Tensorflow 2.0

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages