Skip to content

yueying-teng/cycleGAN_if_monet_loved_dogs_more

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

If Monet Loved Dogs More

Sister repos:

Training Data

  • All of Monet's paintings parsed from wikiart.org
  • Stanford dog dataset from Kaggle

Details

  • for the dog dataset, images that meet both of the following conditions are used during training
    • object size to image size ratio greater than 0.8
    • both image hight and width are greater than 256
    • however, while training, images with one side greater than 512 are likely to cause memory issues.
    • therefore, images are resized to be less than or equal to 512x512 in the data generator
    • in the end 1362 pairs of images are used in the training with monet's paintings being the bottleneck

How to use

# build the container
docker build -f Dockerfile.train -t monet_cyclegan .

# start the container
docker run --gpus all -v $(pwd):/work -p 8888:8888 -p 6006:6006 -it monet_cyclegan

# start jupyter notebook
jupyter notebook --ip=0.0.0.0 --allow-root

# see details about the following steps in the notebook folder
  # data preparation
  # model training
  # model preparation for Tensorflow Serving

Implementations

  • an image buffer that stores previously generated images. this is used to update discriminators using a history of generated images
  • linearly decreases the learning rate to 0 only after the first 100 epochs
  • BCE and MSE loss
  • U-Net and ResNet generator

Training Details

  • ResNet based generator and 3-layer PatchGAN discriminator
  • LS GAN loss
  • image buffer with pool size: 50
  • learning rate decay (linearly towards 0 after the first 100 epochs)
  • 200 epochs with batch size 1

Gallery

click here

App

Check it out !