Skip to content

nnunet-mlx 0.8.0

Choose a tag to compare

@sandovaljoseph sandovaljoseph released this 10 Nov 06:49
· 39 commits to main since this release

Breaking changes

nnunet-fp16 labels now match nnU-Net where two classes nearly tie. Restored logits stay float16 through resampling and round as nnU-Net 2.8.1 does, so labels can change at near-tied voxels when restoration resamples. Float32 models using separate-z resampling with order_z > 0 can also change by one float32 rounding step. --continue-existing recomputes outputs written by earlier versions.

Fixes

A dataset.json with a huge or sparse label ID is rejected right away. Validation no longer allocates a range as large as the largest label value.

New

prepare() loads an nnU-Net model once for repeated cases. It returns a PreparedModel whose run takes the one-shot runner's case arguments, and close() releases it. nnunet-liver uses it for MedMLX cohorts.

ModelFolderPredictor.predict_nifti_probabilities returns labels and probabilities without writing files. Labels are on the source grid and float32 probabilities on the reader grid.

Lower memory

File prediction streams labels when the crop needs no resampling. Single-fold 3-D predictions no longer build a full score volume first; ensembles, region models, 2-D models and resampled grids restore scores as before.

Probability export and 2-D volume prediction write into one output array. Softmax normalizes in place in 16 MiB blocks instead of building cropped and uncropped copies, and 2-D models write each slice into a preallocated volume.