Skip to content

SeeeeShiwei/StarGAN-Tensorflow

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StartGAN-Tensorflow

  • Tensorflow implement of StarGAN: Unified Generative Adversarial Networks for Multi-Domain Image-to-Image Translation.[Paper]
  • Borrowed code and ideas from yunjey's StarGAN: https://github.com/yunjey/StarGAN.

Install Required Packages

First ensure that you have installed the following required packages:

See requirements.txt for details.

Datasets

  • In this implementation of the StarGAN, we use CelebA dataset.
  • Run the download.sh to download the dataset, you can put it in the datasets folder. The CelebA dataset which you downloaded inculdes CelebA crop images and attribute labels.
  • CelebA attribute labels can be seen in list_attr_celeba.txt, there are 40 attributes totally. It is a binary attribute, 1 represent the image has this attribute, -1 represent the image has not this attribute. You can see the README.md of CelebA dataset for detial.

Training and Testing Model

  • Run the following script to train the model, in the process of training, will save the training images every 500 steps. See the model/stargan.py for details.
sh train.sh

You can change the arguments in train.sh depend on your machine config.

  • Run the following script to test the trained model. The test.sh will transform the datasets.
sh test.sh

The script will load the trained StarGAN model to generate the transformed images. You could change the arguments in test.sh depend on your machine config.

Downloading data/trained model

Discussion

  • In the process of training, you will see the loss change greatly, and the generated results is also not good. I guess the loss function is not well, so, we can try other loss function. If you have other ideas about my project, please contact me.

About

Tensorflow implement of StarGAN

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 96.6%
  • Shell 3.4%