Controllable Image Synthesis via SegVAE

Yen-Chi Cheng, Hsin-Ying Lee, Min Sun

Abstract

Generating realistic images with fine-grained user control remains a significant challenge in computer vision. We present SegVAE, a generative framework designed to bridge the gap between high-level user intent and low-level pixel synthesis. SegVAE produces realistic and diverse semantic maps from a simple list of desired object labels. By utilizing an iterative generation process and a learned shape prior within a Conditional Variational Autoencoder (C-VAE) framework, the model ensures global consistency and spatial compatibility between generated components. Our results on CelebAMask-HQ and HumanParsing datasets demonstrate that SegVAE enables intuitive image editing operations—such as adding, removing, or restyling objects—with superior realism and diversity compared to existing baselines.

Introduction

While deep generative models have achieved remarkable success in synthesizing photorealistic images, providing users with intuitive and precise control over the output remains difficult. Direct manipulation of RGB pixels is cumbersome for non-experts. An effective alternative is to use semantic maps—segmentation masks where each color denotes a specific category (e.g., "hair," "shirt," "sunglasses")—as an intermediate representation. Modifying a shape on a semantic map is significantly more intuitive than painting a realistic object into a complex scene.

However, synthesizing valid semantic maps from scratch is non-trivial. A high-quality map must satisfy three criteria: realism (individual shapes must be recognizable), compatibility (objects must be logically positioned relative to one another), and diversity (a single set of labels should yield multiple valid layouts). Existing methods often struggle with global consistency or produce repetitive, static results. SegVAE addresses these challenges by treating semantic map generation as a sequential, context-aware process.

Methodology: Iterative Semantic Synthesis

The core of SegVAE is a framework based on the Conditional Variational Autoencoder (C-VAE), enhanced with an iterative generation strategy.

Overview of the SegVAE pipeline showing the generation of semantic maps from label sets and subsequent translation to photorealistic images.

Autoregressive Generation

Rather than generating the entire semantic map in a single pass, SegVAE employs an autoregressive approach. It "paints" the canvas one category at a time. This sequential process allows the model to account for the spatial relationships between different objects. For instance, when generating a "hat," the model can observe the previously generated "head" to ensure the hat is placed correctly.

Contextual Conditioning and Learned Shape Prior

At each step $t$, the model is conditioned on the full input label-set, the specific target category for the current step, and the "current canvas" containing all previously generated shapes.

A key innovation is the learned shape prior. Traditional VAEs typically assume a simple Gaussian prior. SegVAE instead uses a parameterized network, including an LSTM, to learn a conditional shape prior. This allows the model to capture complex dependencies across iterations, facilitating the sampling of diverse yet valid shapes during inference.

Image Translation

To convert the synthesized semantic maps into final RGB images, SegVAE leverages an off-the-shelf image-to-image (I2I) translation model, such as SPADE. This separation of concerns—layout generation via SegVAE and pixel synthesis via SPADE—allows for modular improvements in both control and image quality.

Experimental Evaluation

The model was evaluated on two diverse datasets: CelebAMask-HQ (30,000 high-resolution face images) and HumanParsing (~17,000 fashion images).

Key Insights

  • The "Control Plane" Concept: Semantic maps serve as an ideal user interface for image synthesis, acting as a bridge between abstract labels and concrete pixels.
  • Importance of Generation Order: The sequence in which objects are drawn matters. Generating "anchor" objects first (like skin for faces or the torso for bodies) provides a stable spatial reference for subsequent, smaller features.
  • Compatibility Metric: The authors introduced a novel metric to quantify how well generated parts fit together by testing if missing components could be accurately predicted from the existing ones.

Results and Applications

SegVAE demonstrates significant improvements over standard C-GAN and C-VAE baselines.

  • Quantitative Performance: On the CelebAMask-HQ dataset, SegVAE achieved a Fréchet Inception Distance (FID) of 28.82, a substantial improvement over the 36.29 achieved by a standard C-VAE.
  • Diversity: Using metrics similar to LPIPS, the model showed a greater variety of layouts for identical label sets compared to competitors.
  • User Preference: In human evaluation trials, SegVAE-generated maps were preferred over 90% of the time against other VAE-based approaches.

Practical Editing Scenarios

The framework supports several high-level editing tasks:

  1. Add: Inserting new elements (e.g., adding earrings) while maintaining the integrity of the existing face.
  2. Remove: Deleting an object and naturally inpainting the background.
  3. Restyling: Re-sampling the latent space for a specific category to change its style (e.g., changing a hairstyle) without altering other parts of the image.

Conclusion and Future Work

SegVAE provides a robust solution for controllable image synthesis by focusing on the iterative generation of semantic layouts. While currently reliant on a fixed generation order and discrete label sets, future work could explore order-agnostic generation and integration with natural language interfaces to allow for even more flexible, text-driven image manipulation.

Summary updated

BibTeX
@inproceedings{cheng2020controllable,
  author = {Yen-Chi Cheng and Hsin-Ying Lee and Min Sun and Ming-Hsuan Yang},
  title = {{Controllable Image Synthesis via SegVAE}},
  booktitle = {European Conference on Computer Vision},
  year = {2020},
  doi = {10.1007/978-3-030-58571-6\_10},
}
Figure