Repository navigation
Breaking changes
run replaces renal_cect and takes the CT phases as one mapping. It returns a medmlx_core.outputs.RunResult with outputs, artifacts and details; the mask artifact names the labels and the input grid. The mask file is now mask.nii.gz, not renalStructures_CECT_segmentation_mask.nii.gz, and arithmetic_profile is now precision.
-from segresnet_mlx.medmlx import renal_cect
-result = renal_cect(
- arterial_path="arterial.nii.gz",
- venous_path="venous.nii.gz",
- excretory_path="excretory.nii.gz",
- output_dir="out",
- arithmetic_profile="compensated-fp32",
-)
+from segresnet_mlx import run
+result = run(
+ image_paths={
+ "arterial": "arterial.nii.gz",
+ "venous": "venous.nii.gz",
+ "excretory": "excretory.nii.gz",
+ },
+ output_dir="out",
+ precision="compensated-fp32",
+)
print(result["outputs"]["mask"])weights_path is a folder holding segresnet-renal-cect.safetensors; passing the file itself no longer works. The bundle-generic run(bundle=...) is removed.
load_model is renamed load_network.
Requires medmlx-core>=0.3.1,<0.4.
New
predict_logits(..., accumulation="mlx") stitches sliding-window logits in FP32 on the GPU and exports each completed slab, instead of blending on the host. The default stays host blending.
Faster
Resampling the CT onto the model grid runs on 8 threads, with bitwise identical results, and the renal postprocessing skips the background channel.