MedSAM
Local AI medical image segmentation with bounding-box prompts, a desktop GUI and training scripts. Open source under Apache 2.0, with macOS support.
MedSAM is an open-source model for medical image segmentation that runs locally, aimed at researchers and developers working with medical scans. It builds on Meta's Segment Anything model and uses bounding boxes to identify the region you want to segment. The project uses the Apache 2.0 license and supports macOS.
The desktop GUI lets you mark a target directly on an image and produce a segmentation mask. For work outside the GUI, MedSAM also provides command-line inference and a Jupyter notebook that can run locally. A Google Colab tutorial offers a cloud-based way to try the model, separate from the local tools.
MedSAM includes code for training as well as a pretrained checkpoint for inference. Its PyTorch implementation provides training scripts for a single GPU or multiple GPUs, with Slurm support for cluster training. Researchers can use these scripts to train on their own medical image datasets.
The supplied preprocessing code covers CT and MR data. The example training dataset consists of abdominal CT scans with organ annotation masks, and the preprocessing handles CT intensity windowing, normalization and image resizing. A checkpoint conversion utility makes trained checkpoints compatible with SAM's inference format.