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.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
all_samples
assets
web web index edit Feb 9, 2016
.gitignore
DCGAN.png smapler error fixes Jan 2, 2016
LICENSE update Feb 5, 2016
README.md
ShapesDataset.py Working Jan 10, 2018
average.png update Feb 7, 2016
check_dataset.py
download.py Tidy up Jan 23, 2018
list_attr_celeba.txt
main.py Tidy up Jan 23, 2018
model.py Tidy up Jan 23, 2018
ops.py
train_cifar.sh
utils.py

README.md

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.

Acknowledgements

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.

Prerequisites

Usage

Test on synthetic dataset:

$ python main.py --dataset shapes --train

Or download dataset with:

$ python download.py celebA

Train a model with downloaded dataset:

$ python main.py --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 main.py --dataset DATASET_NAME --train
$ python main.py --dataset DATASET_NAME
$ # example
$ python main.py --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 main.py --dataset=eyes --use_tags

Results

celebA

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.