Skip to main content
QUICK REVIEW

[Paper Review] Few-shot Semantic Image Synthesis Using StyleGAN Prior

Yuki Endo, Yoshihiro Kanamori|arXiv (Cornell University)|Mar 27, 2021
Generative Adversarial Networks and Image SynthesisComputer Science37 references7 citations
TL;DR

This paper proposes a few-shot semantic image synthesis method that leverages a pre-trained StyleGAN generator to create high-quality, photorealistic images from sparse or dense semantic layouts using only one or five annotated training pairs. By generating pseudo semantic masks via nearest-neighbor feature matching between StyleGAN features and semantic classes, the approach trains an encoder to control the generator with minimal labeled data, achieving state-of-the-art results in layout fidelity and visual quality even in one-shot settings.

ABSTRACT

This paper tackles a challenging problem of generating photorealistic images from semantic layouts in few-shot scenarios where annotated training pairs are hardly available but pixel-wise annotation is quite costly. We present a training strategy that performs pseudo labeling of semantic masks using the StyleGAN prior. Our key idea is to construct a simple mapping between the StyleGAN feature and each semantic class from a few examples of semantic masks. With such mappings, we can generate an unlimited number of pseudo semantic masks from random noise to train an encoder for controlling a pre-trained StyleGAN generator. Although the pseudo semantic masks might be too coarse for previous approaches that require pixel-aligned masks, our framework can synthesize high-quality images from not only dense semantic masks but also sparse inputs such as landmarks and scribbles. Qualitative and quantitative results with various datasets demonstrate improvement over previous approaches with respect to layout fidelity and visual quality in as few as one- or five-shot settings.

Motivation & Objective

  • Address the challenge of generating high-quality photorealistic images from semantic layouts when only a few annotated training pairs are available.
  • Overcome the high cost of pixel-wise semantic mask annotation by leveraging unlabeled data and a pre-trained StyleGAN.
  • Enable semantic image synthesis from both dense masks and sparse inputs such as landmarks and scribbles in few-shot scenarios.
  • Develop a method that avoids complex loss functions and hyperparameter tuning by using a simple L2 loss on pseudo-labeled data.
  • Bridge the domain gap between semantic layouts and real images by learning a mapping from semantic classes to StyleGAN’s latent space.

Proposed method

  • Use a pre-trained StyleGAN generator on large-scale unlabeled datasets (e.g., FFHQ, LSUN) as a prior for semantic feature space.
  • For each semantic class in few-shot labeled examples, compute the mean feature vector in StyleGAN’s intermediate layer.
  • Generate pseudo semantic masks by finding random noise vectors in the latent space whose StyleGAN features are nearest neighbors to the class mean features.
  • Train an encoder network to map random noise to latent codes that generate images matching the pseudo-labeled semantic masks using a simple L2 loss.
  • Integrate the trained encoder with the fixed StyleGAN generator to enable control via semantic layouts during inference.
  • Support both dense masks and sparse inputs (e.g., landmarks, scribbles) by treating them as semantic layout inputs to the encoder.

Experimental results

Research questions

  • RQ1Can we achieve high-fidelity semantic image synthesis in few-shot settings with only one or five annotated training pairs?
  • RQ2How can we effectively utilize a pre-trained StyleGAN generator to compensate for the lack of annotated training data in semantic image synthesis?
  • RQ3Can pseudo-labeled semantic masks generated via nearest-neighbor feature matching from StyleGAN’s latent space support high-quality image generation despite potential misalignment?
  • RQ4Does the proposed method generalize to sparse input types such as landmarks and scribbles, which are less precise than dense masks?
  • RQ5How does the method compare to existing pixel-aligned and unsupervised image-to-image translation approaches in terms of layout fidelity and visual quality under few-shot constraints?

Key findings

  • In the one-shot setting, the proposed method achieved a Fréchet Inception Distance (FID) of 65.1 on LSUN ChurchMask, outperforming pSp (89.5) and pix2pixHD++ (100.6) with the same number of labeled examples.
  • On CelebAMask-HQ, the method achieved a mean Intersection over Union (mIoU) of 38.3 in the one-shot setting, significantly outperforming pSp (24.8) and pix2pixHD++ (38.7) with the same training data.
  • The method achieved lower FID (56.9) than pSp (76.2) even when using the full training set, indicating better exploration of StyleGAN’s latent space via pseudo-sampling.
  • The method maintained consistent performance across datasets, with FID scores of 82.1 (CelebALandmark-HQ) and 77.4 (LSUN ChurchMask) in the five-shot setting, outperforming all baselines.
  • The method demonstrated robustness to sparse inputs: it successfully generated images from landmarks and scribbles without requiring dense mask supervision.
  • The method achieved a lower RMSE (31.5) for landmark alignment on CelebALandmark-HQ in the one-shot setting compared to pSp (37.0), indicating better layout fidelity.

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.