Download README.md from UCSC-VLAA/Dr.SAM3: direct link, hf CLI and curl.
- Browser
- Download file 3.23 kB
-
https://huggingface.co/UCSC-VLAA/Dr.SAM3/resolve/main/README.md
- Command line
-
hf download hf://UCSC-VLAA/Dr.SAM3/README.md
-
curl -L -o README.md https://huggingface.co/UCSC-VLAA/Dr.SAM3/resolve/main/README.md
license: other
license_name: sam-license
license_link: LICENSE
base_model: facebook/sam3
library_name: pytorch
pipeline_tag: image-segmentation
tags:
- medical-imaging
- 3d-medical-image-segmentation
- text-prompted-segmentation
- sam3
Dr. SAM3: Towards Generalizable Text-Prompted 3D Medical Segmentation
Dr. SAM3 adapts SAM3 to text-prompted 3D medical
segmentation across CT, MR, ultrasound, PET and microscopy by changing only its training and
inference, not its architecture. Given a volume and a class name such as CT liver tumor, it
segments the target slice by slice (Dr.SAM3-D, detector only) or propagates masks through
adjacent slices (Dr.SAM3-T, detector + tracker). On CT, MR and PET, Dr.SAM3-T re-decides the
voxels claimed by several prompts with cross-view label voting: coronal and sagittal passes of the
same model each cast one vote. Both models are fine-tuned on the public MedSegFM data (CVPR 2025
BiomedSegFM challenge).
Files
| File | Used by | Size |
|---|---|---|
drsam3_detector.pt |
Dr.SAM3-D, Dr.SAM3-T | 3.4 GB |
drsam3_tracker.pt |
Dr.SAM3-T | 1.9 GB |
Both are PyTorch state dicts ({"model": state_dict}) at 504 x 504 input resolution. Dr.SAM3-T also
needs the base SAM3 checkpoint sam3.pt from facebook/sam3
(gated), which provides the tracker modules that were not fine-tuned.
Usage
git clone https://github.com/UCSC-VLAA/Dr.SAM3.git && cd Dr.SAM3
# install PyTorch, then: pip install -r requirements.txt && pip install -e .
hf download UCSC-VLAA/Dr.SAM3 drsam3_detector.pt drsam3_tracker.pt --local-dir checkpoints
hf download facebook/sam3 sam3.pt --local-dir checkpoints
# Dr.SAM3-D (add --backend tracker for Dr.SAM3-T)
python scripts/predict.py --image ct.nii.gz --modality CT \
--prompts liver spleen "left kidney" "right kidney" --output ct_seg.nii.gz
The output is a label map on the input grid in which value i is the i-th prompt. For raw CT in
Hounsfield units add an intensity window, e.g. --window -160 240. Dr.SAM3-T applies cross-view
label voting by default (--no-voting keeps the axial pass only). See the
repository for batch prediction, evaluation and training,
and the project page for results.
Intended use and limitations
The models are research artifacts for text-prompted segmentation of biomedical volumes. They are not medical devices and must not be used for clinical decisions. Accuracy varies with modality, target and acquisition; it is lower for small or rare targets and for imaging conditions far from the training data.
License
The weights are fine-tuned from SAM 3 and are released under the SAM License.
