Dynamic Prototype Convolution Network for Few-Shot Semantic Segmentation

Jie Liu, Yanqi Bao, Guo-Sen Xie, Huan Xiong, Jan-Jakob Sonke, Efstratios GavvesCVPR 2022

Abstract

The key challenge for few-shot semantic segmentation (FSS) is how to tailor a desirable interaction among support and query features and/or their prototypes under the episodic training scenario. Most existing FSS methods implement such support/query interactions by solely leveraging plain operations—e.g., cosine similarity and feature concatenation—for segmenting the query objects. However, these interaction approaches usually cannot well capture the intrinsic object details in the query images that are widely encountered in FSS, e.g., if the query object to be segmented has holes and slots, inaccurate segmentation almost always happens. To this end, we propose a dynamic prototype convolution network (DPCN) to fully capture the aforementioned intrinsic details for accurate FSS. Specifically, in DPCN, a dynamic convolution module (DCM) is firstly proposed to generate dynamic kernels from support foreground, then information interaction is achieved by convolution operations over query features using these kernels. Moreover, we equip DPCN with a support activation module (SAM) and a feature filtering module (FFM) to generate pseudo masks and filter out background information for the query images, respectively. SAM and FFM together can mine enriched context information from the query features. Our DPCN is also flexible and efficient under the k-shot FSS setting. Extensive experiments on PASCAL-5$^i$ and COCO 20$^i$ show that DPCN yields superior performances under both 1-shot and 5-shot settings.

Introduction

Few-Shot Semantic Segmentation (FSS) requires a model to segment novel object classes in a query image given only a few annotated support examples. The primary hurdle in FSS is the effective transfer of knowledge from the support set to the query set. Traditional methods typically rely on static matching operations like cosine similarity or feature concatenation. While effective for general object localization, these "plain operations" often fail to capture fine-grained geometric details—such as the gaps between leaves or the spokes of a bicycle wheel—leading to coarse and inaccurate masks.

Methodology

The proposed Dynamic Prototype Convolution Network (DPCN) shifts the paradigm from static template matching to dynamic feature interaction. The architecture is composed of three primary modules designed to progressively refine the query features.

Overview of the DPCN architecture and its three main modules: SAM, FFM, and DCM.

Support Activation Module (SAM)

SAM performs holistic region-to-region matching between support and query features. By utilizing both square and asymmetric windows (e.g., $5 \times 1$ and $1 \times 5$), it generates an initial "pseudo mask" ($M_{act}$). This approach is particularly effective for capturing slender or directional object parts that standard point-wise matching might overlook.

Feature Filtering Module (FFM)

FFM acts as a noise reduction layer. It uses the support prototypes to refine the initial pseudo mask from SAM, effectively filtering out background noise from the query features ($x_q$). This ensures that subsequent processing focuses exclusively on the most relevant regions of the image.

Dynamic Convolution Module (DCM)

DCM is the core innovation of DPCN. Instead of treating support features as a static template, DCM uses them to generate specialized convolutional kernels. These dynamic kernels—vertical, horizontal, and square—are then convolved over the filtered query features. This allows the support information to function as a high-capacity, learnable filter tailored to the specific shape and texture of the target class in each episode.

Experiments and Results

The researchers evaluated DPCN on the PASCAL-5$^i$ and COCO-20$^i$ benchmarks. DPCN achieved new state-of-the-art results, reaching a mean IoU (mIoU) of 66.7% on PASCAL-5$^i$ (1-shot) with a ResNet-50 backbone, outperforming previous leaders like HSNet.

Qualitative analysis confirms that DPCN is significantly better at capturing "intrinsic details." As shown in Figure 5, while baseline models often produce solid blobs that ignore internal gaps (holes and slots), DPCN accurately segments complex structures like bicycle frames and plant stems.

Qualitative comparison showing DPCN's superior ability to capture fine details like holes and slots compared to baseline methods.

Conclusion and Insights

The success of DPCN highlights the importance of dynamic interaction in few-shot learning. By treating the support image as a source for generating convolutional weights rather than just a template, the model gains the flexibility needed to handle diverse and complex object geometries. Future work may explore the integration of more advanced backbones, such as Vision Transformers, and the application of dynamic kernels to cross-domain few-shot segmentation tasks.

Summary updated

BibTeX
@inproceedings{liu2022dynamic,
  author = {Jie Liu and Yanqi Bao and Guo-Sen Xie and Huan Xiong and Jan-Jakob Sonke and Efstratios Gavves},
  title = {{Dynamic Prototype Convolution Network for Few-Shot Semantic Segmentation}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2022},
  url = {https://openreview.net/forum?id=9x15tzzeBQl},
}
Figure