Skip to main content

flexray-mlx

Segment anatomical structures in radiographs with FleXray and native MLX.

Docs · MedMLX

One chest radiograph → separate lung, heart and individual rib masks.

One chest radiograph → separate lung, heart and individual rib masks.

Input Output
Raster image or single-frame DICOM Structure masks and probabilities

Apple Silicon · Metal · Python 3.13 / 3.14 · uv

Quick start

uv venv --python 3.13
source .venv/bin/activate
repo="https://github.com/MedMLX/flexray-mlx"
uv pip install \
  "flexray-mlx @ git+$repo" \
  huggingface-hub

Download the released weights and run:

from huggingface_hub import snapshot_download
from flexray_mlx.medmlx import run

weights = snapshot_download("VictorButoi/flexray", local_dir="flexray", ignore_patterns=["*.onnx"])

result = run(image_path="chest.png", weights_path=weights, output_dir="out")
print(result["outputs"]["mask"])

Use label_name to select a structure and ensemble=True to average all five members.

License

Apache-2.0. See third-party notices. Model weights retain their publisher terms. FleXray weights are noncommercial (CC-BY-NC-4.0).

For research and education. Outputs require human review.

Metadata

Release files for flexray-mlx 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flexray-mlx 0.2.2
File Size Uploaded Provenance Actions
flexray_mlx-0.2.2.tar.gz 33.2 kB Without provenance Details for flexray_mlx-0.2.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for flexray-mlx 0.2.2
File Interpreter ABI Platform Actions
flexray_mlx-0.2.2-py3-none-any.whl Python 3 none any Details for flexray_mlx-0.2.2-py3-none-any.whl

Total release size: 70.5 kB

Release files / flexray_mlx-0.2.2.tar.gz

Download URL flexray_mlx-0.2.2.tar.gz
Size 33.2 kB
Tags Source
SHA-256 checksum
How to use checksums
74bdd37711c423817e3083ecab65b220a61b86f8657c1e9930e67a94a2bf8b64
BLAKE2b-256 checksum
How to use checksums
3f3eaa8c3e0c16aa92b90afc1a75eb931890dac7459a565a8a19f058f07d337b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Release files / flexray_mlx-0.2.2-py3-none-any.whl

Download URL flexray_mlx-0.2.2-py3-none-any.whl
Size 37.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f61d891b75900e62893c7079d58b4b67ed80be91dd49f171e07147a78fdefd06
BLAKE2b-256 checksum
How to use checksums
5fbec3b99ef4a1fd3ec6cc3ea5e3b93646bca94361d8506f196fc2264573a6c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Security for flexray-mlx 0.2.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page