Skip to main content
QUICK REVIEW

[Paper Review] Text to Image Generation with Semantic-Spatial Aware GAN

Kai Hu, Wentong Liao|arXiv (Cornell University)|Apr 1, 2021
Generative Adversarial Networks and Image SynthesisComputer Science11 citations
TL;DR

This paper proposes Semantic-Spatial Aware GAN (SSA-GAN), a novel text-to-image generation framework that enhances semantic and spatial alignment between text descriptions and generated images. By introducing a Semantic-Spatial Aware Convolution Network (SSACN) with a learnable mask predictor and semantic-adaptive batch normalization, the model enables end-to-end training with a jointly optimized text encoder, achieving state-of-the-art performance on COCO and CUB datasets in both Inception Score and Fréchet Inception Distance.

ABSTRACT

Text-to-image synthesis (T2I) aims to generate photo-realistic images which are semantically consistent with the text descriptions. Existing methods are usually built upon conditional generative adversarial networks (GANs) and initialize an image from noise with sentence embedding, and then refine the features with fine-grained word embedding iteratively. A close inspection of their generated images reveals a major limitation: even though the generated image holistically matches the description, individual image regions or parts of somethings are often not recognizable or consistent with words in the sentence, e.g. "a white crown". To address this problem, we propose a novel framework Semantic-Spatial Aware GAN for synthesizing images from input text. Concretely, we introduce a simple and effective Semantic-Spatial Aware block, which (1) learns semantic-adaptive transformation conditioned on text to effectively fuse text features and image features, and (2) learns a semantic mask in a weakly-supervised way that depends on the current text-image fusion process in order to guide the transformation spatially. Experiments on the challenging COCO and CUB bird datasets demonstrate the advantage of our method over the recent state-of-the-art approaches, regarding both visual fidelity and alignment with input text description.

Motivation & Objective

  • To address the limitations of existing text-to-image GANs in fusing text and image features effectively, especially in preserving semantic and spatial consistency.
  • To overcome the suboptimal performance caused by fixed text encoders during training by enabling joint optimization with the image generator.
  • To improve feature fusion by learning spatially adaptive transformations conditioned on both global and local semantics of the text description.
  • To develop a weakly-supervised mask prediction mechanism that dynamically guides where text information should be injected into image features.
  • To achieve state-of-the-art results in image quality and text-image alignment on benchmark datasets COCO and CUB.

Proposed method

  • Proposes a Semantic-Spatial Aware Convolution Network (SSACN) that integrates a Semantic-Spatial Condition Batch Normalization (SSCBN) module to apply text-conditioned affine transformations on image features.
  • Introduces a weakly-supervised mask predictor that generates spatial attention maps based on the current fusion state, ensuring text-relevant regions receive stronger feature modulation.
  • Employs a residual block in SSACN to preserve image features in text-irrelevant regions, maintaining structural integrity during feature transformation.
  • Trains the entire model end-to-end, allowing the text encoder to be fine-tuned jointly with the generator, improving text representation learning for generation.
  • Utilizes a multi-scale feature fusion strategy combining global and local image features with word-level and sentence-level text features via attention mechanisms.
  • Employs the DAMSM loss for training, which computes matching scores between image sub-regions and text words using cosine similarity and normalized attention weights.

Experimental results

Research questions

  • RQ1Can end-to-end training of the text encoder and image generator improve the quality and alignment of generated images in text-to-image synthesis?
  • RQ2Does learning spatially adaptive attention masks during feature fusion lead to better semantic consistency between text descriptions and generated images?
  • RQ3Can a semantic-adaptive batch normalization layer that conditions on text features improve feature fusion compared to standard or global CBN methods?
  • RQ4How does the proposed method compare to state-of-the-art models in terms of visual fidelity and text-image alignment on standard benchmarks?
  • RQ5What is the contribution of the weakly-supervised mask prediction module in guiding the injection of text information into relevant image regions?

Key findings

  • SSA-GAN achieves a Fréchet Inception Distance (FID) of 13.8 on the COCO dataset, outperforming previous state-of-the-art methods.
  • On the CUB bird dataset, SSA-GAN achieves an Inception Score of 148.7, demonstrating superior image quality and diversity.
  • Ablation studies confirm that both the semantic-adaptive batch normalization and the mask prediction module significantly improve text-image alignment and visual quality.
  • The joint training of the text encoder leads to better text representation learning, as evidenced by improved attention maps and higher matching scores in the DAMSM loss.
  • The model enables effective image editing by modifying input text descriptions, with generated images adapting semantically and spatially to the new descriptions.
  • The proposed mask prediction mechanism produces coherent spatial attention maps that align well with the semantic content of the text, such as highlighting wings or eyes in bird images.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.