MedMLX — Segment. RENAL CT / UNEST

UNesT · Renal CT

Segment kidney cortex, medulla and collecting system in contrast-enhanced CT with the MONAI UNesT checkpoint and native MLX.

GitHub · Files · Docs · Paper

Input Output
Arterial or portal-venous contrast-enhanced 3D CT · NIfTI, HU Renal segmentation mask

Apple Silicon · Metal · Python 3.13

Quick start

uv venv --python 3.13
source .venv/bin/activate
uv pip install "unest-mlx>=0.3.0"

Replace the example input paths with your own files.

from unest_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/unest-renal-ct-mlx --revision dea2e468a364f5f1675af372147077c5b6d74c85 --local-dir models

Input requirements

Use a finite 3D NIfTI CT in Hounsfield units, acquired in the arterial or portal-venous contrast phase. The model missed kidneys in non-contrast scans tested by the package authors. See the input and preprocessing details.

Output

The runner writes outputs/mask.nii.gz. Label values are:

Value Structure
0 Background
1 Kidney cortex
2 Medulla
3 Pelvicalyceal system (collecting system)

The mask retains the input array shape and the reader's effective affine. See the output geometry details.

Model source and conversion

The original model is MONAI renalStructures_UNEST_segmentation v0.2.7, trained for renal substructure segmentation. MedMLX converted its FP32 checkpoint to safetensors for the native MLX implementation, preserving the tensor values and layouts.

Evaluation

Upstream model: MONAI reports a mean Dice of 0.8523 on its validation split of the ImageVU RenalSeg data, which contains 96 3D volumes. See the upstream model documentation.

MLX implementation: On one AMOS22 case, the MLX mask matched the MONAI CPU FP32 mask voxel for voxel, with the same shape and affine. This measures agreement with the reference implementation, not segmentation accuracy. See the comparison record and native run record.

Limitations

This model targets contrast-enhanced renal CT; its performance on non-contrast CT is not established. Review output masks before use. The MLX comparison above covers one case and does not establish clinical performance.

Use & license

For research and education. Not validated for clinical use.

Weights: Apache-2.0. Notices.

Paper references

Citation

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}
}
Downloads last month

-

Downloads are not tracked for this model. How to track
MLX
Hardware compatibility
Log In to add your hardware

Quantized

Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for MedMLX/unest-renal-ct-mlx

Finetuned
(1)
this model

Collection including MedMLX/unest-renal-ct-mlx

Paper for MedMLX/unest-renal-ct-mlx