Downloads · 30 days
0
StanfordAIMI/MASS
MASS is a image segmentation model from StanfordAIMI. Use it for the image segmentation task on the model card, and read the license before you ship it in a product. It is set up for pytorch. The card lists the license as mit.
This repository hosts massbase.pth, the base checkpoint for MASS: Learning Generalizable 3D Medical Image Representations from Mask-Guided Self-Supervision.
Downloads · 30 days
0
Access
Public
Updated May 17, 2026
Repo size
967 MB
Likes
6
Public
Click a slice to open those files.
.pth967 MB · 100%
From the Hugging Face model README
This repository hosts mass_base.pth, the base checkpoint for MASS: Learning
Generalizable 3D Medical Image Representations from Mask-Guided
Self-Supervision.
MASS is a mask-guided self-supervised learning framework for 3D medical images. The released checkpoint was trained with the data used in our paper and the Iris in-context segmentation architecture. It uses automatically generated class-agnostic masks for pretraining and does not use expert ground-truth annotations during pretraining.
mass_base.pth can be used with the official MASS codebase for:
This is a PyTorch checkpoint for the MASS/Iris architecture, not a standalone Transformers model. Please use it with the code release:
Using the Hugging Face CLI:
hf download StanfordAIMI/MASS mass_base.pth --local-dir checkpoints
Using Python:
from huggingface_hub import hf_hub_download
checkpoint_path = hf_hub_download("StanfordAIMI/MASS", "mass_base.pth")
python inference.py \
--checkpoint checkpoints/mass_base.pth \
--test-image /path/to/test_image.nii.gz \
--reference-image /path/to/reference_image.nii.gz \
--reference-mask /path/to/reference_mask.nii.gz \
--output outputs/test_image_seg.nii.gz \
--gpu 0 \
--use-ema \
--modality ct \
--orientation RAS \
--target-spacing 1.5 1.5 1.5 \
--window-size 128 128 128 \
--overlap 0.5
Please make sure the input NIfTI metadata is complete and reliable, especially
orientation and spacing. mass_base.pth was trained after standardizing images
to RAS orientation, so using --orientation RAS is recommended.
python train.py \
--config config/downstream/segmentation_finetune_example.yaml \
--gpu 0 \
--name segmentation_finetune_example \
--override \
finetuning.pretrained_checkpoint=checkpoints/mass_base.pth \
data.train.data_root=/path/to/mass_h5 \
data.val.data_root=/path/to/mass_h5 \
data.train.datasets='[example_segmentation]' \
data.val.datasets='[example_segmentation]'
python train.py \
--config config/downstream/classification_linear_probe_example.yaml \
--gpu 0 \
--name classification_linear_probe_example \
--override \
classification.encoder.pretrained_checkpoint=checkpoints/mass_base.pth \
classification.num_classes=2 \
data.train.data_root=/path/to/classification_data \
data.val.data_root=/path/to/classification_data \
data.train.datasets='[example_classification]' \
data.val.datasets='[example_classification]'
The MASS objective is compatible with other in-context segmentation architectures. The official codebase includes preprocessing and pretraining utilities for training MASS on your own data.
@article{gao2026learning,
title={Learning Generalizable 3D Medical Image Representations from Mask-Guided Self-Supervision},
author={Gao, Yunhe and Zhang, Yabin and Wang, Chong and Liu, Jiaming and Varma, Maya and Delbrouck, Jean-Benoit and Chaudhari, Akshay and Langlotz, Curtis},
journal={arXiv preprint arXiv:2603.13660},
year={2026}
}