Research Article

A Comparative Analysis of StackGAN and AttnGAN in Text-to-Image Generation

Runguo Wang*
Software Department, Shandong University, Shandong, China

* Corresponding author: [email protected]

Abstract

This research looks at text-to-image generation as a whole, comparing two popular models—Stacked Generative Adversarial Networks (StackGAN) and Attentional Generative Adversarial Networks (AttnGAN)—and their respective strengths and weaknesses. Text-to-image generation has seen significant advancements with the introduction of GAN-based models, and this paper aims to explore how these models perform in terms of image quality, realism, and alignment with textual descriptions. Using the Caltech-UCSD Birds (CUB)-200-2011 dataset, which consists of bird images, extensive experiments were conducted to evaluate and compare the capabilities of the two models. The results indicate that AttnGAN outperforms StackGAN across multiple metrics, particularly in the accuracy of detail alignment and overall image realism. AttnGAN's multi-level attention mechanism allows it to pay attention to specific textual elements when generating related sections of the image, resulting in more aesthetically pleasing and semantically consistent outputs. Despite these advancements, challenges remain in improving both the diversity and quality of generated images. This work offers substantial insights into the capabilities and constraints of existing models, providing guidance for future research with the aim of improving text-to-image generation.

Keywords: Text-to-Image Generation; StackGAN; AttnGAN; Attention Mechanism.
Published: November 15, 2024
DOI: 10.54254/2755-2721/105/2024TJ0055
Volume: ACE Vol.105
pp. 9-15
Download PDF

References

  1. Goodfellow I Pouget-Abadie J Mirza M et al. (2014). Generative adversarial net. Advances in neural information processing systems, 27
  2. Reed S Akata Z Yan X et al. (2016). Generative adversarial text to image synthesis. International conference on machine learning, 1060-1069
  3. Denton E L Chintala S Fergus R. (2015). Deep generative image models using laplacian pyramid of adversarial networks. Advances in neural information processing systems, 28
  4. Radford A. (2015). Unsupervised representation learning with deep convolutional generative adversarial networks. arXiv preprint 1511.06434
  5. Zhang H Xu T Li H et al. (2017). Stackgan: Text to photo-realistic image synthesis with stacked generative adversarial networks. Proceedings of the IEEE international conference on computer vision, 5907-5915
  6. Reed S Akata Z Yan X et al. (2016). Generative adversarial text to image synthesis. International conference on machine learning, 1060-1069
  7. Reed S E Akata Z Mohan S et al. (2016). Learning what and where to draw. Advances in neural information processing systems, 29
  8. Fang H Gupta S Iandola F et al. (2015). From captions to visual concepts and back. Proceedings of the IEEE conference on computer vision and pattern recognition, 1473-1482
  9. Xu K Ba J Kiros R et al. (2015). Show, attend and tell: Neural image caption generation with visual attention. International conference on machine learning, 2048-2057
  10. Xu T Zhang P Huang Q et al. (2018). Attngan: Fine-grained text to image generation with attentional generative adversarial networks. Proceedings of the IEEE conference on computer vision and pattern recognition, 1316-1324