Skip to main content
QUICK REVIEW

[Paper Review] SAMM (Segment Any Medical Model): A 3D Slicer Integration to SAM

Yihao Liu, Jiaming Zhang|arXiv (Cornell University)|Apr 12, 2023
Radiomics and Machine Learning in Medical ImagingMedicine23 citations
TL;DR

SAMM integrates the Segment Anything Model (SAM) with 3D Slicer to enable real-time, prompt-based medical image segmentation, achieving about 0.6-second end-to-end latency per segmentation cycle.

ABSTRACT

The Segment Anything Model (SAM) is a new image segmentation tool trained with the largest available segmentation dataset. The model has demonstrated that, with prompts, it can create high-quality masks for general images. However, the performance of the model on medical images requires further validation. To assist with the development, assessment, and application of SAM on medical images, we introduce Segment Any Medical Model (SAMM), an extension of SAM on 3D Slicer - an image processing and visualization software extensively used by the medical imaging community. This open-source extension to 3D Slicer and its demonstrations are posted on GitHub (https://github.com/bingogome/samm). SAMM achieves 0.6-second latency of a complete cycle and can infer image masks in nearly real-time.

Motivation & Objective

  • Motivate applying a generalist segmentation model (SAM) to medical imaging domains.
  • Develop an open-source integration (SAMM) within 3D Slicer to facilitate medical image segmentation without fine-tuning.
  • Enable real-time or near real-time interactive segmentation through prompt-driven workflows.

Proposed method

  • Create SAMM architecture with a SAM Server and a 3D Slicer interactive prompt plugin (Slicer-IPP).
  • Precompute and store image slice embeddings to enable fast, real-time mask inference across prompts.
  • Use ZeroMQ and NumPy memory mapping for high-performance, asynchronous communication between Slicer-IPP and the SAM Server.
  • Handle 3D-to-2D coordinate transformations (RAS/IJK) within Slicer-IPP to ensure correct mask placement and visualization.
  • Operate five parallel tasks (SND_INF, RCV_INF, CPL_INF, RCV_MSK, APL_MSK) with a 60 ms loop to maintain realtime responsiveness.
  • Demonstrate cross-modality applicability (CT, MRI, US) and prompt-based segmentation on medical volumes.
Figure 1: Overall architecture of the integration of 3D Slicer and SAM. Images from different modalities, such as computed tomography (CT), magnetic resonance imaging (MRI), or ultrasound (US), are contained in a scalar volume node. The node (vtkMRMLScalarVolumeNode) is a class in the Visualization
Figure 1: Overall architecture of the integration of 3D Slicer and SAM. Images from different modalities, such as computed tomography (CT), magnetic resonance imaging (MRI), or ultrasound (US), are contained in a scalar volume node. The node (vtkMRMLScalarVolumeNode) is a class in the Visualization

Experimental results

Research questions

  • RQ1Can SAMM achieve real-time or near real-time segmentation on medical images in a 3D Slicer workflow?
  • RQ2How does embedding precomputation influence end-to-end latency for medical image segmentation tasks?
  • RQ3Is SAM capable of zero-shot segmentation across common medical imaging modalities (CT, MRI, US) within the SAMM framework?
  • RQ4What is the latency breakdown and stability of the initialization vs. stable phases in SAMM during segmentation cycles?

Key findings

  • End-to-end latency per segmentation cycle is 0.612 seconds in the tested MRI dataset after embedding initialization.
  • Embedding computation for a 352×352×240 MRI image took 162.9 seconds in the test environment.
  • SAMM can generate segmentation masks for zero-shot tasks across CT, MRI, and US formats.
  • SAMM operates with five parallel tasks and Real-time communication via ZMQ and NumPy memory mapping.
  • The integration is open-source and demonstrated within 3D Slicer to facilitate medical image segmentation research.
  • Initialization phase shows instability that stabilizes typically after about 5 seconds.
Figure 2: The affiliation of five tasks, namely are “send inference request” (SND_ INF), “receive inference request” (RCV_ INF), “complete SAM inference” (CPL_ INF), “receive mask transmission” (RCV_ MSK), and “apply mask” (APL_ MSK). Slicer-IPP and SAM Server use ZMQ/Numpy memory mapping package to
Figure 2: The affiliation of five tasks, namely are “send inference request” (SND_ INF), “receive inference request” (RCV_ INF), “complete SAM inference” (CPL_ INF), “receive mask transmission” (RCV_ MSK), and “apply mask” (APL_ MSK). Slicer-IPP and SAM Server use ZMQ/Numpy memory mapping package to

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.