Abstract
Liver segmentation is essential for preoperative planning in interventions like tumor resection or transplantation, but implementation in clinical workflows faces challenges due to modality-specific tools and data scarcity. We propose Edge2Prompt, a novel pipeline for modality-agnostic liver segmentation that generalizes to out-of-distribution (OOD) data. Our method integrates classical edge detection with foundation models. Modality-agnostic edge maps are first extracted from input images, then processed by a U-Net to generate logit-based prompts. These prompts condition the Segment Anything Model 2 (SAM-2) to generate 2D liver segmentations, which can then be reconstructed into 3D volumes. Evaluated on the multi-modal CHAOS dataset, Edge2Prompt achieves competitive results compared to classical segmentation methods when trained and tested in-distribution (ID), and outperforms them in data-scarce scenarios due to the SAM-2 module. Furthermore, it achieves a mean Dice Score of 86.4% on OOD tasks, outperforming U-Net baselines by 27.4% and other self-prompting methods by 9.1%, demonstrating its effectiveness. This work bridges classical and foundation models for clinically adaptable, data-efficient segmentation.
Introduction
In clinical practice, liver segmentation—the digital isolation of the liver from 3D scans—is vital for planning complex surgeries and transplants. However, two major hurdles persist in deploying AI for this task: modality specificity and data scarcity. Most AI models are trained on specific modalities (e.g., CT) and fail when presented with others (e.g., MRI) due to differences in contrast, noise, and intensity. Furthermore, high-quality, expert-annotated medical datasets are rare and expensive to produce.
While foundation models like the Segment Anything Model (SAM) show promise in general image segmentation, they often struggle with the low contrast and irregular boundaries of medical scans and typically require manual prompting. Edge2Prompt addresses these issues by using edge maps as a universal language, allowing for robust cross-modality generalization.
Methodology
The Edge2Prompt pipeline bridges the gap between classical computer vision and modern large-scale foundation models through a three-stage workflow:
- Edge Detection Module (EDM): Instead of processing raw pixels, the system converts images into binary edge maps using a Canny filter. Since liver geometry remains consistent across modalities even if pixel intensities vary, these edge maps serve as a modality-agnostic representation.
- Prompt Generator (U-Net): A modified U-Net processes these edge maps to generate "logit-based prompts." The U-Net effectively learns to predict the liver's location based solely on boundary information.
- SAM-2 Wrapper: These automated prompts are fed into a frozen SAM-2 model. SAM-2 leverages its pre-trained knowledge of shapes and boundaries to refine the U-Net’s initial guess into a precise segmentation mask. Keeping SAM-2 frozen prevents the model from becoming biased toward a specific medical imaging style.
Experimental Setup
The study utilized the CHAOS (Combined (CT-MR) Healthy Abdominal Organ Segmentation) dataset, consisting of 40 volumetric scans (20 CT and 20 MRI). The MRI scans included diverse sequences (T2-SPIR and T1-DUAL) to rigorously test cross-modality generalization. The authors specifically focused on Out-of-Distribution (OOD) performance by training the model on one modality and testing it on another.
Key Results
Edge2Prompt demonstrated significant superiority in OOD scenarios and data-scarce environments:
- OOD Performance: On out-of-distribution tasks, Edge2Prompt achieved a mean Dice Score of 86.4%, outperforming standard U-Net baselines by 27.4% and other state-of-the-art self-prompting methods by 9.1%.
- Data Efficiency: When trained on a minimal dataset (just 1 CT and 1 MRI volume), the model maintained a Dice score of 83.6%, proving its robustness when annotated data is limited.
- 3D Reconstruction: The 2D slices generated by the model were successfully reconstructed into coherent 3D volumes, meeting the practical needs of clinicians for surgical planning.
Discussion and Future Work
The success of Edge2Prompt stems from using edges as a universal language to strip away modality-specific noise. By forcing the model to prioritize boundaries over pixel brightness, it becomes nearly "blind" to the specific imaging modality. SAM-2 then acts as a "super-editor," providing precision to the U-Net's contextual guidance.
Future work will focus on expanding the method to other modalities such as ultrasound and fluoroscopy, and exploring ways to fine-tune foundation models without inducing modality bias. Additionally, the researchers aim to investigate other modality-agnostic features beyond simple edges to further improve initial prompt quality.
Summary updated