Awesome
<p align="center"> DTLC-GAN </p>
Tensorflow implementation of DTLC-GAN (CVPR 2018): Generative Adversarial Image Synthesis with Decision Tree Latent Controller.
Usage
-
Prerequisites
- Tensorflow 1.9
- Python 3.6
-
Training
- Important Arguments (See the others in train.py)
att
: attribute to learn (default:''
)ks
: # of outputs of each node of each layer (default:[2, 3, 3]
)lambdas
: loss weights of each layer (default:[1.0, 1.0, 1.0]
)--n_d
: # of d steps in each iteration (default:1
)--n_g
: # of g steps in each iteration (default:1
)--loss_mode
: gan loss (choices:[gan, lsgan, wgan, hinge]
, default:gan
)--gp_mode
: type of gradient penalty (choices:[none, dragan, wgan-gp]
, default:none
)--norm
: normalization (choices:[batch_norm, instance_norm, layer_norm, none]
, default:batch_norm
)--experiment_name
: name for current experiment (default:default
)
- Example
CUDA_VISIBLE_DEVICES=0 \ python train.py \ --att Eyeglasses \ --ks 2 3 3 \ --lambdas 1 1 1 \ --n_d 1 \ --n_g 1 \ --loss_mode hinge \ --gp_mode dragan \ --norm layer_norm \ --experiment_name att{Eyeglasses}_ks{2-3-3}_lambdas{1-1-1}_continuous_last{False}_loss{hinge}_gp{dragan}_norm{layer_norm}
- Important Arguments (See the others in train.py)
Dataset
- Celeba dataset
- Images should be placed in ./data/img_align_celeba/*.jpg
- Attribute labels should be placed in ./data/list_attr_celeba.txt
- the above links might be inaccessible, the alternatives are
- img_align_celeba.zip
- list_attr_celeba.txt
Exemplar Results
- Eyeglasses, 3 layers
- Bangs, 3 layers