segresnet-brats-mlx / README.md
josand's picture
Card: Python 3.13 only
29b097b verified
|
Raw History Blame Contribute Delete
2.39 kB
metadata
license: apache-2.0
library_name: mlx
tags:
  - mlx
  - native-mlx
  - apple-silicon
  - medical-imaging
  - mri
  - brain-tumor
  - segmentation
  - research
language:
  - en
inference: false
pipeline_tag: image-segmentation
base_model: MONAI/brats_mri_segmentation
MedMLX — Segment. BRAIN MRI / SEGRESNET

SegResNet · Brain Tumor

Segment brain tumor regions from four MRI sequences with the MONAI SegResNet checkpoint.

GitHub · Files · Docs · Paper

Input Output
T1, T1ce, T2 + FLAIR · NIfTI Brain tumor segmentation

Apple Silicon · Metal · Python 3.13

Quick start

uv venv --python 3.13
source .venv/bin/activate

uv pip install "segresnet-mlx>=0.3.1"
uv tool install huggingface-hub

hf download MedMLX/segresnet-brats-mlx --revision 14f9cda3649965729663c7365c49fd839c81a01b --local-dir models

Replace the example input paths with your own files.

from segresnet_mlx.medmlx import run

result = run(
    bundle='brats_mri_segmentation',
    weights_path='models/segresnet-brats.safetensors',
    output_dir='outputs',
    t1c_path='T1gd.nii.gz',
    t1_path='T1w.nii.gz',
    t2_path='T2w.nii.gz',
    flair_path='FLAIR.nii.gz',
)
print(result["outputs"])

All four MRI volumes must share the same voxel grid.

Use & license

For research and education. Not validated for clinical use.

Weights: Apache-2.0. Notices.

Paper references

Citation

If you use MedMLX, please cite the MedMLX paper:

@article{sandoval2026medmlx,
  title   = {MedMLX: On-Device Medical Imaging AI for Apple Silicon},
  author  = {Sandoval, A. and Sandoval, J. and Saleem, A.},
  journal = {medRxiv},
  year    = {2026},
  doi     = {10.64898/2026.10.28.26366762}
}