Introduction
Image segmentation has traditionally been divided into distinct sub-tasks: semantic segmentation (pixel-level labeling), instance segmentation (object-level masking), and panoptic segmentation (a combination of both). While universal architectures like Mask2Former have begun to unify these tasks, the potential of Diffusion Models—highly successful in generative tasks—remains largely untapped for dense perception. Previous diffusion-based segmentation models often struggled with accuracy or required task-specific modifications. DFormer addresses these challenges by introducing a diffusion-guided transformer that treats segmentation as a generative denoising task.
Methodology
DFormer conceptualizes segmentation as a denoising process where the model learns to recover clean segmentation masks from versions corrupted by Gaussian noise.
The framework consists of two primary components:
- Pixel-level Module: Utilizes a standard backbone (e.g., ResNet or Swin Transformer) and a pixel decoder to extract multi-scale, high-resolution image features.
- Diffusion-based Decoder: A transformer-based component that processes these features alongside "noisy masks."
During training, ground-truth masks are corrupted with Gaussian noise, and the model is trained to predict the original masks. A key innovation is using these noisy masks as dynamic, spatially-aware queries. They guide the transformer's attention and aggregate pixel features to form "mask features." At inference, the model starts with random noise and iteratively refines it into final masks and class labels.
Experimental Results
DFormer was evaluated on major benchmarks, including MS COCO (panoptic and instance) and ADE20K (semantic). The results demonstrate that DFormer significantly outperforms existing diffusion-based approaches.
On MS COCO, DFormer achieved 51.1 PQ (Panoptic Quality), a 3.6% improvement over Pix2Seq-D. In instance segmentation, it reached 42.6 AP, surpassing DiffusionInst by 5.3%. For semantic segmentation on ADE20K, it achieved 48.3 mIoU, outperforming the DDP model by 2.2%. Notably, DFormer remains competitive with state-of-the-art non-diffusion universal models like Mask2Former when using similar backbones.
Conclusion and Future Work
DFormer successfully bridges the gap between diffusion models and dense perception tasks. By treating masks as queries and leveraging iterative refinement, it provides a robust, universal framework for image segmentation. While the model shows some limitations in detecting very small objects, it sets a new benchmark for diffusion-based perception. Future research may focus on optimizing the diffusion process for high-frequency details and exploring more efficient sampling strategies to reduce computational overhead during inference.
Summary updated