Abstract
Incorporating pixel contextual information is critical for accurate segmentation. In this paper, we show that an effective way to incorporate contextual information is through a patch-based classifier. This patch classifier is trained to identify classes present within an image region, which facilitates the elimination of distractors and enhances the classification of small object segments. Specifically, we introduce Multi-scale Patch-based Multi-label Classifier (MPMC), a novel plug-in module designed for existing semi-supervised segmentation (SSS) frameworks. MPMC offers patch-level supervision, enabling the discrimination of pixel regions of different classes within a patch. Furthermore, MPMC learns an adaptive pseudo-label weight, using patch-level classification to alleviate the impact of the teacher’s noisy pseudo-label supervision on the student. This lightweight module can be integrated into any SSS framework, significantly enhancing their performance. We demonstrate the efficacy of our proposed MPMC by integrating it into four SSS methodologies and improving them across two natural image and one medical segmentation dataset, notably improving the segmentation results of the baselines across all the three datasets.
Introduction
Semantic segmentation, the task of assigning a class label to every pixel in an image, typically requires extensive hand-annotated datasets. Semi-supervised segmentation (SSS) addresses this challenge by leveraging a small set of labeled images alongside a larger pool of unlabeled data. Most state-of-the-art SSS methods utilize a "Teacher-Student" framework, where a teacher model generates pseudo-labels for unlabeled data to guide the student's training.
However, these frameworks often suffer from two primary issues: contextual blindness, where models fail to leverage global context and make inconsistent local predictions, and noisy supervision, where errors in the teacher's pseudo-labels are propagated to the student. This paper introduces the Multi-scale Patch-based Multi-label Classifier (MPMC) to mitigate these issues by providing robust, patch-level contextual supervision.
Methodology: Multi-scale Patch-based Multi-label Classifier
The MPMC is a lightweight, plug-and-play module that can be integrated into existing SSS architectures like UniMatch or U2PL. Instead of focusing solely on individual pixels, MPMC analyzes feature maps where each point represents an image patch (its receptive field).
Key Components
- Multi-scale Contextual Analysis: The module employs average pooling at multiple scales (e.g., 7x7 and 19x19 kernels). This allows the model to capture context for both fine-grained objects, such as poles or traffic signs, and larger semantic regions like roads or buildings.
- Asymmetric Focal Loss: To handle the inherent class imbalance within small patches—where most classes are absent—the authors utilize an asymmetric focal loss. This function down-weights the contribution of negative (absent) classes, preventing the model from becoming overly biased toward predicting no objects.
- Adaptive Pseudo-label Weighting: MPMC calculates confidence scores for each patch. If the patch classifier is uncertain about the presence of a class, it adaptively reduces the weight of the teacher’s pseudo-labels in that region. This mechanism acts as a "sanity check," preventing the student from learning from potentially erroneous teacher predictions.
Experimental Evaluation
The effectiveness of MPMC was evaluated across three diverse benchmarks: PASCAL VOC 2012 (natural objects), Cityscapes (urban scenes), and ACDC (medical cardiac MRI).
Quantitative Performance
MPMC consistently improved baseline performance across all datasets. On PASCAL VOC, it boosted the UniMatch baseline by 2.1% and the AugSeg baseline by 1.8% in the 1/16 labeled data setting. In Cityscapes, gains of up to 2.3% Mean IoU were observed in low-data regimes. Notably, the method achieved a 3.5% improvement in the Dice Similarity Coefficient on the ACDC medical dataset, demonstrating its generalizability beyond natural images.
Qualitative Improvements
Qualitative analysis confirms that MPMC helps models better distinguish between visually similar classes (e.g., bus vs. truck) and improves the detection of small object segments that are often missed by pixel-only baselines. As shown in the comparison below, the MPMC module enables the model to recover small structures that the baseline fails to segment.
Conclusion
By looking "beyond pixels," the MPMC module provides a powerful yet simple way to incorporate contextual information into semi-supervised segmentation. Its ability to filter noisy pseudo-labels and reinforce patch-level consistency leads to significant performance gains across various domains. While the module adds a small amount of computational overhead, its plug-and-play nature makes it a valuable addition to the SSS toolkit. Future work may explore dynamic scaling and the module's performance with Transformer-based backbones.
Summary updated