DistillFSS: Synthesizing Few-Shot Knowledge into a Lightweight Segmentation Model
Pasquale De Marinis, Pieter M. Blok, Uzay Kaymak, Rogier Brussee, Gennaro Vessio, Giovanna Castellano
TL;DR
This work tackles Cross-Domain Few-Shot Semantic Segmentation by eliminating test-time dependence on support images through a teacher–student distillation approach. A DCAMA-based teacher learns from the support set, while a lightweight ConvDist student mimics the teacher’s attention to enable support-free inference, with an additional target-domain TransferFSS fine-tuning step. A new multi-domain CD-FSS benchmark demonstrates DistillFSS’s competitive accuracy, especially in multi-class and multi-shot scenarios, while offering substantial efficiency gains and scalability. The approach enables rapid adaptation to unseen domains and supports deployment in resource-constrained settings, marking a practical advance for cross-domain segmentation under limited annotations.
Abstract
Cross-Domain Few-Shot Semantic Segmentation (CD-FSS) seeks to segment unknown classes in unseen domains using only a few annotated examples. This setting is inherently challenging: source and target domains exhibit substantial distribution shifts, label spaces are disjoint, and support images are scarce--making standard episodic methods unreliable and computationally demanding at test time. To address these constraints, we propose DistillFSS, a framework that embeds support-set knowledge directly into a model's parameters through a teacher--student distillation process. By internalizing few-shot reasoning into a dedicated layer within the student network, DistillFSS eliminates the need for support images at test time, enabling fast, lightweight inference, while allowing efficient extension to novel classes in unseen domains through rapid teacher-driven specialization. Combined with fine-tuning, the approach scales efficiently to large support sets and significantly reduces computational overhead. To evaluate the framework under realistic conditions, we introduce a new CD-FSS benchmark spanning medical imaging, industrial inspection, and remote sensing, with disjoint label spaces and variable support sizes. Experiments show that DistillFSS matches or surpasses state-of-the-art baselines, particularly in multi-class and multi-shot scenarios, while offering substantial efficiency gains. The code is available at https://github.com/pasqualedem/DistillFSS.
