Skip to content

nnunet-mlx 0.9.0

Latest

Choose a tag to compare

@sandovaljoseph sandovaljoseph released this 15 Nov 02:00
· 2 commits to main since this release

Breaking changes

Requires medmlx-core 0.3, and runs return its RunResult. outputs maps each role to the file written, artifacts describes each file's kind, coordinate space and labels, and run facts move to details.

Each named model has its own module with one run. Multi-image models take image_paths keyed by channel name instead of an ordered list, and the arithmetic option is now precision.

-from nnunet_mlx.named_models import autopet
-autopet(image_paths=[ct, pet], output_dir=out, arithmetic="native")
+from nnunet_mlx.named_models.autopet import run
+run(image_paths={"ct": ct, "pet": pet}, output_dir=out, precision="native")

load_model() and NnUNetModel replace prepare() and PreparedModel. The loaded model's run takes the same case arguments, and close() releases it.

Fixes

Converted models are rebuilt when their metadata changes or a payload is missing. Conversion cache paths stay inside each model entry, and properties pickles with altered NumPy dtypes are rejected.

Predictions publish all files or none. Cascade and spline preprocessing now match nnU-Net, and saved probability grids are checked against the prediction grid.

Lower memory

Mirrored test-time augmentation evaluates one view at a time. On an M5 Max, a 27-tile liver crop peaked at 4.9 GB instead of 11.6 GB with bitwise-identical logits.

Faster

Torch-compatible resampling runs on Metal without dense coordinate grids, and largest-component postprocessing is faster. A 512³ CT output was bitwise identical to the previous path.