OcclusionFormer: Arranging Z-Order for Layout-Grounded Image Generation
Abstract
Recent layout-to-image models have achieved remarkable progress in spatial controllability. However, they still struggle with inter-object occlusion. When bounding boxes overlap, most existing methods lack explicit occlusion information, which makes the generation in intersection regions inherently ambiguous and hinders the determination of complex occlusion relationships. As a result, they often produce entangled textures or physically inconsistent layering in the overlapped areas. To address this issue, we first construct SA-Z, a large-scale dataset enriched with explicit occlusion ordering and pixel-level annotations. Building upon our proposed dataset, we introduce OcclusionFormer, a novel occlusion-aware Diffusion Transformer framework that explicitly models Z-order priority by decoupling instances and compositing them via volume rendering. Furthermore, to ensure fine-grained spatial precision, we introduce a queried alignment loss that explicitly supervises individual instances and enhances semantic consistency. The proposed method effectively reduces ambiguity in overlapping regions, enforces correct occlusion dependencies, and preserves structural integrity, leading to substantial accuracy gains across diverse scenes.
Lay Summary
(1) When using AI to generate images by drawing boxes on a screen to place objects, the AI often gets confused when those boxes overlap. Instead of realizing one object should block another, the AI jumbles their textures together, creating unnatural, melted-looking shapes. (2) To solve this, we built a new AI system called OcclusionFormer that learns to arrange objects from front to back. We first created a massive dataset to teach the AI how objects naturally hide each other in the real world. Then, our system processes each object separately and stacks them like physical layers, ensuring foreground items correctly cover the background ones. (3) This breakthrough allows users to easily design complex, crowded scenes and generate highly realistic images where every object maintains its exact shape without blending into its neighbors.