MedSAM Promptable Medical Masks
MedSAM turns clicks and boxes into medical masks in one forward pass after training on a million image-mask pairs.
Why Does This Exist?
Painting organs slice by slice costs hours per volume. nnU-Net automates but needs retraining per task. MedSAM (2024) fine-tunes a promptable foundation model on million medical image-mask pairs across modalities. Input is image plus point or box; output is a mask in milliseconds for annotators to accept or nudge.
Think of It Like This
A stencil cutter following fingertip taps
You tap a photo once for liver and drag a box for spleen; a cutter instantly slices stencils matching taps. Taps decide which object; the cutter decides exact edges. Bad taps still cut wrong stencils.
Prompts are taps and the decoder is the cutter. The analogy stops at 3D: slice prompts need propagation for volumes.
How It Actually Works
An image encoder runs once per scan; a prompt encoder embeds clicks, boxes, or masks; a light decoder fuses both into a mask. Training mixes CT, MRI, ultrasound, and pathology tiles. A box around liver yields Dice near ; one click gives near before a second corrective click.
Worked example
A liver slice needs masking. A box from to decodes in ms to Dice . One positive click inside plus one negative click on kidney lifts a first try to . Painting the same slice by hand takes minutes. Review still checks the falciform edge where contrast fades.
Watch Out For
Tiny polyps missed with one click
One center click on a mm polyp under-segments by percent. The symptom is shrunken small findings. Box tiny targets or add edge clicks; do not trust single clicks under mm.
The Quick Version
- MedSAM makes masks from clicks and boxes without retraining.
- One image encoding serves many prompts in milliseconds.
- Boxes beat single clicks on tiny findings by a clear margin.
- Do not accept small masks without edge clicks and review.
- Annotators confirm instead of painting, which speeds datasets.