Image Segmentation
MLX
English
native-mlx
apple-silicon
medical-imaging
ct
kidney
segmentation
research
Instructions to use MedMLX/segresnet-renal-cect-mlx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use MedMLX/segresnet-renal-cect-mlx with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] hf download MedMLX/segresnet-renal-cect-mlx --local-dir segresnet-renal-cect-mlx
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
File size: 7,822 Bytes
e3e8e13 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 | {
"schema_version": "medmlx.reference.v1",
"model": "segresnet-renal-cect",
"date": "2026-10-12T23:27:50.228834+00:00",
"case": {
"dataset": "CPTAC-CCRCC (TCIA), patient C3L-01458, CC BY 4.0",
"case_id": "C3L-01458",
"input_sha256": {
"arterial_path": "ce70fa42b63eb44df2d1e4906c61eca23ba80c748ee5358137452b4d5aeed6ff",
"venous_path": "27673abe6398be15f0b35629e986372cae7f3128dc3e278c4939587ca72f448a",
"excretory_path": "31a43dd92124042b7ac612f72ee117f87dd1755045aaa580a7a66c43a90f4c7a"
}
},
"original": {
"code": "Project-MONAI/model-zoo/renalStructures_CECT_segmentation",
"version_or_commit": "db9eeeef7ba64ce2ced0230d9bd4c524f69b7f0c",
"precision": "float32; MONAI 1.6.0, PyTorch 2.14.1",
"command": "MEDMLX_RENAL_WORK=<paper-repo>/work/runs/renal-numerics-20261012 MEDMLX_RENAL_BUNDLE=<paper-repo>/work/runs/renal-numerics-20261012/bundles/renalStructures_CECT_segmentation <repositories>/mlx/segresnet-mlx/.venv/bin/python <paper-repo>/benchmarks/reference/renal_cect/monai_reference.py",
"command_reconstructed": false,
"execution_date": "2026-10-12",
"source_files_sha256": {
"configs/inference.json": "a7955d3a07c5085351f29cf572361964cff0a7ae76f0363aae49eab4c849a535",
"scripts/my_transforms.py": "d780252d1a30adce08d1a94cb348c1792b4f42b12fc761f5be93b1b8278a2ead",
"models/model.pt": "ef934ae5b6fdf9a19b83ab9ec28b64d63dca43aea8ef3e177724c3076170a21f"
},
"monai_revision": "eccefc57550b111ed781d82249dfe77872a0e918",
"retained_reference_device": "torch-cpu",
"device": "cpu",
"checkpoint_sha256": "ef934ae5b6fdf9a19b83ab9ec28b64d63dca43aea8ef3e177724c3076170a21f"
},
"mlx": {
"run_record": "results/runs/segresnet-renal-cect.json",
"output_path": "<paper-repo>/work/runs/renal-numerics-20261012/mlx-final/renalStructures_CECT_segmentation_mask.nii.gz",
"output_sha256": "fa6de5a6a23f0216a1ca477ee75222e9599058753ec029e64a6afebca9cb3314"
},
"comparison": {
"metric": "minimum per-label mask Dice",
"value": 1.0,
"per_label": {
"0": {
"dice": 1.0,
"original_voxels": 5412229,
"mlx_voxels": 5412229,
"intersection_voxels": 5412229
},
"1": {
"dice": 1.0,
"original_voxels": 84553,
"mlx_voxels": 84553,
"intersection_voxels": 84553
},
"2": {
"dice": 1.0,
"original_voxels": 32851,
"mlx_voxels": 32851,
"intersection_voxels": 32851
},
"3": {
"dice": 1.0,
"original_voxels": 23363,
"mlx_voxels": 23363,
"intersection_voxels": 23363
},
"4": {
"dice": 1.0,
"original_voxels": 276280,
"mlx_voxels": 276280,
"intersection_voxels": 276280
},
"5": {
"dice": 1.0,
"original_voxels": 106324,
"mlx_voxels": 106324,
"intersection_voxels": 106324
}
},
"threshold": {
"min_dice": 0.99,
"scope": "every label present in either mask, including background"
},
"result": "pass",
"differing_voxels": 0,
"geometry": {
"shape": [
380,
220,
71
],
"affine_max_abs_diff": 0.0
},
"original_output_path": "<paper-repo>/work/runs/renal-numerics-20261012/monai/export/arterial/arterial_trans.nii.gz",
"original_output_sha256": "57e9025b66bbf7ba862e375c106c630baa39ff6fecc58205eb91cc038fefb1a0",
"raw_logits": {
"shape": [
1,
6,
334,
193,
220
],
"dtype": "float32",
"rtol": 0.0001,
"atol": 0.0001,
"tolerance_source": "segresnet-mlx/tests/test_torch_oracles.py; unchanged released-checkpoint criterion",
"allclose": true,
"signs_equal": true,
"failing_elements": 0,
"sign_mismatches": 0,
"normalized_l2": 0.0,
"channels": [
{
"label": "background",
"elements": 14181640,
"max_abs": 0.0,
"mean_abs": 0.0,
"failing_elements_rtol_1e-4_atol_1e-4": 0,
"sign_mismatches": 0,
"finite": true
},
{
"label": "artery",
"elements": 14181640,
"max_abs": 0.0,
"mean_abs": 0.0,
"failing_elements_rtol_1e-4_atol_1e-4": 0,
"sign_mismatches": 0,
"finite": true
},
{
"label": "vein",
"elements": 14181640,
"max_abs": 0.0,
"mean_abs": 0.0,
"failing_elements_rtol_1e-4_atol_1e-4": 0,
"sign_mismatches": 0,
"finite": true
},
{
"label": "ureter",
"elements": 14181640,
"max_abs": 0.0,
"mean_abs": 0.0,
"failing_elements_rtol_1e-4_atol_1e-4": 0,
"sign_mismatches": 0,
"finite": true
},
{
"label": "neoplasm",
"elements": 14181640,
"max_abs": 0.0,
"mean_abs": 0.0,
"failing_elements_rtol_1e-4_atol_1e-4": 0,
"sign_mismatches": 0,
"finite": true
},
{
"label": "parenchyma",
"elements": 14181640,
"max_abs": 0.0,
"mean_abs": 0.0,
"failing_elements_rtol_1e-4_atol_1e-4": 0,
"sign_mismatches": 0,
"finite": true
}
],
"elements": 85089840,
"finite": true,
"max_abs": 0.0,
"differing_elements": 0,
"array_equal": true,
"result": "pass"
},
"retained_receipt_path": "results/renal-numerics-20261012.json",
"retained_receipt_sha256": "fdd985ea32200b4a4c47319058c6bff62d2a57bf7e0399283235581e4b4f127d"
},
"notes": "Rechecked the fresh independently parsed 2026-10-12 MONAI CPU pipeline and corrected native MLX outputs on the retained C3L-01458 preparation; this recheck performs no model inference. Source-order FP32 convolution and Welford GroupNorm yield bitwise-identical raw logits: 0/85,089,840 differences, max absolute error 0, zero sign mismatches, unchanged rtol=atol=1e-4 pass. All 5,935,600 exported mask voxels agree (every label Dice 1). Stable sigmoid eliminates the native exp overflow warning without changing threshold decisions. Anatomical accuracy remains unverified: manual crop/registration and substituted denoising, no reference labels. Historical failed evidence is retained in the linked prior records.",
"failure": null,
"verification": {
"inputs": {
"arterial_path": {
"path": "<paper-repo>/work/runs/inputs/renal-cect/prepared_denoised/arterial.nii.gz",
"sha256": "ce70fa42b63eb44df2d1e4906c61eca23ba80c748ee5358137452b4d5aeed6ff"
},
"venous_path": {
"path": "<paper-repo>/work/runs/inputs/renal-cect/prepared_denoised/venous.nii.gz",
"sha256": "27673abe6398be15f0b35629e986372cae7f3128dc3e278c4939587ca72f448a"
},
"excretory_path": {
"path": "<paper-repo>/work/runs/inputs/renal-cect/prepared_denoised/excretory.nii.gz",
"sha256": "31a43dd92124042b7ac612f72ee117f87dd1755045aaa580a7a66c43a90f4c7a"
}
},
"mlx_outputs": {
"mask": {
"path": "<paper-repo>/work/runs/renal-numerics-20261012/mlx-final/renalStructures_CECT_segmentation_mask.nii.gz",
"sha256": "fa6de5a6a23f0216a1ca477ee75222e9599058753ec029e64a6afebca9cb3314"
}
},
"checkpoint": {
"path": "<paper-repo>/work/runs/renal-numerics-20261012/bundles/renalStructures_CECT_segmentation/models/model.pt",
"sha256": "ef934ae5b6fdf9a19b83ab9ec28b64d63dca43aea8ef3e177724c3076170a21f"
}
},
"prior_attempt_records": [
"results/reference/history/segresnet-renal-cect-before-20261012-fix.json",
"results/renal-independent-reference-20261009.json"
]
}
|