Image Segmentation
MLX
English
native-mlx
apple-silicon
medical-imaging
mri
brain-tumor
segmentation
research
Instructions to use MedMLX/segresnet-brats-mlx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use MedMLX/segresnet-brats-mlx with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] hf download MedMLX/segresnet-brats-mlx --local-dir segresnet-brats-mlx
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
File size: 7,321 Bytes
30bbb7a | 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 210 211 212 | {
"schema_version": "medmlx.run.v1",
"model": "segresnet-brats",
"configuration": "MONAI brats_mri_segmentation (SegResNet, 4-channel MRI)",
"date": "2026-10-08",
"package": {
"name": "segresnet-mlx",
"path": "<repositories>/segresnet-mlx",
"git_revision": "40cbce54523632fbc8cdfc564a9cce48d8df3424",
"branch": "main",
"dirty": false,
"remote": "https://github.com/MedMLX/segresnet-mlx.git"
},
"environment": {
"machine": "MacBook Pro (2021), Apple M1 Max, 10-core CPU, 24-core GPU, 64 GB",
"macos": "27.0",
"python": "3.12.12",
"mlx_version": "0.32.3",
"device": "gpu"
},
"command": {
"entry_point": "segresnet_mlx.medmlx:run",
"kwargs": {
"bundle": "brats_mri_segmentation",
"weights_path": "<paper-repo>/work/runs/weights/segresnet-brats.safetensors",
"output_dir": "<paper-repo>/work/runs/segresnet-brats/out",
"t1c_path": "<home>/Documents/Codex/2026-10-08/https-drive-google-com-drive-folders/outputs/medmlx/datasets/qualification-2026-10-08/derived/msd-brain-channels/BRATS_001/T1gd.nii.gz",
"t1_path": "<home>/Documents/Codex/2026-10-08/https-drive-google-com-drive-folders/outputs/medmlx/datasets/qualification-2026-10-08/derived/msd-brain-channels/BRATS_001/T1w.nii.gz",
"t2_path": "<home>/Documents/Codex/2026-10-08/https-drive-google-com-drive-folders/outputs/medmlx/datasets/qualification-2026-10-08/derived/msd-brain-channels/BRATS_001/T2w.nii.gz",
"flair_path": "<home>/Documents/Codex/2026-10-08/https-drive-google-com-drive-folders/outputs/medmlx/datasets/qualification-2026-10-08/derived/msd-brain-channels/BRATS_001/FLAIR.nii.gz",
"overwrite": true
},
"invocation": "cd <repositories>/segresnet-mlx && .venv/bin/python <paper-repo>/work/runs/_harness/run_one.py segresnet_mlx.medmlx <kwargs.json> <run_result.json>",
"process": "fresh Python process per model"
},
"checkpoint": {
"path": "<paper-repo>/work/runs/weights/segresnet-brats.safetensors",
"sha256": "9044dcf3e2a82ef18f14d7abf507debbea52e14560c304b990a4c0e412bc9c30",
"source": "huggingface.co/MONAI/brats_mri_segmentation@370f7f9d models/model.pt (local HF cache)",
"source_sha256": "860ccb3f1c21c99d0410ad8a1ac4ef6b8fab60cec0a503b0ba42675741a750ae",
"registry_sha256_match": true,
"conversion": "segresnet_mlx.convert_checkpoint(spec=BUNDLES['brats_mri_segmentation'].spec)"
},
"inputs": [
{
"role": "t1c_path",
"path": "<home>/Documents/Codex/2026-10-08/https-drive-google-com-drive-folders/outputs/medmlx/datasets/qualification-2026-10-08/derived/msd-brain-channels/BRATS_001/T1gd.nii.gz",
"sha256": "96abcdbb541c4af37f03bef466eee5d11a3f91b9a1ea10b1a4a22cb38b7b3978",
"dataset": "MSD Task01 BrainTumour (training)",
"case_id": "BRATS_001",
"derivation": "channel split of imagesTr/BRATS_001.nii.gz (MSD order FLAIR,T1w,T1gd,T2w)"
},
{
"role": "t1_path",
"path": "<home>/Documents/Codex/2026-10-08/https-drive-google-com-drive-folders/outputs/medmlx/datasets/qualification-2026-10-08/derived/msd-brain-channels/BRATS_001/T1w.nii.gz",
"sha256": "740b0adfa8de83fcbdfa5cd5f14689f6d947120bfbf057fe82954c07477bb173",
"dataset": "MSD Task01 BrainTumour (training)",
"case_id": "BRATS_001",
"derivation": "channel split of imagesTr/BRATS_001.nii.gz (MSD order FLAIR,T1w,T1gd,T2w)"
},
{
"role": "t2_path",
"path": "<home>/Documents/Codex/2026-10-08/https-drive-google-com-drive-folders/outputs/medmlx/datasets/qualification-2026-10-08/derived/msd-brain-channels/BRATS_001/T2w.nii.gz",
"sha256": "8e2de5df0abd8b25ac1136c6570a6d03f2255107ef1265145b606f07acd1f1af",
"dataset": "MSD Task01 BrainTumour (training)",
"case_id": "BRATS_001",
"derivation": "channel split of imagesTr/BRATS_001.nii.gz (MSD order FLAIR,T1w,T1gd,T2w)"
},
{
"role": "flair_path",
"path": "<home>/Documents/Codex/2026-10-08/https-drive-google-com-drive-folders/outputs/medmlx/datasets/qualification-2026-10-08/derived/msd-brain-channels/BRATS_001/FLAIR.nii.gz",
"sha256": "7571148ce691dccff5a84109091f43385b7c069a99cd7a967b2002aaeec64cdd",
"dataset": "MSD Task01 BrainTumour (training)",
"case_id": "BRATS_001",
"derivation": "channel split of imagesTr/BRATS_001.nii.gz (MSD order FLAIR,T1w,T1gd,T2w)"
}
],
"outputs": {
"mask": {
"path": "<paper-repo>/work/runs/segresnet-brats/out/brats_mri_segmentation_mask.nii.gz",
"sha256": "ce7f2ca25eeb2e1dea09e748dfdf1ec666a16296bc523a0b537608575ed5dcd6",
"label_voxel_counts": {
"0": 8791633,
"1": 27348,
"2": 74690,
"4": 34329
}
},
"details": {
"labels_present": [
0,
1,
2,
4
],
"input_shape": [
240,
240,
155
],
"sliding_window": {
"roi_size": [
240,
240,
160
],
"sw_batch_size": 1,
"overlap": 0.5
},
"seconds": {
"load_inputs_and_weights": 0.3394,
"preprocess": 0.1134,
"inference": 1.4535,
"postprocess_and_write": 0.2894
}
}
},
"checks": [
{
"name": "mask_reopens",
"result": "pass",
"detail": {
"dtype": "uint8",
"shape": [
240,
240,
155
]
}
},
{
"name": "finite_integer_labels",
"result": "pass",
"detail": null
},
{
"name": "shape_matches_input",
"result": "pass",
"detail": {
"input": [
240,
240,
155
],
"mask": [
240,
240,
155
]
}
},
{
"name": "affine_matches_input",
"result": "pass",
"detail": {
"max_abs_diff": 0.0
}
},
{
"name": "labels_in_expected_set",
"result": "pass",
"detail": {
"observed": [
0,
1,
2,
4
],
"allowed": [
0,
1,
2,
4
]
}
},
{
"name": "foreground_nonempty",
"result": "pass",
"detail": {
"foreground_voxels": 136367
}
},
{
"name": "required_labels_present",
"result": "pass",
"detail": {
"required": [
1,
2
]
}
},
{
"name": "tumor_overlaps_annotated_region",
"result": "pass",
"detail": {
"whole_tumor_dice_vs_msd_label_informational": 0.8897
}
}
],
"duration_s": 2.271,
"timing_boundary": "wall clock around the single run() call: weight loading, preprocessing, MLX inference and export; interpreter start-up and package import excluded; one run, no warmup",
"mlx_peak_gb": 6.954,
"memory_definition": "mx.get_peak_memory() after mx.reset_peak_memory() immediately before run(); decimal GB",
"panel": "paper/figures/runs/segresnet-brats.png",
"status": "success",
"failure_cause": null,
"notes": "BRATS_001 is training-exposed MSD data; overlap with the MSD label is a sanity check, not an accuracy claim.",
"key_check": "labels [1, 2, 4]; whole_tumor_dice_vs_msd_label_informational = 0.8897"
}
|