Controllable Image Synthesis via SegVAE

Yen-Chi Cheng, Hsin-Ying Lee, Min Sun, Ming-Hsuan Yang

Abstract

Flexible user controls are desirable for content creation and image editing. A semantic map is commonly used intermediate representation for conditional image generation. Compared to the operation on raw RGB pixels, the semantic map enables simpler user modification. In this work, we specifically target at generating semantic maps given a label-set consisting of desired categories. The proposed framework, SegVAE, synthesizes semantic maps in an iterative manner using conditional variational autoencoder. Quantitative and qualitative experiments demonstrate that the proposed model can generate realistic and diverse semantic maps. We also apply an off-the-shelf image-to-image translation model to generate realistic RGB images to better understand the quality of the synthesized semantic maps. Furthermore, we showcase several real-world image-editing applications including object removal, object insertion, and object replacement.

Introduction

While deep learning has made massive strides in generating images from text or scene graphs, providing fine-grained, intuitive control remains a challenge. Semantic maps—pixel-level labels of categories like "hair," "face," or "shirt"—serve as excellent intermediate representations for image synthesis because they are significantly easier to manipulate than raw RGB pixels. However, a "usability gap" exists: manually drawing a realistic semantic map is difficult for non-artists. Existing automated methods often struggle with compatibility (e.g., ensuring a hat fits a head shape) and diversity (generating varied styles for the same label). SegVAE addresses these challenges by automatically generating realistic, diverse semantic maps from a simple list of categories.

SegVAE generates diverse semantic maps from a provided label-set.

Methodology

The core of the proposed framework is SegVAE, based on the Conditional Variational Autoencoder (C-VAE). Its novelty lies in two main architectural choices:

  1. Iterative Generation: Rather than generating the entire semantic map in one shot, SegVAE generates one category at a time in an autoregressive manner. This allows the model to condition the generation of new components on the existing canvas, ensuring physical and stylistic compatibility.
  2. Learned Shape Prior: Unlike standard VAEs that sample from a fixed Gaussian distribution, SegVAE employs a parameterized network (incorporating LSTMs) to learn a shape prior conditioned on the current generation state. This captures complex spatial dependencies between objects.

To evaluate the synthesized maps, the authors utilize SPADE, an off-the-shelf image-to-image (I2I) model, to translate semantic maps into photorealistic RGB images.

Experiments and Results

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

Quantitative Performance

SegVAE consistently outperformed baselines such as C-GAN and sg2im. On the HumanParsing dataset, SegVAE achieved a Fréchet Inception Distance (FID) of 39.65, a significant improvement over sg2im's 56.74. On CelebAMask-HQ, it reached an FID of 28.82. Diversity metrics also indicated that SegVAE generates a wider variety of shapes and styles for identical label sets compared to other VAE-based approaches.

Key Insights

  • The "Anchor" Effect: Starting generation with "anchor" categories (e.g., face or body) provides crucial context for subsequent accessories, leading to higher realism.
  • Compatibility through Context: By treating the map as a sequence of additions, the model naturally learns spatial constraints, such as the correct placement of shoes relative to legs.

Applications: Semantic Map Editing

SegVAE enables "surgical" image editing. By modifying the input label set (adding or removing a category), the model re-synthesizes only the relevant portions of the semantic map. These edited maps are then converted into seamless RGB images, allowing for intuitive object removal, addition, and restyling.

Examples of semantic map editing, including object removal, addition, and restyling.

Conclusion and Limitations

SegVAE bridges the gap between abstract label sets and realistic synthesis. However, limitations remain, such as difficulty generating rare shapes or handling physically impossible label combinations. Future work may explore dynamic generation orders to further enhance flexibility.

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