Abstract
Accurate medical image segmentation is critical for diagnosis but typically requires labor-intensive pixel-level annotations. While the Segment Anything Model (SAM) offers a powerful foundation, it often struggles with the domain-specific textures and complex boundaries of medical imagery. We present BiSeg-SAM, a framework that enhances SAM using only weak box-level labels. By incorporating a parallel CNN for local feature extraction, a novel WeakBox module for automated prompting, and a DetailRefine module for boundary polishing, BiSeg-SAM achieves state-of-the-art performance on polyp and skin lesion datasets without the need for exhaustive manual masking.
Introduction
Identifying the precise boundaries of lesions, such as tumors or polyps, is essential for early cancer detection. Deep learning models have achieved significant success in this area, yet their reliance on thousands of high-quality, pixel-perfect masks creates a bottleneck due to the high cost of expert medical annotation.
Foundation models like SAM aim to generalize segmentation tasks across various domains. However, SAM's training on natural images leads to a "domain gap" when applied to medical scans, where local textures are paramount. Furthermore, existing weakly-supervised methods using bounding boxes often suffer from noise, particularly in images with multiple lesions or irregular shapes. BiSeg-SAM addresses these challenges by bridging the gap between global context and local detail while refining the weak supervision process through automated prompting and post-processing.
Methods
The BiSeg-SAM architecture consists of three integrated modules designed to refine SAM's output through a multi-stage process.
Adaptively Global-Local Module
SAM’s transformer-based encoder excels at capturing global context but often overlooks fine-grained local details. BiSeg-SAM introduces a parallel CNN block (based on ResNet-18) to extract local features. These features are fused with SAM’s global features using a learnable weight ($\alpha$), allowing the model to adaptively balance broad context with local texture.
WeakBox Module
To automate the prompting process, the WeakBox module utilizes a Multi-choice Mask-to-Box (MM2B) transformation. It employs a "Center Point" heuristic: the model judges the status of the center point of the predicted mask. If the center falls in the background, the module assumes multiple objects are present and generates a bounding box that encompasses all foreground elements. This strategy significantly reduces the noise associated with traditional mask-to-box methods.
DetailRefine Module and Scale Consistency
The DetailRefine module acts as a post-processing "polisher." It is a lightweight encoder-decoder network specifically fine-tuned on a small subset of high-quality ground truth data to sharpen boundaries. Additionally, a Scale Consistency (SC) loss is implemented to ensure the model produces stable segmentations across different input resolutions, forcing the model to remain robust regardless of image resizing.
Experimental Evaluation
BiSeg-SAM was evaluated across several challenging medical imaging benchmarks:
- Polyp Segmentation: Five multi-center datasets including Kvasir, CVC-ClinicDB, CVC-ColonDB, EndoScene, and ETIS.
- Skin Lesion Segmentation: The ISIC 2017 dataset.
- General Validation: The Synapse multi-organ CT dataset was used to validate the effectiveness of the CNN and DetailRefine components.
Key Results
BiSeg-SAM consistently outperformed state-of-the-art (SOTA) methods across multiple metrics. On the Kvasir dataset, it achieved a Dice Similarity Coefficient (DSC) of 0.919, surpassing specialized models like Polyp-PVT (0.917) and other SAM adaptations like SAMed (0.842). On the ISIC17 skin lesion dataset, it reached a mean Intersection over Union (mIoU) of 0.8159, the highest among compared models.
Ablation studies confirmed the efficacy of each component. Integrating the WeakBox module alone improved the baseline SAM's DSC from 0.759 to 0.802, while the full suite of modules reached 0.846. Qualitatively, BiSeg-SAM eliminates the "jagged" or noisy edges typical of standard SAM outputs in medical contexts, producing results that align more closely with expert ground truth.
Conclusion
BiSeg-SAM demonstrates that foundation models can be effectively adapted for specialized medical tasks using weak supervision. By combining the global strengths of Transformers with the local precision of CNNs and a dedicated refinement stage, the framework significantly reduces the annotation burden on medical professionals. While the DetailRefine module still requires a small amount of high-quality data for peak performance, the overall framework provides a scalable path for medical AI. Future work will explore extending this approach to 3D modalities like MRI and Ultrasound, as well as integrating multi-modal clinical data.
Summary updated