MedMLX — Segment. RADIOGRAPHS / FLEXRAY

FleXray · Radiographs

Segment anatomical structures in radiographs with the released FleXray models: the flux0375 member alone, or the five-member ensemble.

GitHub · Files · Docs · Paper

Input Output
Radiograph Anatomical segmentation

Apple Silicon · Metal · Python 3.13

Quick start

uv venv --python 3.13
source .venv/bin/activate
uv pip install "flexray-mlx>=0.3.0"

Replace the example input paths with your own files.

from flexray_mlx import run

result = run(image_path="chest.png", output_dir="outputs", label_name="lungs")
print(result["outputs"]["mask"])

Weights for flux0375 download from this repository on first use. To fetch all five members, download this revision and pass the folder as weights_path="models":

uv tool install huggingface-hub
hf download MedMLX/flexray-mlx --revision f4738325ff0c0f202918c00ac6f5d4b3760af28f --local-dir models

The default ensemble=False uses flux0375, which downloads automatically. ensemble=True averages all five released members and needs the downloaded folder as weights_path; the revision above includes all five.

Use & license

For research and education. Not validated for clinical use.

Weights: CC-BY-NC-4.0 · noncommercial. 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, J. and Sandoval, A. and Saleem, A.},
  journal = {medRxiv},
  year    = {2026},
  doi     = {10.64898/2026.10.28.26366762}
}
Downloads last month

-

Downloads are not tracked for this model. How to track
MLX
Hardware compatibility
Log In to add your hardware

Quantized

Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for MedMLX/flexray-mlx

Finetuned
(1)
this model

Collection including MedMLX/flexray-mlx

Paper for MedMLX/flexray-mlx