Skip to main content
QUICK REVIEW

[Paper Review] DFormer: Diffusion-guided Transformer for Universal Image Segmentation

Hefeng Wang, Jiale Cao|arXiv (Cornell University)|Jun 6, 2023
Medical Image Segmentation TechniquesComputer Science7 citations
TL;DR

DFormer proposes a diffusion-guided transformer for universal image segmentation by framing the task as a denoising process: it trains a transformer to reconstruct clean masks from noisy ones using deep features and masked attention. The method achieves state-of-the-art performance, outperforming prior diffusion-based methods by 3.6% on COCO panoptic segmentation and 2.2% on ADE20K semantic segmentation.

ABSTRACT

This paper introduces an approach, named DFormer, for universal image segmentation. The proposed DFormer views universal image segmentation task as a denoising process using a diffusion model. DFormer first adds various levels of Gaussian noise to ground-truth masks, and then learns a model to predict denoising masks from corrupted masks. Specifically, we take deep pixel-level features along with the noisy masks as inputs to generate mask features and attention masks, employing diffusion-based decoder to perform mask prediction gradually. At inference, our DFormer directly predicts the masks and corresponding categories from a set of randomly-generated masks. Extensive experiments reveal the merits of our proposed contributions on different image segmentation tasks: panoptic segmentation, instance segmentation, and semantic segmentation. Our DFormer outperforms the recent diffusion-based panoptic segmentation method Pix2Seq-D with a gain of 3.6% on MS COCO val2017 set. Further, DFormer achieves promising semantic segmentation performance outperforming the recent diffusion-based method by 2.2% on ADE20K val set. Our source code and models will be publicly on https://github.com/cp3wan/DFormer

Motivation & Objective

  • Address the challenge of generalizing segmentation models across multiple tasks (semantic, instance, panoptic) with a unified architecture.
  • Overcome the limitations of existing diffusion-based segmentation methods, which underperform compared to non-diffusion SOTA approaches.
  • Explore the feasibility of using diffusion models as a generative prior for mask prediction in a unified segmentation framework.
  • Improve performance on small objects and occluded instances, which remain challenging in current segmentation models.

Proposed method

  • Train the model by adding multi-level Gaussian noise to ground-truth masks, transforming the segmentation task into a denoising problem.
  • Use deep pixel-level features and noisy masks as input to generate mask features and attention masks via a diffusion-based decoder.
  • Employ masked self-attention in the transformer decoder to predict clean masks step-by-step from noisy inputs during training.
  • At inference, generate a set of random noisy masks and use the same diffusion-based decoder to predict final masks and their corresponding categories.
  • Apply binary thresholding to noisy masks to generate attention masks, enabling the model to focus on relevant regions during prediction.
  • Use a learnable mask encoding strategy with scale control (e.g., binary or shuffled encoding) to improve mask representation learning.

Experimental results

Research questions

  • RQ1Can a diffusion-based generative process be effectively adapted to unify multiple image segmentation tasks within a single transformer framework?
  • RQ2How does the denoising paradigm using Gaussian noise on masks compare to direct mask prediction in terms of segmentation accuracy and generalization?
  • RQ3What is the optimal number of decoder layers and inference timesteps for achieving high performance across different segmentation tasks?
  • RQ4How do different backbone networks (e.g., ResNet-50 vs. Swin-T) and mask encoding strategies affect the model’s performance on panoptic, instance, and semantic segmentation?

Key findings

  • With ResNet-50 backbone, DFormer achieves a panoptic quality (PQ) score of 51.1% on MS COCO val2017, outperforming Pix2Seq-𝒟 by 3.6 percentage points.
  • On the ADE20K val set, DFormer achieves a mean Intersection over Union (mIoU) of 48.3% with Swin-T backbone, surpassing the recent diffusion-based method DDP by 2.2%.
  • Using 9 decoder layers yields the best performance (AP = 42.6) on instance segmentation, indicating that deeper decoders improve mask prediction quality.
  • Inference with a 1-step forward process achieves near-optimal performance, suggesting that the model can generalize well even with minimal denoising steps.
  • The binary mask encoding strategy with scale 0.1 yields superior results compared to random shuffling, especially at lower scales.
  • DFormer generalizes well to video instance segmentation, achieving an AP of 46.5 on YouTube-VIS 2019 val set, demonstrating transferability beyond static images.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.