WeakMedSAM: Weakly-Supervised Medical Image Segmentation via SAM with Sub-Class Exploration and Prompt Affinity Mining
This work addresses the high cost of pixel-level annotations in medical image segmentation by proposing WeakMedSAM, a weakly supervised framework requiring only image-level or coarse-grained labels—no pixel-wise supervision. Methodologically, it introduces a novel subclass exploration module to mitigate interference from co-occurring lesions; a prompt affinity mining module that leverages SAM’s prompting capability to generate high-quality activation maps and guides random walk for precise segmentation; and integrates subclass contrastive learning, prompt-driven affinity graph modeling, and random-walk post-processing within a SAM-based architecture (compatible with SAMUS/EfficientSAM). Evaluated on BraTS 2019, AbdomenCT-1K, and MSD Cardiac benchmarks, WeakMedSAM significantly outperforms existing weakly supervised approaches and achieves performance comparable to state-of-the-art fully supervised methods.