Image Segmentation
MLX
English
native-mlx
apple-silicon
medical-imaging
mri
brain-tumor
segmentation
nnunet
research
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.
| Input | Output |
|---|---|
| T1, T1ce, T2 + FLAIR · NIfTI | Brain tumor segmentation |
Apple Silicon · Metal · Python 3.13 / 3.14
Quick start
uv venv --python 3.13
source .venv/bin/activate
uv pip install "nnunet-mlx==0.5.1"
uv tool install huggingface-hub
hf download MedMLX/nnunet-brats-mlx --local-dir models
Replace the example input paths with your own files.
from nnunet_mlx.medmlx import run
result = run(
model_dir='models',
image_paths=['T1w.nii.gz', 'T1gd.nii.gz', 'T2w.nii.gz', 'FLAIR.nii.gz'],
output_dir='outputs',
folds=[0],
use_mirroring=False,
step_fraction=0.5,
)
print(result["outputs"])
Keep all four MRI volumes on the same voxel grid, in the order shown.
Use & license
For research and education. Not validated for clinical use.
Hardware compatibility
Log In to add your hardware
Quantized