Generating Image Sequence from Description with LSTM Conditional GAN

Xu Ouyang, Xi Zhang, Di Ma, Gady Agam

TL;DR

This paper introduces an LSTM-Conditional GAN architecture that generates images sequentially, word-by-word, from a textual description. This approach allows for a more nuanced understanding of sentence semantics and results in more detailed and realistic image synthesis compared to previous methods that generate a single image per description.

What Problem Does This Paper Address?

Generating realistic images from textual descriptions is a long-standing challenge in AI. While Generative Adversarial Networks (GANs) have shown promise in creating lifelike images, they often struggle with high-resolution synthesis and accurately capturing the intricate details described in natural language. Existing methods might generate a single image for an entire sentence, potentially missing the gradual semantic progression within the description. This paper aims to bridge this gap by developing a model that can progressively generate an image as it processes each word of a sentence, thereby improving both the realism and the semantic accuracy of the generated visuals.

Methods

The core of this work is the LSTM Conditional Generative Adversarial Network (LSTM-CGAN). The architecture comprises three main components:

  • LSTM: This component processes the input sentence word by word. It learns the semantic meaning and relationships between words, capturing the evolving structure of the description. The LSTM outputs feature vectors for each word.
  • Generator (G): This network takes the LSTM's word-level features as input and synthesizes an image. Crucially, the generator produces an image for each word in the sentence, allowing for a step-by-step image construction.
  • Discriminator (D): This network is tasked with distinguishing between real images and the generated images. It's conditioned on a "skip-thought vector" representing the overall sentence meaning, ensuring that the generated images are semantically relevant to the entire description.

A key innovation is the word-by-word adversarial loss. Instead of applying a single adversarial loss at the end of sentence processing, the discriminator evaluates each intermediate image generated by the generator. This provides more frequent gradient updates and allows the generator to learn from the semantic contribution of each word, leading to finer details and better overall image quality. The authors also introduce a modified objective function for the discriminator, which includes a term to penalize real images paired with mismatched text, further improving the sharpness and accuracy of generated images.

Datasets

The proposed model was trained and evaluated on two established datasets:

  • Oxford-102 Flowers dataset: Contains 8,189 flower images across 102 categories, with each image having 10 descriptions.
  • Caltech-UCSD Birds-200-2011 dataset: Features 11,788 bird images from 200 categories, also with 10 descriptions per image.

The word2vec model used for word embeddings was pre-trained on a Wikipedia dataset.

Key Insights and Ideas

  • Sequential Generation for Semantic Depth: Generating images word-by-word, rather than a single image per sentence, allows the model to capture the incremental addition of semantic information. This is analogous to how humans might visualize a scene as a description unfolds.
  • Word-Level Adversarial Feedback: Applying adversarial loss at each word step provides a more granular learning signal. This helps the generator refine its output based on the specific semantic contribution of each word, leading to richer details.
  • Visualizing Sentence Semantics: The word-by-word generation process naturally produces a sequence of images that visualize how the model interprets the sentence's semantics. This offers a unique way to understand the model's internal reasoning.
  • Unified Target for Sub-Sentences: The paper argues that using the same real image as a target for multiple sub-sentences within a description is not only feasible but beneficial. It helps the GAN focus on a common goal, even as additional details are introduced.

Key Results

  • Improved Realism and Detail: The proposed LSTM-CGAN consistently produced more realistic and detailed images compared to previous state-of-the-art approaches, including a conditional GAN [18] and a DRAW network [11].
  • Quantitative Similarity: Evaluations using VGG-16 features and Structural Similarity Index (SSI) showed that the generated images captured the content of real images better, both at a large and small scale.
  • Qualitative Visualizations: Figure 5 and 6 demonstrate the model's ability to generate images that accurately reflect color and structural descriptions. Figure 6, in particular, shows how the generated image progressively matches the description as more words are processed.
  • Gradual Improvement: Figure 8 illustrates that the similarity between generated and real images increases as more words of the sentence are processed, confirming the model's ability to build upon previous semantic information.

Limitations and Future Work

  • Image Size: The experiments were conducted on 64x64 images. The authors acknowledge that generating higher-resolution images remains a challenge.
  • Theoretical Explanation: While experimental results show that sub-sentences are mapped to images with corresponding descriptions, the theoretical underpinnings of this behavior are still under investigation.
  • Future Work: The authors express a desire to generate even more realistic images from descriptions in future work.

Summary updated

Abstract

Generating images from word descriptions is a challenging task. Generative adversarial networks(GANs) are shown to be able to generate realistic images of real-life objects. In this paper, we propose a new neural network architecture of LSTM Conditional Generative Adversarial Networks to generate images of real-life objects. Our proposed model is trained on the Oxford-102 Flowers and Caltech-UCSD Birds-200-2011 datasets. We demonstrate that our proposed model produces the better results surpassing other state-of-art approaches.
BibTeX
@misc{ouyang2018generating,
  author = {Xu Ouyang and Xi Zhang and Di Ma and Gady Agam},
  title = {{Generating Image Sequence from Description with LSTM Conditional GAN}},
  year = {2018},
  eprint = {1806.03027},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1806.03027},
}
Figure