Kyfafyd / MirrorGAN

Reproduction of the paper MirrorGAN: Learning Text-to-image Generation by Redescription
MIT License
25 stars 4 forks source link
image-captioning mirrorgan pytorch text2image

This repo is under construction


This repo is an unofficial reproduction of paper MirrorGAN: Learning Text-to-image Generation by Redescription

avatar

Getting Started

Dependencies

Dataset

Official Dataset

Your Own Dataset

Pretrained STEM/STREAM

Below pretrained models are for birds dataset, if you want to apply MirrorGAN to your own dataset, please follow preprocess.py and pretrain section.

STEM

STREAM

Train/Test

Pretrain

# STEM
cd GLAM
python2 pretrain_DAMSM.py

# STREAM
cd STREAM
python2 resize.py
python2 build_vocab.py
python2 train.py

Train

cd GLAM
python2 mian.py

Test

cd GLAM
python2 mian.py --cfg cfg/eval_bird.yml

Contact

If you have any questions, please feel free to contact ZHAO WANG

Reference

MirrorGAN: Learning Text-to-image Generation by Redescription

AttnGAN: Fine-Grained Text to Image Generation with Attentional Generative Adversarial Networks

Image Captioning