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.

FleXray is the work of Victor Ion Butoi and co-authors. The model, its training method and the weights are theirs: see the original repository, VictorButoi/FleXray, and the paper, arXiv:2609.26756. This repository only repackages their released weights (VictorButoi/flexray) for MLX on Apple Silicon. Please cite their paper and star their repository if FleXray is useful to you.

Original repository · Original paper · Original weights · GitHub · Files · Docs · MedMLX 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

Please cite the original paper:

Butoi, V. I. et al. (2026). FleXray: Universal Clinical X-ray Segmentation. arXiv:2609.26756.

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