Run this model with HF Jobs
Run MedMLX/swin-unetr-mlx on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/MedMLX/swin-unetr-mlx. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/MedMLX/swin-unetr-mlx on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use MedMLX/swin-unetr-mlx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use MedMLX/swin-unetr-mlx with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] hf download MedMLX/swin-unetr-mlx --local-dir swin-unetr-mlx
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
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}
}
Quantized
Model tree for MedMLX/swin-unetr-mlx
Base model
MONAI/swin_unetr_btcv_segmentation