No Re-Train, More Gain: Upgrading Backbones with Diffusion Model for Few-Shot Segmentation

Shuai Chen, Fanman Meng, Chenhao Wu, Haoran Wei, Runtong Zhang, Qingbo Wu, Linfeng Xu, Hongliang Li · DOI

Introduction

Few-Shot Segmentation (FSS) is a critical task in computer vision that involves segmenting novel object categories using only a limited number of annotated examples. Traditional FSS models often suffer from "rigidity" issues, primarily backbone lock-in, where the decoder is tightly coupled to a specific pre-trained backbone (e.g., ResNet50). Upgrading to a more powerful architecture typically necessitates expensive retraining. Furthermore, these models often struggle with annotation inflexibility, requiring specific input types like pixel-perfect masks, and show sensitivity to the number of support images provided.

To address these challenges, we present DiffUp, a novel framework that reformulates FSS as a conditional generative task powered by a diffusion process. DiffUp enables "hot-swapping" or upgrading image backbones without retraining and handles diverse annotation types—including scribbles, bounding boxes, and text—within a unified architecture.

Comparison between previous discriminative FSS approaches and the proposed generative DiffUp framework.

Methodology: The DiffUp Framework

DiffUp conceptualizes segmentation as a denoising process, where the final mask is "generated" through iterative refinement. The architecture consists of several key modules designed for flexibility and robustness.

Backbone-Agnostic Feature Transformation (BAFT)

Instead of directly processing raw backbone features, BAFT projects them into a "universal probability space" using cosine similarity. This transformation ensures the decoder remains indifferent to the specific backbone architecture, allowing for seamless plug-and-play upgrades from ResNet to ViT or CLIP-based models.

Uncertainty-Aware Prior Fusion (UAPF)

To handle varying shot counts, UAPF calculates the mean and variance of features across multiple support images. By treating these examples as different viewpoints, the model naturally scales from one-shot to many-shot scenarios while explicitly accounting for feature uncertainty.

Unified Quality-aware Diffusion-based Decoder (UQDD)

The UQDD treats different annotation granularities (e.g., masks vs. scribbles) as different noise levels within the diffusion process. A pixel-perfect mask corresponds to a low-noise starting point, while a text prompt or scribble represents a high-noise state. The Dual-level Quality Modulation (DQM) branch further refines this process by predicting error maps and IoU scores at each step to correct the generated mask.

The training phase of DiffUp, highlighting the BAFT, UAPF, and UQDD modules.

Experimental Results

DiffUp was evaluated on the PASCAL-$5^i$ and COCO-$20^i$ benchmarks, the gold standards for few-shot segmentation.

Performance and Backbone Upgrades

DiffUp achieved state-of-the-art (SOTA) performance, reaching 74.9 mIoU on PASCAL-$5^i$ and 56.4 mIoU on COCO-$20^i$ with a ResNet101 backbone. Notably, upgrading the backbone from ResNet50 to ResNet101 resulted in a 2.7 point mIoU increase without any retraining of the decoder. Switching to a CLIP-pre-trained backbone yielded an even more significant gain of +9.3 mIoU.

Robustness to Weak Supervision

The model demonstrates remarkable flexibility with weak labels. It achieved 72.3 mIoU using only bounding boxes and 70.3 mIoU with scribbles, nearly matching the performance of models trained on full masks.

Discussion and Limitations

The core innovation of DiffUp lies in treating label precision as a noise level in a diffusion spectrum, allowing for a truly multi-granularity system. While the framework prioritizes backbone-agnosticism and flexibility, it faces some trade-offs. The iterative nature of diffusion (e.g., 50 steps with DDIM) introduces higher computational overhead compared to single-pass discriminative decoders, potentially impacting real-time edge deployment. Additionally, by focusing on high-level semantic priors for agnosticism, the model may miss some fine-grained details present in backbone-specific low-level features. Future work will explore incorporating these details without sacrificing the system's modularity.

Summary updated

BibTeX
@misc{chen2024no,
  author = {Shuai Chen and Fanman Meng and Chenhao Wu and Haoran Wei and Runtong Zhang and Qingbo Wu and Linfeng Xu and Hongliang Li},
  title = {{No Re-Train, More Gain: Upgrading Backbones with Diffusion Model for Few-Shot Segmentation}},
  year = {2024},
  eprint = {2407.16182},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2407.16182},
}
Figure