Skip to content

zsdonghao/text-to-image

Repository files navigation

Text To Image Synthesis

This is an experimental tensorflow implementation of synthesizing images. The images are synthesized using the GAN-CLS Algorithm from the paper Generative Adversarial Text-to-Image Synthesis. This implementation is built on top of the excellent DCGAN in Tensorflow. The following is the model architecture.

Model architecture

Image Source : Generative Adversarial Text-to-Image Synthesis Paper

Requirements

Datasets

  • The model is currently trained on the flowers dataset. Download the images from here and save them in 102flowers/102flowers/*.jpg. Also download the captions from this link. Extract the archive, copy the text_c10 folder and paste it in 102flowers/text_c10/class_*.

Codes

  • train_dcgan.py use DCGAN to generate new images.
  • train_txt2im.py use GAN-CLS to generate new images conditioned on text.
  • utils.py helper functions.

References

Credits

License

Apache 2.0