gusgad / capsule-GAN

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

Home Page:https://drive.google.com/file/d/15g9VFyGwjPnGcTzjXEDwvGpfNvPuRXqB/view?usp=sharing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About

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

https://drive.google.com/file/d/15g9VFyGwjPnGcTzjXEDwvGpfNvPuRXqB/view?usp=sharing

License:MIT License


Languages

Language:Jupyter Notebook 100.0%