Implementation of MEGAN: Mixture of Experts of Generative Adversarial Networks for Multimodal Image Generation
Switch branches/tags
Nothing to show
Clone or download
Latest commit a2b87f7 Jun 17, 2018

README.md

MEGAN

This repository is under construction. Please wait for the update slated to the nearest future!

Implementation of MEGAN: Mixture of Experts of Generative Adversarial Networks for Multimodal Image Generation


This repository provides a PyTorch implementation of Mixture of Experts GAN (IJCAI'18). Each generator in MEGAN is capable of learning salient and distinct features.

 

Paper

MEGAN: Mixture of Experts of Generative Adversarial Networks for Multimodal Image Generation
David Keetae Park1, Seungjoo Yoo1, Hyojin Bahng1, Jaegul Choo1, and Noseong Park2
   1Korea University     2University of North Carolina, Charlotte

   

Model Description

Main Networks and Gating Networks

The proposed architecture of MEGAN; (a) shows the overview of our main networks. Given a latent vector z, each of the n generators produces an output oi. The latent vector z and n feature vectors (denoted in yellow) extracted from the generators are given as input to the gating networks that produce a one-hot vector g, as shown in the middle. The chosen image by the one-hot vector (marked as "Fake Image") will be fed into the discriminator that measures the adversarial loss with regard to both real and fake classes. (b) illustrates an in-depth view on the gating networks. The gating networks output a one-hot vector g.

   

Results

On CelebA dataset

64x64 samples from MEGAN with each block of four images generated by the same generator. Noticeable differences between each block indicate that different generators produce images with different features.

LSUN-Church outdoor

64x64 samples from MEGAN with each block of four images generated by the same generator. Distinguishable features include the church architectural style, the location, and the cloud cover.

Prerequisites

 

Usage

(codes and guidelines will be updated shortly!)

1. Clone the repository

$ git clone https://github.com/heykeetae/MEGAN.git
$ cd MEGAN

2. Install datasets

  • for CelebA and LSUN
$ bash download.sh CelebA
$ bash download.sh LSUN
  • for CIFAR-10 Dataset will be automatically downloaded by the training code.

3. Train

  • CIFAR-10 python main.py --dataset cifar --batch_size 64
  • CelebA python main.py --dataset celeb --batch_size 64
  • LSUN python main.py --dataset lsun --batch_size 64

4. Results

  • 4 Folders (./data, ./logs, ./models, ./samples) will be generated. Visual samples will be generated every 100 iterations by default.
  • Two parameters, self.score_epoch and self.score_start, control the frequency of model saving and calculating quantitative measures.

Citation

If this work is useful for your research, please cite our paper.

@article{park2018megan,
  title={MEGAN: Mixture of Experts of Generative Adversarial Networks for Multimodal Image Generation},
  author={Park, David Keetae and Yoo, Seungjoo and Bahng, Hyojin and Choo, Jaegul and Park, Noseong},
  journal={arXiv preprint arXiv:1805.02481},
  year={2018}
}