File size: 9,689 Bytes
3f8be54
0deb650
 
 
3f8be54
9e78683
 
 
3f8be54
 
 
 
 
de438d9
1aeffa9
de0949e
 
3f8be54
 
9e78683
 
3f8be54
0deb650
 
9e78683
0deb650
195e742
 
 
0deb650
 
3f8be54
 
 
0deb650
 
 
 
9e78683
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3f8be54
 
 
 
9e78683
 
 
 
 
 
 
3f8be54
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6219d41
484cdfe
 
 
 
 
20ede13
484cdfe
 
3f8be54
 
 
9e78683
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3f8be54
9e78683
 
3f8be54
 
 
9e78683
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3f8be54
 
 
 
 
0deb650
3f8be54
 
9e78683
 
 
 
 
3f8be54
 
de0949e
 
 
 
1aeffa9
 
 
 
 
 
 
 
de0949e
 
 
3ca01ae
 
de0949e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
---
license:
  - cc-by-4.0
  - cc-by-nc-4.0
pretty_name: FleXray Data
viewer: false
task_categories: [image-segmentation]
size_categories: [100K<n<1M]
tags: [medical, x-ray, segmentation, anatomy]
---

# FleXray data release

- Website: [FleXray project page](https://flexray.csail.mit.edu/)
- Paper: [FleXray: Universal Clinical X-ray Segmentation](https://arxiv.org/abs/2609.26756)
- Code: [github.com/VictorButoi/FleXray](https://github.com/VictorButoi/FleXray)

Training and evaluation data for **FleXray**, a pan-anatomy X-ray segmentation model.
This repository holds every real X-ray source whose license permits redistribution,
repackaged as image/mask pairs with `fxr-dataset` manifests and dataset-native
label names that FleXray maps into its common protocol (CC BY 4.0), plus two more parts of the data described in the paper:

- **FluXray** (synthetic, CC BY-NC 4.0): `FluXray/` — 138,063 generatively edited
  digitally reconstructed radiographs rendered from the 1,597 MOOSE CTs at 90 poses
  each, quality-filtered, with exact overlapping masks in 63 channels (62 structures plus background).
  Shipped as the training database itself (`FluXray/thunder_dbs/1.0/data.mdb`, an LMDB
  of float16 256 x 256 images and 63-channel binary masks that `flexray` reads directly)
  together with `samples.csv` (pose, split, MOOSE subject and per-sample license for
  every image), `protocol.yml` (label order and mask thresholds), and the
  `filter_*.csv` quality-control scores and thresholds. `FluXray/README.md` documents
  every file; `FluXray/LICENSE` summarizes the license.
- **MURA forearm/humerus annotations** (masks only, CC BY 4.0): bundled with the
  FleXray GitHub repository and mirrored here under `mura_forearm_humerus_annotations/`

Licenses therefore differ by folder: the redistributed real X-ray folders, `splits/`,
and the MURA annotations are CC BY 4.0; `FluXray/` is CC BY-NC 4.0 as a collection,
with each image inheriting the license of its MOOSE source site.

## Data access

This release contains **4,232 real image/mask pairs** across seven datasets,
**138,063 FluXray samples**, and **100 MURA annotation masks** whose source
images must be obtained separately. Browse the dataset folders below or use
the [download and packaging instructions](#usage).

The automatic Hugging Face image-folder viewer is disabled because it only
recognizes a subset of the images and does not represent the paired masks or
the FluXray database. Use each `dataset.yml` for image/mask paths and split
assignments; FluXray's `samples.csv` records its samples and splits.

- [Real image/mask datasets](#redistributed-datasets-cc-by-40): PNG images,
  PNG or NPY masks, and a packaging manifest per dataset.
- [FluXray](FluXray/README.md): a ThunderDB database plus protocol and sample
  metadata. The database download is about **18.8 GB**.
- [MURA annotations](mura_forearm_humerus_annotations/README.md): masks and a
  script that joins them to your own MURA download.
- [Splits and exclusions](splits/README.md): source-relative records for
  reconstructing the published partitions.

## Redistributed datasets (CC BY 4.0)

| Dataset | Role in paper | Samples (train/val/test) | Labels | Source |
|---|---|---|---|---|
| [HandBones](HandBones/README.md) | training | 93 (65/15/13) | carpals, phalanges (distal/intermediate/proximal), metacarpals, radii, ulnae | https://universe.roboflow.com/boneage-x90qt/-hand-bones-mdjkr |
| [FootBones](FootBones/README.md) | training | 571 (400/86/85) | metatarsals (1-5), toes | https://universe.roboflow.com/monchbot1/foot_op |
| [ElbowLat](ElbowLat/README.md) | evaluation | 601 (419/91/91) | humeri, radii, ulnae | https://universe.roboflow.com/ionspace/elbow_lat-lnn0s-pmycd |
| [HipRay](HipRay/README.md) | evaluation | 139 (97/21/21) | femurs, hips | https://data.mendeley.com/datasets/zm6bxzhmfz/1 |
| [LowerLimbs](LowerLimbs/README.md) | evaluation | 56 (39/9/8) | femurs, tibiae, fibulae | https://universe.roboflow.com/orthopedicstitching/bone-identifier-1rey5 |
| [MTDDH](MTDDH/README.md) | evaluation | 905 (632/138/135) | ilium, pubis, ischium, femoral head, femur | https://doi.org/10.57760/sciencedb.24372 |
| [BTXRD](BTXRD/README.md) | evaluation (finetuning) | 1867 (1305/281/281) | tumor | https://doi.org/10.6084/m9.figshare.27865398 |

Each `<Dataset>/` folder contains `dataset.yml`, `images/` (16-bit PNG), `labels/`
(PNG index maps or NPY channel masks), a `README.md` with preprocessing and label details,
and a `LICENSE` with attribution. Images were min-max normalized per image, zero-padded to
a square and resized to 256 x 256; splits are the ones used in the paper.

## Datasets referenced by pointer only

These sources are used by FleXray but not redistributed here. Their FleXray label
specifications (native label names, protocol aliases and drops) are shipped with the
`flexray` package under `fxr/configs/datasets/<Name>.yml`.

| Dataset | Role | Why not redistributed | Where to get it |
|---|---|---|---|
| MOOSE / ENHANCE-PET 1.6k | training (CT, DRR rendering) | CT sources are not redistributed; already public | https://registry.opendata.aws/enhance-pet-1-6k/ |
| ElbowCT | training (CT) | CT sources are not redistributed | https://figshare.com/articles/dataset/3D_models_of_elbow_joints_along_with_corresponding_CT_data_from_Chinese_individuals/28245599 |
| PedsCT | training (CT) | CT sources are not redistributed | https://www.cancerimagingarchive.net/collection/pediatric-ct-seg/ |
| HaN-Seg | training (CT) | CC BY-NC-ND 4.0 (no derivatives) | https://han-seg2023.grand-challenge.org/ |
| RSNAFrac | training (CT) | Kaggle competition rules forbid redistribution | https://www.kaggle.com/competitions/rsna-2022-cervical-spine-fracture-detection/ |
| Shoulder-CT | training (CT) | no license granted by the uploader | https://www.kaggle.com/datasets/syxlicheng/automatically-transform-ct-datasets-into-drrs |
| MURA | training (images) | Stanford Research Use Agreement | https://stanfordmlgroup.github.io/competitions/mura/ (our masks: see above) |
| AASCE | evaluation | license undetermined | https://aasce19.github.io/ |
| DarwinCVD19 | evaluation | mixed per-image image licenses | https://darwin.v7labs.com/v7-labs/covid-19-chest-x-ray-dataset |
| DeepFluoro | evaluation | CC BY-NC 4.0; already hosted on Hugging Face | https://huggingface.co/datasets/eigenvivek/xvr-data |
| RAM-W600 | evaluation | CC BY-NC-SA 4.0; already hosted on Hugging Face | https://huggingface.co/datasets/TokyoTechMagicYang/RAM-W600 |
| VinDr-Rib | evaluation | signed data use agreement required | https://vindr.ai/ribcxr |
| PedsTorso | evaluation | upstream project no longer available; license cannot be verified | https://universe.roboflow.com/monchbot1/thoracoabdominal |

## Splits and exclusions

`splits/<Dataset>/splits.csv` lists the train/val/test assignment of every image FleXray
trained or evaluated on, and `splits/<Dataset>/exclusions.csv` lists every image removed
during quality control together with the reason, for all fifteen real X-ray sources above
(redistributed or not). Paths are relative to each source's original download, so the
paper's partitions can be rebuilt exactly; see `splits/README.md` for the schema.

## Usage

Dataset packaging and training require the training extra:

```bash
python -m pip install "flexray[train]"
```

Download only the dataset you need. For example, fetch HipRay and its split
records without downloading the FluXray database:

```python
from huggingface_hub import snapshot_download

snapshot_download(
    repo_id="VictorButoi/flexray-data",
    repo_type="dataset",
    local_dir="./flexray-data",
    allow_patterns=["README.md", "HipRay/*", "splits/HipRay/*"],
)
```

Validate and pack it into the layout consumed by FleXray:

```bash
fxr-dataset validate ./flexray-data/HipRay/dataset.yml
fxr-dataset pack ./flexray-data/HipRay/dataset.yml /data/flexray/HipRay
export XRAY_DATAPATH=/data/flexray
```

Repeat with another folder name to package another real X-ray dataset.
To include FluXray, download its approximately 18.8 GB database and sidecars
into the same download directory:

```python
snapshot_download(
    repo_id="VictorButoi/flexray-data",
    repo_type="dataset",
    local_dir="./flexray-data",
    allow_patterns=["FluXray/*"],
)
```

```bash
export GENERATED_DATAPATH="$PWD/flexray-data"
```

FluXray is already packaged at `FluXray/thunder_dbs/1.0/`. Its historical
`GENERATED_DATAPATH` variable selects the storage root; it is configured as
an `Xray` source:

```yaml
# training config excerpt
data:
  Xray:
    HipRay: {}
    FluXray: {version: "1.0"}
```

See [dataset documentation](https://github.com/VictorButoi/FleXray/blob/main/docs/datasets.md)
and [training configuration](https://github.com/VictorButoi/FleXray/blob/main/docs/training.md)
for complete examples. Source datasets retain their roles in the paper;
adding one to a training config does not change its published evaluation split.

## Citation

If you use either **FluXray** or our **MURA annotations**, please cite the
FleXray paper:

```bibtex
@misc{butoi2026flexray,
      title={FleXray: Universal Clinical X-ray Segmentation},
      author={Victor Ion Butoi and Vivek Gopalakrishnan and John V. Guttag and Adrian V. Dalca and Neel Dey},
      year={2026},
      eprint={2609.26756},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2609.26756},
}
```

**If you use any of the other datasets, please cite the original dataset sources
and comply with their copyright and license terms.** Citations and licensing
details are listed in the `README.md` and `LICENSE` files within each dataset folder.