Skip to content
A tensorflow implementation of "Deep Convolutional Generative Adversarial Networks"
Branch: master
Clone or download
Pull request Compare This branch is 3 commits ahead, 33 commits behind carpedm20:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
web web index edit Feb 9, 2016
DCGAN.png smapler error fixes Jan 2, 2016
LICENSE update Feb 5, 2016 Working Jan 10, 2018
average.png update Feb 7, 2016 Tidy up Jan 23, 2018
list_attr_celeba.txt Tidy up Jan 23, 2018 Tidy up Jan 23, 2018

Set-condiioned DC-GAN

This is an adaptation of the standard class-conditioned DC-GAN so now generator (and discriminator) are conditioned on an additional example set (as opposed to an explicit class label) whose distribution it must match.

For a similar idea, but in an autoencoder set-up, see this paper.


This repository is based off the popular DCGAN-tensorflow. Many thanks to Taehoon Kim / @carpedm20.

It also uses a GAN regulariser given here. Many thanks to the authors.



Test on synthetic dataset:

$ python --dataset shapes --train

Or download dataset with:

$ python celebA

Train a model with downloaded dataset:

$ python --dataset celebA --use_tags --input_height=108 --train

You can use your own dataset (without central crop) by:

$ mkdir data/DATASET_NAME
$ mkdir data/DATASET_NAME/CLASS_1
... add images to data/DATASET_NAME/CLASS_1 ...
... add images to data/DATASET_NAME/CLASS_2 ...
... add images to data/DATASET_NAME/CLASS_N ...
$ python --dataset DATASET_NAME --train
$ python --dataset DATASET_NAME
$ # example
$ python --dataset=eyes --input_fname_pattern="*_cropped.png" --train

Alternatively, for each image you can create a .tags file of the same name with a list of tags separated by spaces. $ # example $ python --dataset=eyes --use_tags



5_o_clock_shadow: examples samples

bald: examples samples

bald: examples samples

Anime faces

Dataset based on extracted faces from danbooru images tagged with 500 most popular characters, roughly 400 images per character

artoria_pendragon_(all): examples samples

louise_francoise_le_blanc_de_la_valliere: examples samples

urakaze_(kantai_collection): examples samples

You can’t perform that action at this time.