• Stars
    star
    127
  • Rank 281,965 (Top 6 %)
  • Language
    Jupyter Notebook
  • License
    MIT License
  • Created almost 7 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Code for my Master thesis on "Capsule Architecture as a Discriminator in Generative Adversarial Networks".

Capsule GAN

Link to the paper

Code for my Master thesis on "Capsule Layer as a Discriminator in Generative Adversarial Networks". In order to reproduce results, follow the "capsule_gan" Jupyter notebook that contains:

  • Dataset loading and preprocessing
  • Both Discriminator and Generator structures
  • Training, loss functions
  • Image outputs
  • Metrics visualization

But first you may want to install Miniconda and corresponding dependencies from environment.yml: conda env create -f environment.yml within the project directory as well as install required tools for GPU computing. If no GPU is going to be used - delete the tensorflow-gpu line from environment.yml.

Generated images

MNIST_output CIFAR10_output

All generated MNIST images over 30k epochs All generated CIFAR10 images over 30k epochs

Generator weights for MNIST Generator weights for CIFAR10

Thanks to @eriklindernoren (https://github.com/eriklindernoren/Keras-GAN) who I borrowed the Keras implementation of DCGAN from and @XifengGuo (https://github.com/XifengGuo/CapsNet-Keras) who I took the squashing function from.