--- title: "FleXray: Universal Clinical X-ray Segmentation" emoji: ðŸĶī colorFrom: red colorTo: green sdk: gradio sdk_version: 6.28.0 app_file: app.py short_description: Segment 60 anatomical structures from any clinical X-ray python_version: "3.10" startup_duration_timeout: 30m --- # FleXray: Universal Clinical X-ray Segmentation FleXray is a single 2D UNet that segments **60 anatomical structures** (plus background) from standard radiographs across body regions, projections, and acquisition settings — chest, spine, pelvis, hands, knees, and more — with one set of weights. Upload an X-ray (or pick one of the examples), choose a quality mode, and the model returns a color-coded anatomical overlay. Use the label checkboxes to focus on the structures you care about and hover the overlay legend to identify each color. **Quality modes** (matching the [official browser demo](https://flexray.csail.mit.edu/)): | Mode | What runs | | --- | --- | | Low | flagship model, single pass — fastest | | Normal | flagship model with 8-pass test-time augmentation | | High | 5-model ensemble, single pass | | X-High | 5-model ensemble with 8-pass TTA — best quality | ## Model - Weights: [`VictorButoi/flexray`](https://huggingface.co/VictorButoi/flexray) (flagship + 4-member ensemble) - Code: [github.com/VictorButoi/FleXray](https://github.com/VictorButoi/FleXray) (this Space uses the official `flexray` PyPI package 1:1) - Paper: [FleXray: Universal Clinical X-ray Segmentation](https://arxiv.org/abs/2609.26756) ## Example images The bundled examples (`examples/chest_lateral.png`, `examples/pelvis_ap.png`) are the two radiographs the authors use in their own tutorial materials, courtesy of [Radiopaedia.org](https://radiopaedia.org/), used with permission (see the [FleXray repo](https://github.com/VictorButoi/FleXray/blob/main/examples/assets/README.md)). ## License & disclaimer Model weights are released under CC-BY-NC-4.0 (code is MIT). This demo is for research and educational purposes only — it is **not** a medical device and must not be used for clinical decision-making.