nnU-Net · Liver & Tumor
Segment liver and tumor labels from 3D CT with nnU-Net, locally on Apple Silicon.
The liver checkpoint is the work of Abbu J, 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 18807203) for MLX on Apple Silicon. Please cite their paper and star their repository if the liver model is useful to you.
Original repository · Original paper · Original weights · GitHub · Files · Docs · MedMLX paper
| Input | Output |
|---|---|
| 3D CT · NIfTI | Liver and 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.liver 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/nnunet-liver-mlx --revision 574a9c601b9b1a9e906ce985fbd46b106c5b7caa --local-dir models
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}
}