Unlocking Pre-Trained Image Backbones for Semantic Image Synthesis

Tariq Berrada, Jakob Verbeek, Camille Couprie, Karteek Alahari

Abstract

Semantic image synthesis aims to generate realistic images from user-provided label maps. While diffusion models offer high fidelity, they are computationally intensive. Conversely, Generative Adversarial Networks (GANs) are efficient but often struggle with complex datasets. This paper introduces DP-SIMS (Discriminator Pre-training for Semantic IMage Synthesis), a framework that leverages fixed, pre-trained image backbones within a GAN discriminator. DP-SIMS achieves state-of-the-art results in image quality and spatial consistency while operating up to 6,500x faster than leading diffusion models.

Introduction

Semantic image synthesis is a "paint-by-numbers" task where a model transforms a segmentation mask into a photorealistic scene. The primary challenge lies in balancing three competing factors: image quality, spatial control, and inference speed.

A semantic segmentation mask serving as the input 'blueprint' for image generation.

Currently, diffusion models dominate the quality landscape but require significant iterative computation. GANs offer single-pass inference but have historically lacked the representational power to handle diverse datasets like COCO-Stuff. DP-SIMS addresses this by "unlocking" the rich visual knowledge stored in pre-trained backbones, such as ConvNeXt, to guide the generative process.

Methodology

DP-SIMS introduces several architectural innovations to stabilize and enhance GAN-based synthesis:

  1. Fixed Backbone Discriminator: Instead of training from scratch, the discriminator uses a fixed ConvNeXt-L encoder. This provides a stable, semantically rich gradient to the generator. A feature conditioning strategy ensures these powerful features do not overwhelm the training process.
  2. Cross-Attention Noise Injection: To improve diversity, the generator uses a cross-attention mechanism to inject noise. This allows the model to dynamically decide how noise should influence different regions of the layout.
  3. Advanced Loss Functions: The framework employs a pixel-wise focal loss to prioritize rare or difficult semantic classes and a patch-wise contrastive loss to maintain global coherence.

Experimental Results

The model was evaluated on COCO-Stuff, ADE-20K, and Cityscapes. DP-SIMS demonstrated significant improvements across all key metrics:

  • Speed: Generating a 256x256 image takes approximately 0.04 seconds, making it 250x to 6,500x faster than diffusion-based competitors like SDM or PITI.
  • Quality and Consistency: On COCO-Stuff, DP-SIMS achieved a Frechet Inception Distance (FID) of 13.6 and a mean Intersection over Union (mIoU) of 57.7, outperforming previous state-of-the-art models in both realism and adherence to input masks.
Generated outputs from DP-SIMS showing high visual fidelity and successful translation of semantic concepts into realistic textures.

Discussion and Conclusion

A key insight from this work is that convolutional backbones (like ConvNeXt) provide more stable gradients for GAN training than Transformer-based alternatives (like Swin), despite the latter's higher classification accuracy. By sticking to the GAN framework, DP-SIMS proves that high-quality semantic synthesis does not have to come at the cost of real-time performance. Future work will focus on scaling these techniques to megapixel resolutions and further stabilizing Transformer-based discriminators.

Summary updated

BibTeX
@inproceedings{berrada2024unlocking,
  author = {Tariq Berrada and Jakob Verbeek and Camille Couprie and Karteek Alahari},
  title = {{Unlocking Pre-Trained Image Backbones for Semantic Image Synthesis}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2024},
  doi = {10.1109/cvpr52733.2024.00749},
}
Figure