Abstract
Few-Shot Segmentation (FSS) aims to segment novel objects in a query image using only a few annotated support examples. Traditional methods primarily focus on extracting object prototypes from support images, often neglecting the background or incorrectly assuming the support background is representative of the query background. This paper introduces CobNet, a framework that shifts the focus toward actively mining background information directly from the query image. By utilizing a Multi-scale Background Module (MBM) and a Cross Attention Module (CAM), CobNet achieves state-of-the-art performance on standard benchmarks and demonstrates remarkable robustness in weakly-supervised scenarios.
Introduction
The standard paradigm in Few-Shot Segmentation involves creating an "object prototype"—a feature vector representing the target class—from support images and performing dense comparison against query image features. However, this approach often fails to account for the background context. While some existing models attempt to extract background prototypes from support images, this is fundamentally limited: the background of a support image (e.g., an indoor office) rarely matches the background of a query image (e.g., an outdoor park). When a model relies on irrelevant background priors, it struggles to distinguish the target object from its actual surroundings. CobNet addresses this by extracting background information from the specific query image it is tasked to segment.
Methodology
CobNet is built upon a ResNet-50 backbone and introduces two primary novel components designed to improve the discrimination between foreground objects and complex backgrounds.
Multi-scale Background Module (MBM)
The MBM is designed to capture local background features without requiring ground-truth masks for the query image. While object prototypes are extracted from support images using standard Masked Average Pooling (MAP), the background prototypes are generated through unsupervised average pooling across various grid sizes (e.g., $4 \times 4$) of the query image. To refine these features, the module employs a "training-free" align mask, calculating the cosine similarity between support and query features to help the model differentiate between potential object regions and the background.
Cross Attention Module (CAM)
Because background features are extracted in an unsupervised manner, they are inherently noisy and may inadvertently include object features. The CAM addresses this by calculating an attention matrix to weight the object and background features. This mechanism learns to activate the most accurate components of the object features while suppressing inaccurate or overlapping background features before the final classification stage. This ensures that the final segmentation mask is informed by a clean separation of foreground and background signals.
Experimental Results
The authors evaluated CobNet on two primary FSS benchmarks: PASCAL-5$^i$ (a subset of PASCAL VOC 2012) and COCO-20$^i$ (a more complex dataset based on MS-COCO).
Performance Benchmarks
CobNet established new state-of-the-art results for 1-shot segmentation:
- PASCAL-5$^i$: Achieved a mean Intersection-over-Union (mIoU) of 61.4%, outperforming previous leading methods such as ASGNet and RePRI.
- COCO-20$^i$: Achieved 37.8% mIoU, representing a significant 3.2% improvement over the previous best-performing method (ASGNet).
Weakly-Supervised FSS
A key strength of CobNet is its performance under extreme weak supervision. In scenarios where support images are provided without any masks during test time, CobNet utilizes global average pooling on the support image. Even in this constrained mode, it achieved 53.7% mIoU on PASCAL-5$^i$, setting a high bar for weakly-supervised few-shot segmentation.
Discussion and Limitations
The core insight of CobNet is that the query image is its own best reference for background mining. By treating the query image as a source of negative samples, the model becomes more resilient to varying environments.
However, the model faces challenges when the object and background share highly similar visual characteristics. For instance, segmenting a red chair against a red wall remains difficult because the unsupervised background extraction may conflate the two due to identical textures and colors. Future work may involve more sophisticated unsupervised methods to further refine background extraction in these low-contrast scenarios.
Conclusion
CobNet demonstrates that effective background mining is just as critical as object prototyping in Few-Shot Segmentation. By extracting background features directly from the query image and refining them through cross-attention, CobNet achieves superior accuracy and shows significant potential for applications where dense annotations are scarce.
Summary updated