Run this model with HF Jobs
Run MedMLX/nnunet-brats-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/nnunet-brats-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/nnunet-brats-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/nnunet-brats-mlx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use MedMLX/nnunet-brats-mlx with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] hf download MedMLX/nnunet-brats-mlx --local-dir nnunet-brats-mlx
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
nnU-Net · Brain Tumor
Segment brain tumor regions from four MRI sequences with the nnU-Net BraTS checkpoint.
The BraTS checkpoint is the work of Gowtham Krishnan Murugesan, Jeff Van Oss and Diana McCrumb, trained with nnU-Net by Fabian Isensee and co-authors. The model and the weights are theirs: see the nnU-Net repository, MIC-DKFZ/nnUNet, and the nnU-Net paper, Nature Methods, 2021. This repository only repackages their released weights (Zenodo 11582627) for MLX on Apple Silicon. Please cite their paper and star their repository if the BraTS model is useful to you.
Original repository · Original paper · Original weights · GitHub · Files · Docs · MedMLX paper
| Input | Output |
|---|---|
| T1, T1ce, T2 + FLAIR · NIfTI | Brain tumor segmentation |
Apple Silicon · Metal · Python 3.13
Quick start
uv venv --python 3.13
source .venv/bin/activate
uv pip install "nnunet-mlx>=0.9.0"
Replace the example input paths with your own files.
from nnunet_mlx.named_models.brats import run
result = run(
image_paths={"t1": "T1w.nii.gz", "t1ce": "T1gd.nii.gz", "t2": "T2w.nii.gz", "flair": "FLAIR.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/nnunet-brats-mlx --revision 7632a1f3c74d350eb6f2daeb35b43b75ef7601bd --local-dir models
Keep all four MRI volumes on the same voxel grid; the keys name each channel.
About nnunet-mlx
See the project README for package installation and current documentation.
Use & license
For research and education. Not validated for clinical use.
Paper references
- Framework: nnU-Net: a self-configuring method for deep learning-based biomedical image segmentation.
Citation
Please cite nnU-Net:
Isensee, F. et al. (2021). nnU-Net: a self-configuring method for deep learning-based biomedical image segmentation. Nature Methods, 18, 203-211. https://doi.org/10.1038/s41592-020-01008-z
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