Free-Lunch Augmentation by Revisiting Diffusion-Based Data Generation for Cross-Domain Few-Shot Object Detection

Zijian Zhuang, Yixiong Zou, Yuhua Li, Ruixuan LiarXiv 2026

TL;DR

Standard diffusion models fail as data augmentors for cross-domain few-shot object detection because large domain gaps cause them to destroy target semantics. This paper introduces SITN (Selective Inpainting with Tailored Noise), a training-free method that splits the domain gap into visual and semantic components. By applying weakened noise and background inpainting, SITN generates high-quality, performance-boosting training data that achieves new state-of-the-art results.

What Problem Does This Paper Address?

Cross-Domain Few-Shot Object Detection (CDFSOD) is a challenging task where a model must adapt from a data-rich source domain (like COCO) to a data-scarce "expert" target domain (such as medical X-rays, underwater imagery, or aerial photos).

While generative data augmentation via diffusion models seems like an obvious solution to data scarcity, standard text-to-image or image-to-image pipelines fail miserably here. Because the expert domains look nothing like the general images the diffusion models were trained on, the models cannot distinguish random noise from actual target features. As a result, standard diffusion methods completely alter the target semantics, generating images that actually degrade object detector performance compared to using no augmentation at all.

Fig. 1: (Left-top) Cross-Domain Few-Shot Object Detection learns from scarce training data on downstream expert domains, with knowledge generalized from upstream gen- eral domains, where domain gaps and data scarcity make it challenging. (Left-bottom & Mid) To address it, we revisit a natural but ignored approach in CDFSOD (i.e., data augmentation) to directly supplement the scarce training data with diffusion models. However, due to large domain gaps, we find that current methods can hardly synthesize satisfactory samples, leading to a performance even lower than merely using the origi- nal data, which we aim to address in this paper. (Right) While existing diffusion-based methods are not directly applicable to CDFSOD, our method not only addresses this task effectively but also seamlessly extends to CDFSS. It achieves new state-of-the-art results on both benchmarks, demonstrating its versatility and superiority.

Methods

To overcome this, the authors propose SITN (Selective Inpainting with Tailored Noise), a plug-and-play, training-free framework consisting of two main modules:

  1. Generation Module (Tailored Noise & Inpainting): Instead of wiping the image with heavy noise during the forward diffusion process, SITN applies a weakened noise strength ($\epsilon < 1$). This preserves the underlying structure of the expert domain image. Furthermore, the module splits the image into foreground and background using the dataset's bounding boxes. It primarily relies on background inpainting—modifying the background while keeping the rare foreground object intact—to circumvent the problem of the diffusion model trying to synthesize completely unknown semantic classes.
  2. Selection Module (Filtering): Not all generated images are helpful. SITN uses a pre-trained Region Proposal Network (RPN) to evaluate the synthesized images. It calculates the Intersection over Union (IoU) between the RPN's predicted boxes and the ground-truth boxes. Only the top-$k$ highest-quality images that retain correct spatial and semantic layouts are added to the final training set.

Datasets

The method was evaluated across two distinct cross-domain tasks:

  • CDFSOD (Object Detection): Pre-trained on COCO and evaluated on 6 expert datasets: ArTaxOr (art), DIOR (aerial), UODD (underwater), Clipart1k, DeepFish, and NEU-DET (steel surface defects).
  • CDFSS (Few-Shot Segmentation): Evaluated on 4 datasets to prove generalizability: FSS-1000, Deepglobe, ISIC, and Chest X-ray.

Key Insights and Ideas

  • Deconstructing the Domain Gap: The authors realize that domain gaps are not monolithic; they consist of a visual gap (style/texture) and a semantic gap (unseen categories).
  • The Background is a Universal Bridge: While a specific medical anomaly or rare marine creature might be entirely alien to Stable Diffusion (large semantic gap), the background texture (a hazy microscope slide or blue water) shares common patterns with data the model already knows. Inpainting the background preserves the rare foreground object while introducing necessary visual diversity.
  • Quantifying Semantics with CKA: The authors use Centered Kernel Alignment (CKA) to measure semantic similarity between original and generated images. They prove mathematically that background similarity across domains is consistently higher than foreground similarity, validating their background-centric approach.
Fig. 2: (Left) Synthesized images on source domains well preserve the semantics of the original images, but largely destroy the semantics on the target domains. (Right) To quantify such a difference between domains, we use the CKA similarity to measure the semantic similarity between synthesized and original images. We can see the traditional method (e.g., flip, rotation) shows consistent CKA similarities across domains, verifying its robustness to domains, but diffusion-based ones suffer from a large decline in target domains, showing the difficulty brought by domain gaps.

Key Results

  • State-of-the-Art Performance: SITN consistently outperforms all baseline detectors and existing generative augmentation methods. For example, in a 1-shot setting on the ArTaxOr dataset, it boosts the CD-ViTO baseline from 21.0 to 26.7 mAP.
  • Fixing Generative Failure: While competing diffusion methods like SDEdit and DA-Fusion frequently dropped below the baseline performance due to semantic destruction, SITN consistently provided positive performance gains.
  • Cross-Task Generalization: When extended to few-shot semantic segmentation (CDFSS), SITN achieved a new SOTA average score of 66.7% across four diverse datasets.
  • High Computational Efficiency: Because SITN limits the diffusion process to partial noise steps and leverages DDIM sampling, it generates an image in 0.02s to 1.5s, compared to the grueling 460s required by standard DDPM.

Limitations and Future Work

The authors note that the framework's performance is tightly bound to the quality of the initial bounding box annotations, as these define the foreground/background masks. Additionally, the hyperparameter $k$ for the top-$k$ selection module currently requires manual tailoring for each target domain. Future work could explore automating this thresholding dynamically based on real-time domain distance metrics.

Summary updated

BibTeX
@misc{zhuang2026free,
  author = {Zijian Zhuang and Yixiong Zou and Yuhua Li and Ruixuan Li},
  title = {{Free-Lunch Augmentation by Revisiting Diffusion-Based Data Generation for Cross-Domain Few-Shot Object Detection}},
  year = {2026},
  eprint = {2608.04394},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2608.04394},
}
Figure