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.1

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.1
File Size Uploaded Provenance Actions
flexray_mlx-0.2.1.tar.gz 33.2 kB Without provenance Details for flexray_mlx-0.2.1.tar.gz

Built distribution (wheel)

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

Total release size: 70.5 kB

Release files / flexray_mlx-0.2.1.tar.gz

Download URL flexray_mlx-0.2.1.tar.gz
Size 33.2 kB
Tags Source
SHA-256 checksum
How to use checksums
732737739b2293b036c7778ff81d98a479e0970be25e0aea3750327d69e04b98
BLAKE2b-256 checksum
How to use checksums
0afdad14de7aee3f2875655e554cd1d219df0ac4a2742a2f5902a5d49eb08f9a
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.1-py3-none-any.whl

Download URL flexray_mlx-0.2.1-py3-none-any.whl
Size 37.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d12dfc9dee772f049b706d3318e61d9ca9966aec012801701a32ece8e1a7e503
BLAKE2b-256 checksum
How to use checksums
7459f6acbfeab8f24e10172ff2d1db822439c615913cf14cedaf7425fc394498
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.1

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.1 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