TL;DR
This paper introduces WeakSAM, a novel framework that leverages the powerful Segment Anything Model (SAM) to overcome limitations in weakly-supervised object detection (WSOD) and instance segmentation (WSIS). By using classification clues to automatically prompt SAM and introducing adaptive pseudo ground truth generation and RoI drop regularization, WeakSAM significantly advances the state-of-the-art in these challenging vision tasks.
What Problem Does This Paper Address?
Weakly-supervised learning (WSL) is crucial for reducing the burden of manual data annotation in computer vision. However, traditional WSL methods for tasks like object detection and segmentation often struggle with incomplete or noisy pseudo ground truth (PGT) labels, limiting their performance. Furthermore, powerful foundation models like SAM, while excellent at segmentation, require human prompts and lack category awareness, making them difficult to directly apply in automated WSL pipelines. This paper addresses the challenge of integrating SAM's capabilities into WSL to achieve more robust and accurate instance-level recognition without extensive manual labeling.
Methods
WeakSAM tackles this problem through a multi-stage approach:
- Classification Clues as Automatic Prompts: Instead of relying on human input, WeakSAM extracts classification clues from a pre-trained vision transformer (WeakTr). These clues, combined with spatial information from dense sampling and peak points from activation maps (CAMs), are used as automatic prompts for SAM. This overcomes SAM's need for interactive prompts and provides category-specific guidance.
- WeakSAM WSOD Pipeline:
- WeakSAM Proposals Generation: The automatically generated prompts are fed into SAM to produce a set of high-quality, low-redundancy object proposals.
- Adaptive PGT Generation: To address the issue of incomplete PGT, WeakSAM normalizes proposal scores across categories and applies adaptive thresholds. This ensures that even low-scoring objects within a category are considered, preventing their omission.
- RoI Drop Regularization: To mitigate the impact of noisy PGT instances, a novel RoI drop regularization technique is introduced. This method adaptively drops regions (RoIs) with high classification and/or regression losses during retraining, preventing the model from being misled by inaccurate labels.
- WeakSAM WSIS Extension: The framework is extended to weakly-supervised instance segmentation (WSIS) by using the refined WeakSAM PGT to prompt SAM for pseudo instance segmentation labels. These labels can then be used to train standard instance segmentation models.
Datasets
The paper evaluates WeakSAM on several standard benchmarks:
- Weakly-Supervised Object Detection (WSOD):
- PASCAL VOC 2007
- PASCAL VOC 2012
- COCO 2014
- Weakly-Supervised Instance Segmentation (WSIS):
- PASCAL VOC 2012
- COCO 2017
Key Insights and Ideas
- Bridging the Gap between Foundation Models and WSL: The core insight is that by using classification signals to guide SAM, we can unlock its potential for automated, category-aware instance-level recognition in weakly-supervised settings.
- Addressing PGT Limitations: The paper highlights that PGT incompleteness and noise are critical bottlenecks in traditional WSOD. The proposed adaptive PGT generation and RoI drop regularization are shown to be effective solutions.
- Efficiency Gains: WeakSAM's proposals are significantly more efficient than traditional methods like Selective Search, reducing proposal count and generation time, which in turn speeds up WSOD training.
- Versatility of WeakSAM: The framework is demonstrated to be adaptable, not only improving WSOD but also providing high-quality pseudo labels for WSIS, benefiting both anchor-based and query-based instance segmentation models.
Key Results
- WSOD Performance: WeakSAM significantly outperforms previous state-of-the-art methods on WSOD benchmarks, achieving average improvements of 7.4% and 8.5% for WSOD and WSIS respectively. For instance, WeakSAM (MIST) with Faster R-CNN retraining surpasses SoS-WSOD and W2N by a considerable margin.
- WSIS Performance: WeakSAM-generated pseudo labels lead to state-of-the-art results when used to train Mask R-CNN and Mask2Former on PASCAL VOC 2012 and COCO 2017.
- Efficiency: WeakSAM reduces the number of proposals by 89.4%, proposal generation time by 65.5%, and WSOD network training time by 43.8% compared to Selective Search.
- Qualitative Results: Visualizations show that WeakSAM generates proposals with less redundancy and produces more complete pseudo ground truth boxes and instance labels compared to baseline methods.
Limitations and Future Work
- Reliance on Pre-trained Models: The performance of WeakSAM is dependent on the quality of the pre-trained classification models (like WeakTr) and the SAM model itself.
- Hyperparameter Tuning: While the paper provides some ablation studies for hyperparameter tuning (e.g., thresholds for RoI drop), optimal settings might still require careful adjustment for different datasets or tasks.
- Future Work: The authors suggest that their work inspires further research combining SAM and WSL for universal weakly-supervised recognition frameworks. The adaptability of WeakSAM to various WSL tasks and its potential for further improvements with more advanced foundation models are promising avenues.
Summary updated