Skip to content

valentinwust/cycleGAN-Implementation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cycleGAN-Implementation

Our own implementation of cycleGAN (https://junyanz.github.io/CycleGAN/).

Training

For training, run train.py with the following flags:

  • --name the name for the new model, e.g. test_model
  • --dataroot folder with the dataset, should have subfolders trainA and trainB
  • --preprocess default is crop, where random patches of 256x256 (can be changed with --crop_size) are cropped from the images and used for training. Other possibility is none, where the dataloader only ensures that the size of the image is divisible by four.

To continue training from the latest version of a model, add --load_model. The epoch where training should resume can be set with --epoch.

All other optional flags can be found at the beginning of util.py with a short explanation. --name and --dataroot are always required, all other flags are optional.

Dataset

The dataset should contain two folders, trainA and trainB, with training images from the two domains. To avoid fixed pairs, the dataloader iterates through all (shuffled) images in domain A, and pairs each of them with a random image from domain B.

Testing

For testing, run test.py with the following flags:

  • --name the name of the model
  • --dataroot folder with the images, e.g. datasets/test_data/testA
  • --preprocess none if cropping should be turned off for testing
  • --load_model_name the name of the generator that should be loaded, e.g. G_A__latest

This loads a model with only one generator, which saves memory and allows using larger images at test time.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages