MedSAM  by bowang-lab

Medical image segmentation via Segment Anything Model (SAM)

created 2 years ago
3,692 stars

Top 13.4% on sourcepulse

GitHubView on GitHub
Project Summary

MedSAM provides a foundation model for segmenting anatomical structures in medical images, targeting researchers and practitioners in medical imaging analysis. It offers a zero-shot segmentation capability, significantly reducing the need for task-specific annotation and accelerating research and clinical applications.

How It Works

MedSAM builds upon the Segment Anything Model (SAM) architecture, adapting it for medical imaging. It leverages a Vision Transformer (ViT) encoder and a mask decoder. The model is fine-tuned on a large dataset of medical images, enabling it to generalize across various modalities and anatomical structures with high accuracy.

Quick Start & Requirements

  • Install: pip install -e . within the cloned repository.
  • Prerequisites: PyTorch 2.0, Python 3.10.
  • Model Checkpoint: Download required.
  • Demo: Command-line inference (python MedSAM_Inference.py), Jupyter notebook tutorial (tutorial_quickstart.ipynb), or GUI (python gui.py after pip install PyQt5).
  • Links: Official Repository

Highlighted Details

  • LiteMedSAM offers 10x faster inference.
  • Supports segmentation via bounding boxes.
  • Offers a GUI for interactive segmentation.
  • Preprocessing scripts for CT/MRI data are provided.

Maintenance & Community

The project has released LiteMedSAM and a 3D Slicer Plugin. Future releases include MedSAM2 for 3D and video segmentation. They are organizing CVPR 2024 and 2025 challenges.

Licensing & Compatibility

The repository does not explicitly state a license. However, it acknowledges Meta AI's Segment Anything Model, which is released under the Apache 2.0 license. Compatibility for commercial use is not specified.

Limitations & Caveats

The model was trained on specific datasets (e.g., FLARE22Train), and its performance on other medical imaging modalities or anatomies may vary. Training requires substantial GPU resources (multiple A100s recommended).

Health Check
Last commit

2 months ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
11
Star History
214 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.