EP-SAM: Weakly Supervised Histopathology Segmentation via Enhanced Prompt with Segment Anything

Joonhyeon Song, Seohwan Yun, Seongho Yoon, Joohyeok Kim, Sangmin LeearXiv 2024 · DOI

TL;DR

This paper introduces EP-SAM, a novel weakly supervised method for histopathology image segmentation that leverages the power of the Segment Anything Model (SAM) without requiring pixel-level annotations. By enhancing Class Activation Maps (CAMs) with explicit visual prompts and a novel pseudo-labeling strategy, EP-SAM achieves state-of-the-art performance on breast cancer datasets while being computationally efficient.

What Problem Does This Paper Address?

Accurate segmentation of histopathology images is crucial for diagnosing diseases like cancer. However, creating the large, pixel-level annotated datasets required by traditional deep learning segmentation models is extremely expensive and time-consuming, especially given the need for expert pathologists. While weakly supervised methods offer a solution by using less precise labels (like image-level tags or bounding boxes), they often struggle with generalization and achieving performance comparable to fully supervised approaches. This paper tackles the challenge of achieving high-performance histopathology segmentation with limited, weakly supervised data, specifically aiming to leverage the capabilities of large foundation models like SAM without the need for extensive manual prompting.

Methods

The core of EP-SAM lies in its innovative approach to generating high-quality pseudo-labels for training SAM. The method involves several key stages:

  • Enhanced Class Activation Map (CAM) Generation: The authors improve upon traditional CAMs, which often suffer from false or partial activations, by incorporating an "Enhanced Attention Dropout Layer" (ADL) and explicit visual prompts. These prompts, derived from high-frequency components of the image, help the CAM focus on broader regions and more accurately delineate object boundaries, especially in the often-blurry histopathology images.
  • Post-processing for Initial Masks: A simple yet effective morphological post-processing technique (opening operation) is applied to the enhanced CAMs to refine them into initial masks, removing noise and improving precision.
  • SAM-based Pseudo-labeling: The refined initial masks are then used to prompt the Segment Anything Model (SAM). To overcome SAM's potential for performance variance with different prompts and the domain gap between natural and medical images, the authors propose a "Pixel-level Entropy based Prompting Module" (PEPM). This module generates more informative point prompts based on pixel entropy, leading to better initial pseudo-labels from SAM.
  • Pseudo-label Selection: To filter out noisy pseudo-labels generated by SAM, an "Intersection over Union" (IoU) based metric (IDS) is used to select reliable pseudo-labels.
  • Iterative Retraining: The selected pseudo-labels are then used to fine-tune the SAM mask decoder iteratively. This process refines the model's ability to segment histopathology images, progressively improving the quality of generated pseudo-labels and the final segmentation masks. Crucially, only the lightweight SAM mask decoder is fine-tuned, making the process memory-efficient.

Datasets

The proposed method was evaluated on three histopathological breast cancer datasets:

  • Camelyon16: An open dataset from the Camelyon16 Challenge, comprising H&E stained slides.
  • Camelyon17: A larger, successor dataset to Camelyon16, also from the Camelyon17 Challenge.
  • Internal Dataset: A third dataset, not further detailed in terms of origin.

The datasets were processed by extracting 512x512 pixel patches, with a focus on patches containing 20-90% tumor area. Data leakage was prevented by ensuring no overlap between training, validation, and test sets.

Key Insights and Ideas

  • Explicit Visual Prompts for CAMs: The idea of using explicit visual prompts (high-frequency components) to guide CAMs is novel and effectively addresses the boundary delineation issues common in histopathology. This is a significant step beyond traditional CAMs.
  • Leveraging SAM without Pixel-Level Ground Truth: The paper demonstrates a powerful way to harness SAM's segmentation capabilities for a specialized domain (histopathology) without needing expensive pixel-level annotations for training SAM itself. The focus is on generating good pseudo-labels for SAM.
  • Entropy-based Prompting for SAM: Using pixel entropy to guide point prompts for SAM is a clever way to adapt SAM to medical images where boundaries can be ambiguous. It's more robust than random points or relying solely on coarse CAM outputs.
  • Memory-Efficient Fine-tuning of SAM: By fine-tuning only the SAM mask decoder, the authors achieve impressive performance with significantly reduced computational resources (12GB GPU memory), making advanced models more accessible.
  • Iterative Refinement is Key: The iterative retraining process, where the model continuously improves its pseudo-labels and segmentation, highlights the benefit of a feedback loop in weakly supervised learning.

Key Results

  • State-of-the-Art Performance: EP-SAM significantly outperformed existing weakly supervised (WSSS) and even some fully supervised methods on all three tested datasets.
  • Competitive with Fully Supervised: On the Camelyon16 and Camelyon17 datasets, EP-SAM achieved performance comparable to, and in some cases exceeding, fully supervised models like MedSAM and U-Net. The performance gap compared to fully supervised learning was less than 3%.
  • Computational Efficiency: The entire framework can be trained using only 12GB of GPU memory, a notable achievement for a model leveraging SAM.
  • Qualitative Improvements: Visual comparisons show EP-SAM's outputs are generally more similar to the ground truth masks than those of MIL-based methods, with fewer incorrect segmentations and better boundary adherence.

Limitations and Future Work

  • Domain Gap Remains: While the method performs well, the paper acknowledges that the zero-shot performance of SAM can still be inferior in medical domains compared to natural images. The proposed methods aim to mitigate this, but it remains an underlying challenge.
  • Generalization of Pseudo-labels: The paper focuses on selecting reliable pseudo-labels, but the inherent limitations of weakly supervised signals mean that perfect generalization is still an aspiration.
  • Future Work: The authors suggest further exploration of PEPM and iterative retraining strategies to potentially achieve even better performance. The efficiency of the proposed method also opens doors for its application in real-world industrial settings with limited hardware.

Summary updated

BibTeX
@misc{song2024ep,
  author = {Joonhyeon Song and Seohwan Yun and Seongho Yoon and Joohyeok Kim and Sangmin Lee},
  title = {{EP-SAM: Weakly Supervised Histopathology Segmentation via Enhanced Prompt with Segment Anything}},
  year = {2024},
  eprint = {2410.13621},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2410.13621},
}
Figure