Abstract
Denoising Diffusion Probabilistic Models (DDPMs) have achieved remarkable success in various image generation tasks compared with Generative Adversarial Nets (GANs). Recent work on semantic image synthesis mainly follows the de facto GAN-based approaches, which may lead to unsatisfactory quality or diversity of generated images. In this paper, we propose a novel framework based on DDPM for semantic image synthesis. Unlike previous conditional diffusion model directly feeds the semantic layout and noisy image as input to a U-Net structure, which may not fully leverage the information in the input semantic mask, our framework processes semantic layout and noisy image differently. It feeds noisy image to the encoder of the U-Net structure while the semantic layout to the decoder by multi-layer spatially-adaptive normalization operators. To further improve the generation quality and semantic interpretability in semantic image synthesis, we introduce the classifier-free guidance sampling strategy, which acknowledge the scores of an unconditional model for sampling process. Extensive experiments on three benchmark datasets demonstrate the effectiveness of our proposed method, achieving state-of-the-art performance in terms of fidelity (FID) and diversity (LPIPS).
Introduction
Semantic Image Synthesis is the task of generating photo-realistic images from a "label map" (e.g., a mask where pixels are labeled "tree," "sky," or "car"). While Generative Adversarial Networks (GANs) have long dominated this field, they often struggle with complex scenes, leading to artifacts or a lack of visual diversity.
Recently, Diffusion Models have emerged as a powerful alternative. However, early attempts to use them for semantic synthesis simply concatenated the label map with the noisy image as a single input. This approach often fails because standard normalization layers within U-Net architectures tend to "wash away" the semantic information, leading to images that do not strictly follow the input mask or lack fine-grained detail. The proposed Semantic Diffusion Model (SDM) addresses this by processing the noisy image and semantic layout independently.
Methodology
The SDM framework introduces a novel architecture designed specifically to respect the spatial information of the semantic mask. Instead of simple concatenation, the noisy image is fed into the encoder of a U-Net, while the semantic layout is embedded into the decoder.
Spatially-Adaptive Normalization (SPADE)
To prevent the "washing away" effect, the semantic layout is injected into the decoder using multi-layer SPADE operators. This allows the network to modulate the features at every spatial location based on the specific label present at that pixel. Standard normalization (like GroupNorm) assumes features should be zero-mean and unit-variance across a channel. If a mask has a single large label, the convolution output is uniform, and normalization wipes out the signal. SPADE bypasses this by making the normalization parameters learned functions of the mask.
Block Design
The architecture utilizes two distinct types of residual blocks: the Semantic Diffusion Encoder Resblock (SDEResblock) and the Semantic Diffusion Decoder Resblock (SDDResblock). The SDEResblock processes the noisy image and time embedding, while the SDDResblock additionally incorporates the semantic segmentation map (Seg) via SPADE layers to ensure the generated features remain grounded in the input layout.
Classifier-Free Guidance (CFG)
During the sampling process, the model predicts noise both with and without the semantic condition. By interpolating between these two scores, the user can control the "guidance scale"—effectively a dial that balances how closely the image follows the mask versus how realistic it looks.
Experiments and Results
The model was evaluated on four standard benchmarks: Cityscapes, ADE20K, CelebAMask-HQ, and COCO-Stuff. The SDM framework outperformed existing GAN-based methods (like SPADE and OASIS) and previous diffusion attempts across several metrics:
- Fidelity: On CelebAMask-HQ, SDM achieved an FID of 18.8, a significant improvement over previous state-of-the-art methods.
- Diversity: SDM showed a marked increase in LPIPS scores, often outperforming the most diverse GAN methods by a wide margin (e.g., +0.190 LPIPS on COCO-Stuff).
- User Preference: In a blind user study, participants preferred SDM-generated images over competitors more than 75% of the time across all datasets.
- Semantic Accuracy: The model achieved higher mean Intersection-over-Union (mIoU) on Cityscapes and CelebAMask-HQ, indicating that the generated images aligned more accurately with the input labels.
Conclusion
SDM demonstrates that diffusion models can significantly improve both the quality and diversity of semantic image synthesis. By treating the semantic map as a spatial guide for the decoder rather than a simple input channel, the model avoids the information loss common in standard architectures. While sampling speed remains a challenge compared to GANs, the use of efficient solvers like DPM-Solver and the potential for leveraging large-scale pre-trained models like Stable Diffusion represent promising avenues for future research.
Summary updated