[Paper Review] Dual Prototypical Contrastive Learning for Few-shot Semantic Segmentation
This paper proposes Dual Prototypical Contrastive Learning (DPCL) for few-shot semantic segmentation, enhancing feature representation by jointly optimizing class-specific and class-agnostic contrastive losses to improve inter-class separation and intra-class compactness. The method achieves state-of-the-art performance on PASCAL-5i and COCO-20i benchmarks, outperforming prior approaches by up to 10.5% in mIoU on 1-shot settings without additional decoder modules.
We address the problem of few-shot semantic segmentation (FSS), which aims to segment novel class objects in a target image with a few annotated samples. Though recent advances have been made by incorporating prototype-based metric learning, existing methods still show limited performance under extreme intra-class object variations and semantically similar inter-class objects due to their poor feature representation. To tackle this problem, we propose a dual prototypical contrastive learning approach tailored to the FSS task to capture the representative semanticfeatures effectively. The main idea is to encourage the prototypes more discriminative by increasing inter-class distance while reducing intra-class distance in prototype feature space. To this end, we first present a class-specific contrastive loss with a dynamic prototype dictionary that stores the class-aware prototypes during training, thus enabling the same class prototypes similar and the different class prototypes to be dissimilar. Furthermore, we introduce a class-agnostic contrastive loss to enhance the generalization ability to unseen classes by compressing the feature distribution of semantic class within each episode. We demonstrate that the proposed dual prototypical contrastive learning approach outperforms state-of-the-art FSS methods on PASCAL-5i and COCO-20i datasets. The code is available at:https://github.com/kwonjunn01/DPCL1.
Motivation & Objective
- Address the limited generalization of few-shot semantic segmentation (FSS) under extreme intra-class variations and semantically similar inter-class objects.
- Improve feature representation by enforcing compact intra-class features and separated inter-class prototypes in embedding space.
- Overcome the overfitting tendency of prototype-based methods to seen classes by introducing generalization-aware contrastive learning.
- Develop a lightweight framework that enhances performance without requiring complex inference-time sub-modules.
Proposed method
- Introduce a class-specific contrastive loss using a dynamic prototype dictionary that maintains momentum-based moving averages of class prototypes across episodes.
- Utilize the dynamic prototype dictionary as a queue of negative samples to enforce inter-class separation and intra-class compactness.
- Propose a class-agnostic contrastive loss that compresses the feature distribution of the target class within each episode, improving robustness to unseen classes.
- Fusion of multi-level features (from ResNet-50 layers l2, l3, l4) enhances semantic and spatial representation for better segmentation.
- Apply contrastive learning at the prototype level to refine class embeddings without modifying the backbone or adding inference-time modules.
- Use t-SNE visualization to confirm that DPCL produces more compact and well-separated prototype distributions in the embedding space.
Experimental results
Research questions
- RQ1Can joint optimization of class-specific and class-agnostic contrastive learning improve feature discriminability in few-shot semantic segmentation?
- RQ2How does dual contrastive learning enhance generalization to unseen classes compared to standard prototype-based methods?
- RQ3To what extent does multi-layer feature fusion improve segmentation accuracy in low-shot scenarios?
- RQ4Does the dynamic prototype dictionary effectively serve as a large-scale negative memory for contrastive learning in episodic training?
Key findings
- On PASCAL-5i, DPCL achieves a 53.39% mIoU in the 1-way 1-shot setting, outperforming the baseline by 3.7% and surpassing previous methods by large margins.
- In the 5-shot setting on PASCAL-5i, DPCL improves mIoU by approximately 4% over the PANet baseline without using extra unlabeled data.
- On COCO-20i, DPCL achieves a 10.5% mIoU gain in 1-shot and a 6.1% gain in 5-shot settings compared to prior state-of-the-art methods.
- Abllation studies confirm that combining both class-specific and class-agnostic contrastive losses yields the highest performance gain, with a 3.7% improvement over the baseline.
- t-SNE visualization shows that DPCL produces more compact and well-separated prototype distributions than the baseline, confirming improved feature discriminability.
- Multi-layer feature fusion (l2, l3, l4) yields the best performance, demonstrating the benefit of combining low-level and high-level semantic features.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.