VictorButoi commited on
Commit
9e78683
·
verified ·
1 Parent(s): de438d9

Clarify dataset access and training installation

Browse files
BTXRD/README.md CHANGED
@@ -25,7 +25,7 @@ those names into its label protocol at training time.
25
  ## Usage
26
 
27
  ```bash
28
- pip install flexray
29
  fxr-dataset validate dataset.yml
30
  fxr-dataset pack dataset.yml /data/flexray/BTXRD
31
  ```
 
25
  ## Usage
26
 
27
  ```bash
28
+ python -m pip install "flexray[train]"
29
  fxr-dataset validate dataset.yml
30
  fxr-dataset pack dataset.yml /data/flexray/BTXRD
31
  ```
ElbowLat/README.md CHANGED
@@ -27,7 +27,7 @@ those names into its label protocol at training time.
27
  ## Usage
28
 
29
  ```bash
30
- pip install flexray
31
  fxr-dataset validate dataset.yml
32
  fxr-dataset pack dataset.yml /data/flexray/ElbowLat
33
  ```
 
27
  ## Usage
28
 
29
  ```bash
30
+ python -m pip install "flexray[train]"
31
  fxr-dataset validate dataset.yml
32
  fxr-dataset pack dataset.yml /data/flexray/ElbowLat
33
  ```
FluXray/README.md CHANGED
@@ -7,7 +7,7 @@ tags: [medical, x-ray, segmentation, synthetic]
7
  # FluXray: label-exact synthetic radiographs
8
 
9
  138063 generatively edited digitally reconstructed radiographs with exact,
10
- overlapping segmentation masks for 63 structures, rendered from the
11
  1597 annotated whole-body CTs of the MOOSE / ENHANCE-PET 1.6k
12
  dataset and restyled with a language-conditioned image editor (FLUX.2 klein), then
13
  quality-filtered (see the FleXray paper). Splits: {'train': 124198, 'val': 13865, 'test': 0}.
@@ -19,7 +19,7 @@ reads directly; point `GENERATED_DATAPATH` at the root of the `flexray-data` dow
19
  (the directory containing `FluXray/`):
20
 
21
  ```bash
22
- pip install flexray
23
  export GENERATED_DATAPATH=/path/to/flexray-data
24
  # training config
25
  # data:
@@ -29,7 +29,7 @@ export GENERATED_DATAPATH=/path/to/flexray-data
29
 
30
  | File | Contents |
31
  |---|---|
32
- | `data.mdb` | The LMDB database. One entry per sample keyed `<subject>_<pose_id>`, holding `img` (float16, 256 x 256, intensities in [0, 1]) and `seg` (uint8, 63 x 256 x 256 binary masks, one channel per structure; channels may overlap). Index entries: `_samples` (ordered keys), `_subjects`, `_splits` (`train`/`val`/`test` key lists), `_metadata` (per-sample pose, split, MOOSE subject, source site, license) and `_attrs` (build provenance, `label_names` in channel order). Read with `thunderpack.ThunderDB.open(path, "r")` or through `flexray`. |
33
  | `lock.mdb` | LMDB lock file; recreated automatically and safe to ignore. |
34
  | `protocol.yml` | The 63 label names in channel order (`label_names`), the mask thresholds used to binarize the rendered soft masks, and the build recipe. |
35
  | `samples.csv` | One row per sample: `sample_id`, MOOSE `subject_id`, `split`, `pose_id`, camera position `x`/`y`/`z` (mm) and rotation `alpha_deg`/`beta_deg`/`gamma_deg`, `visible_label_count`, `source_site`, `license`. |
 
7
  # FluXray: label-exact synthetic radiographs
8
 
9
  138063 generatively edited digitally reconstructed radiographs with exact,
10
+ overlapping segmentation masks in 63 channels (62 structures plus background), rendered from the
11
  1597 annotated whole-body CTs of the MOOSE / ENHANCE-PET 1.6k
12
  dataset and restyled with a language-conditioned image editor (FLUX.2 klein), then
13
  quality-filtered (see the FleXray paper). Splits: {'train': 124198, 'val': 13865, 'test': 0}.
 
19
  (the directory containing `FluXray/`):
20
 
21
  ```bash
22
+ python -m pip install "flexray[train]"
23
  export GENERATED_DATAPATH=/path/to/flexray-data
24
  # training config
25
  # data:
 
29
 
30
  | File | Contents |
31
  |---|---|
32
+ | `data.mdb` | The LMDB database. One entry per sample keyed `<subject>_<pose_id>`, holding `img` (float16, 256 x 256, intensities in [0, 1]) and `seg` (uint8, 63 x 256 x 256 binary masks, background at channel 0 followed by 62 structures; channels may overlap). Index entries: `_samples` (ordered keys), `_subjects`, `_splits` (`train`/`val`/`test` key lists), `_metadata` (per-sample pose, split, MOOSE subject, source site, license) and `_attrs` (build provenance, `label_names` in channel order). Read with `thunderpack.ThunderDB.open(path, "r")` or through `flexray`. |
33
  | `lock.mdb` | LMDB lock file; recreated automatically and safe to ignore. |
34
  | `protocol.yml` | The 63 label names in channel order (`label_names`), the mask thresholds used to binarize the rendered soft masks, and the build recipe. |
35
  | `samples.csv` | One row per sample: `sample_id`, MOOSE `subject_id`, `split`, `pose_id`, camera position `x`/`y`/`z` (mm) and rotation `alpha_deg`/`beta_deg`/`gamma_deg`, `visible_label_count`, `source_site`, `license`. |
FootBones/README.md CHANGED
@@ -31,7 +31,7 @@ those names into its label protocol at training time.
31
  ## Usage
32
 
33
  ```bash
34
- pip install flexray
35
  fxr-dataset validate dataset.yml
36
  fxr-dataset pack dataset.yml /data/flexray/FootBones
37
  ```
 
31
  ## Usage
32
 
33
  ```bash
34
+ python -m pip install "flexray[train]"
35
  fxr-dataset validate dataset.yml
36
  fxr-dataset pack dataset.yml /data/flexray/FootBones
37
  ```
HandBones/README.md CHANGED
@@ -31,7 +31,7 @@ those names into its label protocol at training time.
31
  ## Usage
32
 
33
  ```bash
34
- pip install flexray
35
  fxr-dataset validate dataset.yml
36
  fxr-dataset pack dataset.yml /data/flexray/HandBones
37
  ```
 
31
  ## Usage
32
 
33
  ```bash
34
+ python -m pip install "flexray[train]"
35
  fxr-dataset validate dataset.yml
36
  fxr-dataset pack dataset.yml /data/flexray/HandBones
37
  ```
HipRay/README.md CHANGED
@@ -26,7 +26,7 @@ those names into its label protocol at training time.
26
  ## Usage
27
 
28
  ```bash
29
- pip install flexray
30
  fxr-dataset validate dataset.yml
31
  fxr-dataset pack dataset.yml /data/flexray/HipRay
32
  ```
 
26
  ## Usage
27
 
28
  ```bash
29
+ python -m pip install "flexray[train]"
30
  fxr-dataset validate dataset.yml
31
  fxr-dataset pack dataset.yml /data/flexray/HipRay
32
  ```
LowerLimbs/README.md CHANGED
@@ -31,7 +31,7 @@ those names into its label protocol at training time.
31
  ## Usage
32
 
33
  ```bash
34
- pip install flexray
35
  fxr-dataset validate dataset.yml
36
  fxr-dataset pack dataset.yml /data/flexray/LowerLimbs
37
  ```
 
31
  ## Usage
32
 
33
  ```bash
34
+ python -m pip install "flexray[train]"
35
  fxr-dataset validate dataset.yml
36
  fxr-dataset pack dataset.yml /data/flexray/LowerLimbs
37
  ```
MTDDH/README.md CHANGED
@@ -29,7 +29,7 @@ those names into its label protocol at training time.
29
  ## Usage
30
 
31
  ```bash
32
- pip install flexray
33
  fxr-dataset validate dataset.yml
34
  fxr-dataset pack dataset.yml /data/flexray/MTDDH
35
  ```
 
29
  ## Usage
30
 
31
  ```bash
32
+ python -m pip install "flexray[train]"
33
  fxr-dataset validate dataset.yml
34
  fxr-dataset pack dataset.yml /data/flexray/MTDDH
35
  ```
README.md CHANGED
@@ -3,6 +3,9 @@ license:
3
  - cc-by-4.0
4
  - cc-by-nc-4.0
5
  pretty_name: FleXray Data
 
 
 
6
  tags: [medical, x-ray, segmentation, anatomy]
7
  ---
8
 
@@ -14,12 +17,12 @@ tags: [medical, x-ray, segmentation, anatomy]
14
 
15
  Training and evaluation data for **FleXray**, a pan-anatomy X-ray segmentation model.
16
  This repository holds every real X-ray source whose license permits redistribution,
17
- repackaged in FleXray's common label protocol in the `fxr-dataset` package format
18
- (CC BY 4.0), plus two more parts of the data described in the paper:
19
 
20
  - **FluXray** (synthetic, CC BY-NC 4.0): `FluXray/` — 138,063 generatively edited
21
  digitally reconstructed radiographs rendered from the 1,597 MOOSE CTs at 90 poses
22
- each, quality-filtered, with exact overlapping masks for all 63 protocol structures.
23
  Shipped as the training database itself (`FluXray/thunder_dbs/1.0/data.mdb`, an LMDB
24
  of float16 256 x 256 images and 63-channel binary masks that `flexray` reads directly)
25
  together with `samples.csv` (pose, split, MOOSE subject and per-sample license for
@@ -33,17 +36,38 @@ Licenses therefore differ by folder: the redistributed real X-ray folders, `spli
33
  and the MURA annotations are CC BY 4.0; `FluXray/` is CC BY-NC 4.0 as a collection,
34
  with each image inheriting the license of its MOOSE source site.
35
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
  ## Redistributed datasets (CC BY 4.0)
37
 
38
  | Dataset | Role in paper | Samples (train/val/test) | Labels | Source |
39
  |---|---|---|---|---|
40
- | HandBones | training | 93 (65/15/13) | carpals, phalanges (distal/intermediate/proximal), metacarpals, radii, ulnae | https://universe.roboflow.com/boneage-x90qt/-hand-bones-mdjkr |
41
- | FootBones | training | 571 (400/86/85) | metatarsals (1-5), toes | https://universe.roboflow.com/monchbot1/foot_op |
42
- | ElbowLat | evaluation | 601 (419/91/91) | humeri, radii, ulnae | https://universe.roboflow.com/ionspace/elbow_lat-lnn0s-pmycd |
43
- | HipRay | evaluation | 139 (97/21/21) | femurs, hips | https://data.mendeley.com/datasets/zm6bxzhmfz/1 |
44
- | LowerLimbs | evaluation | 56 (39/9/8) | femurs, tibiae, fibulae | https://universe.roboflow.com/orthopedicstitching/bone-identifier-1rey5 |
45
- | MTDDH | evaluation | 905 (632/138/135) | ilium, pubis, ischium, femoral head, femur | https://doi.org/10.57760/sciencedb.24372 |
46
- | BTXRD | evaluation (finetuning) | 1867 (1305/281/281) | tumor | https://doi.org/10.6084/m9.figshare.27865398 |
47
 
48
  Each `<Dataset>/` folder contains `dataset.yml`, `images/` (16-bit PNG), `labels/`
49
  (PNG index maps or NPY channel masks), a `README.md` with preprocessing and label details,
@@ -82,13 +106,55 @@ paper's partitions can be rebuilt exactly; see `splits/README.md` for the schema
82
 
83
  ## Usage
84
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
85
  ```bash
86
- pip install flexray
87
- fxr-dataset pack HipRay/dataset.yml /data/flexray/HipRay # repeat per dataset
88
  export XRAY_DATAPATH=/data/flexray
89
- export GENERATED_DATAPATH=/path/to/this/download # contains FluXray/
90
  ```
91
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
92
  ```yaml
93
  # training config excerpt
94
  data:
@@ -97,6 +163,11 @@ data:
97
  FluXray: {version: "1.0"}
98
  ```
99
 
 
 
 
 
 
100
  ## Citation
101
 
102
  If you use either **FluXray** or our **MURA annotations**, please cite the
 
3
  - cc-by-4.0
4
  - cc-by-nc-4.0
5
  pretty_name: FleXray Data
6
+ viewer: false
7
+ task_categories: [image-segmentation]
8
+ size_categories: [100K<n<1M]
9
  tags: [medical, x-ray, segmentation, anatomy]
10
  ---
11
 
 
17
 
18
  Training and evaluation data for **FleXray**, a pan-anatomy X-ray segmentation model.
19
  This repository holds every real X-ray source whose license permits redistribution,
20
+ repackaged as image/mask pairs with `fxr-dataset` manifests and dataset-native
21
+ label names that FleXray maps into its common protocol (CC BY 4.0), plus two more parts of the data described in the paper:
22
 
23
  - **FluXray** (synthetic, CC BY-NC 4.0): `FluXray/` — 138,063 generatively edited
24
  digitally reconstructed radiographs rendered from the 1,597 MOOSE CTs at 90 poses
25
+ each, quality-filtered, with exact overlapping masks in 63 channels (62 structures plus background).
26
  Shipped as the training database itself (`FluXray/thunder_dbs/1.0/data.mdb`, an LMDB
27
  of float16 256 x 256 images and 63-channel binary masks that `flexray` reads directly)
28
  together with `samples.csv` (pose, split, MOOSE subject and per-sample license for
 
36
  and the MURA annotations are CC BY 4.0; `FluXray/` is CC BY-NC 4.0 as a collection,
37
  with each image inheriting the license of its MOOSE source site.
38
 
39
+ ## Data access
40
+
41
+ This release contains **4,232 real image/mask pairs** across seven datasets,
42
+ **138,063 FluXray samples**, and **100 MURA annotation masks** whose source
43
+ images must be obtained separately. Browse the dataset folders below or use
44
+ the [download and packaging instructions](#usage).
45
+
46
+ The automatic Hugging Face image-folder viewer is disabled because it only
47
+ recognizes a subset of the images and does not represent the paired masks or
48
+ the FluXray database. Use each `dataset.yml` for image/mask paths and split
49
+ assignments; FluXray's `samples.csv` records its samples and splits.
50
+
51
+ - [Real image/mask datasets](#redistributed-datasets-cc-by-40): PNG images,
52
+ PNG or NPY masks, and a packaging manifest per dataset.
53
+ - [FluXray](FluXray/README.md): a ThunderDB database plus protocol and sample
54
+ metadata. The database download is about **18.8 GB**.
55
+ - [MURA annotations](mura_forearm_humerus_annotations/README.md): masks and a
56
+ script that joins them to your own MURA download.
57
+ - [Splits and exclusions](splits/README.md): source-relative records for
58
+ reconstructing the published partitions.
59
+
60
  ## Redistributed datasets (CC BY 4.0)
61
 
62
  | Dataset | Role in paper | Samples (train/val/test) | Labels | Source |
63
  |---|---|---|---|---|
64
+ | [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 |
65
+ | [FootBones](FootBones/README.md) | training | 571 (400/86/85) | metatarsals (1-5), toes | https://universe.roboflow.com/monchbot1/foot_op |
66
+ | [ElbowLat](ElbowLat/README.md) | evaluation | 601 (419/91/91) | humeri, radii, ulnae | https://universe.roboflow.com/ionspace/elbow_lat-lnn0s-pmycd |
67
+ | [HipRay](HipRay/README.md) | evaluation | 139 (97/21/21) | femurs, hips | https://data.mendeley.com/datasets/zm6bxzhmfz/1 |
68
+ | [LowerLimbs](LowerLimbs/README.md) | evaluation | 56 (39/9/8) | femurs, tibiae, fibulae | https://universe.roboflow.com/orthopedicstitching/bone-identifier-1rey5 |
69
+ | [MTDDH](MTDDH/README.md) | evaluation | 905 (632/138/135) | ilium, pubis, ischium, femoral head, femur | https://doi.org/10.57760/sciencedb.24372 |
70
+ | [BTXRD](BTXRD/README.md) | evaluation (finetuning) | 1867 (1305/281/281) | tumor | https://doi.org/10.6084/m9.figshare.27865398 |
71
 
72
  Each `<Dataset>/` folder contains `dataset.yml`, `images/` (16-bit PNG), `labels/`
73
  (PNG index maps or NPY channel masks), a `README.md` with preprocessing and label details,
 
106
 
107
  ## Usage
108
 
109
+ Dataset packaging and training require the training extra:
110
+
111
+ ```bash
112
+ python -m pip install "flexray[train]"
113
+ ```
114
+
115
+ Download only the dataset you need. For example, fetch HipRay and its split
116
+ records without downloading the FluXray database:
117
+
118
+ ```python
119
+ from huggingface_hub import snapshot_download
120
+
121
+ snapshot_download(
122
+ repo_id="VictorButoi/flexray-data",
123
+ repo_type="dataset",
124
+ local_dir="./flexray-data",
125
+ allow_patterns=["README.md", "HipRay/*", "splits/HipRay/*"],
126
+ )
127
+ ```
128
+
129
+ Validate and pack it into the layout consumed by FleXray:
130
+
131
  ```bash
132
+ fxr-dataset validate ./flexray-data/HipRay/dataset.yml
133
+ fxr-dataset pack ./flexray-data/HipRay/dataset.yml /data/flexray/HipRay
134
  export XRAY_DATAPATH=/data/flexray
 
135
  ```
136
 
137
+ Repeat with another folder name to package another real X-ray dataset.
138
+ To include FluXray, download its approximately 18.8 GB database and sidecars
139
+ into the same download directory:
140
+
141
+ ```python
142
+ snapshot_download(
143
+ repo_id="VictorButoi/flexray-data",
144
+ repo_type="dataset",
145
+ local_dir="./flexray-data",
146
+ allow_patterns=["FluXray/*"],
147
+ )
148
+ ```
149
+
150
+ ```bash
151
+ export GENERATED_DATAPATH="$PWD/flexray-data"
152
+ ```
153
+
154
+ FluXray is already packaged at `FluXray/thunder_dbs/1.0/`. Its historical
155
+ `GENERATED_DATAPATH` variable selects the storage root; it is configured as
156
+ an `Xray` source:
157
+
158
  ```yaml
159
  # training config excerpt
160
  data:
 
163
  FluXray: {version: "1.0"}
164
  ```
165
 
166
+ See [dataset documentation](https://github.com/VictorButoi/FleXray/blob/main/docs/datasets.md)
167
+ and [training configuration](https://github.com/VictorButoi/FleXray/blob/main/docs/training.md)
168
+ for complete examples. Source datasets retain their roles in the paper;
169
+ adding one to a training config does not change its published evaluation split.
170
+
171
  ## Citation
172
 
173
  If you use either **FluXray** or our **MURA annotations**, please cite the
mura_forearm_humerus_annotations/README.md CHANGED
@@ -22,7 +22,7 @@ redistribution. Download MURA yourself and join the masks with the manifest belo
22
  ## Build a FleXray training package
23
 
24
  ```bash
25
- pip install flexray
26
  python mura_to_fxr_manifest.py --mura-root /path/containing/MURA-v1.1 \
27
  --annotations . --dataset MURA_FOREARM --output-dir /data/mura_forearm_pkg
28
  fxr-dataset pack /data/mura_forearm_pkg/dataset.yml /data/flexray/MURA_FOREARM
 
22
  ## Build a FleXray training package
23
 
24
  ```bash
25
+ python -m pip install "flexray[train]"
26
  python mura_to_fxr_manifest.py --mura-root /path/containing/MURA-v1.1 \
27
  --annotations . --dataset MURA_FOREARM --output-dir /data/mura_forearm_pkg
28
  fxr-dataset pack /data/mura_forearm_pkg/dataset.yml /data/flexray/MURA_FOREARM