SwinUNETR · Abdominal CT
Segment abdominal organs in 3D CT with the MONAI BTCV checkpoint and native MLX.
This checkpoint is the MONAI Consortium's
swin_unetr_btcv_segmentationbundle, built on the Swin UNETR method of Yucheng Tang and co-authors. The model and the weights are theirs: see the original repository, Project-MONAI/model-zoo, and the paper, arXiv:2111.14791. This repository only repackages the released bundle (MONAI/swin_unetr_btcv_segmentation) for MLX on Apple Silicon. Please cite their paper and star their repository if Swin UNETR is useful to you.
Original repository · Original paper · Original weights · GitHub · Files · Docs · MedMLX paper
| Input | Output |
|---|---|
| 3D abdominal CT · NIfTI | 13 organ labels + background |
Apple Silicon · Metal · Python 3.13
Quick start
uv venv --python 3.13
source .venv/bin/activate
uv pip install "swin-unetr-mlx>=0.3.0"
Replace the example input paths with your own files.
from swin_unetr_mlx import run
result = run(image_path="ct.nii.gz", output_dir="outputs")
print(result["outputs"]["mask"])
Weights download from this repository on first use, at a pinned revision. To fetch them yourself, download that revision and pass the folder as weights_path="models":
uv tool install huggingface-hub
hf download MedMLX/swin-unetr-mlx --revision 0052abb4bfb1c56bd7d52d5353267393399b8743 --local-dir models
Use & license
For research and education. Not validated for clinical use.
Weights: Apache-2.0. Notices.
Paper references
Citation
Please cite the original paper:
Tang, Y. et al. (2021). Self-Supervised Pre-Training of Swin Transformers for 3D Medical Image Analysis. arXiv:2111.14791.
If you use MedMLX, please cite the MedMLX paper:
@article{sandoval2026medmlx,
title = {MedMLX: On-Device Medical Imaging AI for Apple Silicon},
author = {Sandoval, J. and Sandoval, A. and Saleem, A.},
journal = {medRxiv},
year = {2026},
doi = {10.64898/2026.10.28.26366762}
}