Datasets:
Update dataset card
Browse files
README.md
CHANGED
|
@@ -13,7 +13,7 @@ tags:
|
|
| 13 |
- segmentation
|
| 14 |
- ct-scan
|
| 15 |
- projection
|
| 16 |
-
pretty_name: RadGenome-
|
| 17 |
size_categories:
|
| 18 |
- 10K<n<100K
|
| 19 |
configs:
|
|
@@ -33,24 +33,21 @@ dataset_info:
|
|
| 33 |
dtype: image
|
| 34 |
- name: image_ll
|
| 35 |
dtype: image
|
| 36 |
-
- name: mask_labels_pa
|
| 37 |
-
sequence: string
|
| 38 |
-
- name: masks_pa
|
| 39 |
-
sequence: image
|
| 40 |
-
- name: mask_labels_ll
|
| 41 |
-
sequence: string
|
| 42 |
-
- name: masks_ll
|
| 43 |
-
sequence: image
|
| 44 |
---
|
| 45 |
|
| 46 |
-
# RadGenome-
|
| 47 |
|
| 48 |
-
|
| 49 |
-
|
| 50 |
(originally based on [CT-RATE](https://huggingface.co/datasets/ibrahimhamamci/CT-RATE)).
|
|
|
|
|
|
|
| 51 |
|
| 52 |
-
|
| 53 |
-
|
|
|
|
|
|
|
|
|
|
| 54 |
|
| 55 |
---
|
| 56 |
|
|
@@ -58,18 +55,23 @@ projection images, plus binary anatomy masks for all 210 anatomical structures.
|
|
| 58 |
|
| 59 |
| Property | Value |
|
| 60 |
|---|---|
|
| 61 |
-
| **
|
| 62 |
-
| **Views per
|
| 63 |
-
| **
|
|
|
|
|
|
|
|
|
|
|
|
|
| 64 |
| **License** | CC-BY-4.0 |
|
| 65 |
| **Source** | RadGenome-ChestCT / CT-RATE |
|
| 66 |
|
| 67 |
### Splits
|
| 68 |
|
| 69 |
-
| Split |
|
| 70 |
-
|---|---|
|
| 71 |
-
| train | 24,128 |
|
| 72 |
-
| validation | 1,564 |
|
|
|
|
| 73 |
|
| 74 |
---
|
| 75 |
|
|
@@ -79,26 +81,33 @@ projection images, plus binary anatomy masks for all 210 anatomical structures.
|
|
| 79 |
|
| 80 |
| Column | Type | Description |
|
| 81 |
|---|---|---|
|
| 82 |
-
| `volume_id` | `str` | Unique
|
| 83 |
| `split` | `str` | Dataset split: `train` or `validation`. |
|
| 84 |
-
| `image_pa` | `Image` | PA (posteroanterior, front) chest projection image (JPEG). |
|
| 85 |
-
| `image_ll` | `Image` | LL (lateral, side) chest projection image (JPEG). |
|
| 86 |
-
| `mask_labels_pa` | `List[str]` | Anatomy structure names for the PA masks, e.g. `["lung", "heart", ...]`. Parallel to `masks_pa`. |
|
| 87 |
-
| `masks_pa` | `List[Image]` | Binary anatomy segmentation masks (one per structure) for the PA view. White pixels = structure present. |
|
| 88 |
-
| `mask_labels_ll` | `List[str]` | Anatomy structure names for the LL masks. Parallel to `masks_ll`. |
|
| 89 |
-
| `masks_ll` | `List[Image]` | Binary anatomy segmentation masks for the LL view. |
|
| 90 |
|
| 91 |
### Anatomy Label Universe
|
| 92 |
|
| 93 |
-
The dataset
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
- **Vessels**: aorta, inferior/superior vena cava, carotid arteries, subclavian arteries, brachiocephalic vessels, iliac vessels, renal vessels
|
| 97 |
-
- **Skeleton**: ribs (1–12, left/right), thoracic vertebrae (T1–T12), cervical/lumbar vertebrae, sternum, clavicles, scapulae, humerus, femur
|
| 98 |
-
- **Abdominal organs**: liver (with segments), spleen, pancreas, kidneys, gallbladder, stomach, intestine, esophagus
|
| 99 |
-
- **Endocrine/other**: thyroid, adrenal glands, thymus, trachea, larynx, spinal cord
|
| 100 |
|
| 101 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 102 |
Use it to map labels to fixed class indices for consistent multi-label training.
|
| 103 |
|
| 104 |
---
|
|
@@ -112,10 +121,6 @@ from datasets import load_dataset
|
|
| 112 |
|
| 113 |
ds = load_dataset("EvidenceAIResearch/radgenome-anatomy")
|
| 114 |
print(ds)
|
| 115 |
-
# DatasetDict({
|
| 116 |
-
# train: Dataset({features: ['volume_id', 'split', 'image_pa', 'image_ll', ...], num_rows: 24,128})
|
| 117 |
-
# validation: Dataset({features: ['volume_id', 'split', 'image_pa', 'image_ll', ...], num_rows: 1,564})
|
| 118 |
-
# })
|
| 119 |
```
|
| 120 |
|
| 121 |
### Access images
|
|
@@ -125,57 +130,10 @@ from PIL import Image
|
|
| 125 |
import io
|
| 126 |
|
| 127 |
row = ds["train"][0]
|
| 128 |
-
print(row["volume_id"]) # e.g. "train_1_a_1"
|
| 129 |
-
|
| 130 |
-
# Decode PA image
|
| 131 |
pa_img = Image.open(io.BytesIO(row["image_pa"]["bytes"]))
|
| 132 |
ll_img = Image.open(io.BytesIO(row["image_ll"]["bytes"]))
|
| 133 |
-
|
| 134 |
-
pa_img.show()
|
| 135 |
```
|
| 136 |
|
| 137 |
-
### Working with masks
|
| 138 |
-
|
| 139 |
-
Each sample contains a list of binary masks with corresponding label names:
|
| 140 |
-
|
| 141 |
-
```python
|
| 142 |
-
from PIL import Image
|
| 143 |
-
import io, numpy as np
|
| 144 |
-
|
| 145 |
-
row = ds["train"][0]
|
| 146 |
-
|
| 147 |
-
# Map label → mask for the LL view
|
| 148 |
-
mask_map = {
|
| 149 |
-
label: Image.open(io.BytesIO(img["bytes"]))
|
| 150 |
-
for label, img in zip(row["mask_labels_ll"], row["masks_ll"])
|
| 151 |
-
}
|
| 152 |
-
|
| 153 |
-
# Example: get the lung mask as a numpy array
|
| 154 |
-
lung_mask = np.array(mask_map["lung"]) # shape: (H, W), values 0 or 255
|
| 155 |
-
|
| 156 |
-
# Build a multi-label tensor [num_classes, H, W] using the label universe
|
| 157 |
-
import json, urllib.request
|
| 158 |
-
# label_universe.json is in the repo root
|
| 159 |
-
universe = json.loads(open("label_universe.json").read())
|
| 160 |
-
label_to_idx = {l: i for i, l in enumerate(universe)}
|
| 161 |
-
|
| 162 |
-
H, W = lung_mask.shape
|
| 163 |
-
multi_label = np.zeros((len(universe), H, W), dtype=np.uint8)
|
| 164 |
-
for label, img in zip(row["mask_labels_ll"], row["masks_ll"]):
|
| 165 |
-
if label in label_to_idx:
|
| 166 |
-
arr = np.array(Image.open(io.BytesIO(img["bytes"])))
|
| 167 |
-
multi_label[label_to_idx[label]] = (arr > 128).astype(np.uint8)
|
| 168 |
-
```
|
| 169 |
-
|
| 170 |
-
### Streaming (large dataset)
|
| 171 |
-
|
| 172 |
-
```python
|
| 173 |
-
ds = load_dataset("EvidenceAIResearch/radgenome-anatomy", streaming=True)
|
| 174 |
-
for row in ds["train"]:
|
| 175 |
-
pa_img = Image.open(io.BytesIO(row["image_pa"]["bytes"]))
|
| 176 |
-
# process ...
|
| 177 |
-
break
|
| 178 |
-
```
|
| 179 |
|
| 180 |
---
|
| 181 |
|
|
|
|
| 13 |
- segmentation
|
| 14 |
- ct-scan
|
| 15 |
- projection
|
| 16 |
+
pretty_name: RadGenome-Anatomy
|
| 17 |
size_categories:
|
| 18 |
- 10K<n<100K
|
| 19 |
configs:
|
|
|
|
| 33 |
dtype: image
|
| 34 |
- name: image_ll
|
| 35 |
dtype: image
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
---
|
| 37 |
|
| 38 |
+
# RadGenome-Anatomy
|
| 39 |
|
| 40 |
+
**RadGenome-Anatomy** is a large-scale chest radiograph anatomy segmentation dataset
|
| 41 |
+
constructed from the [RadGenome-ChestCT](https://huggingface.co/datasets/RadGenome/RadGenome-ChestCT) corpus
|
| 42 |
(originally based on [CT-RATE](https://huggingface.co/datasets/ibrahimhamamci/CT-RATE)).
|
| 43 |
+
It contains **25,692 volumetric studies** (24,128 train / 1,564 validation), yielding paired
|
| 44 |
+
postero-anterior (PA) and lateral (LL) projection images at **384 × 384** resolution.
|
| 45 |
|
| 46 |
+
Across the two radiographic views, the dataset provides **10,790,646 fine-grained anatomy masks**
|
| 47 |
+
over **210 canonical anatomy classes** and **513,860 region masks** over **10 anatomical groups**,
|
| 48 |
+
for a total of **11,304,506 binary mask instances**.
|
| 49 |
+
|
| 50 |
+
Each row represents one CT study and contains its PA and LL projection images.
|
| 51 |
|
| 52 |
---
|
| 53 |
|
|
|
|
| 55 |
|
| 56 |
| Property | Value |
|
| 57 |
|---|---|
|
| 58 |
+
| **Studies** | 25,692 total (24,128 train / 1,564 val) |
|
| 59 |
+
| **Views per study** | 2 (PA + LL) |
|
| 60 |
+
| **Image resolution** | 384 × 384 |
|
| 61 |
+
| **Anatomy classes** | 210 structures (4-level hierarchy) |
|
| 62 |
+
| **Region classes** | 10 body-system groups |
|
| 63 |
+
| **Anatomy masks** | 10,790,646 (5,395,323 PA + 5,395,323 LL) |
|
| 64 |
+
| **Region masks** | 513,860 (256,930 PA + 256,930 LL) |
|
| 65 |
| **License** | CC-BY-4.0 |
|
| 66 |
| **Source** | RadGenome-ChestCT / CT-RATE |
|
| 67 |
|
| 68 |
### Splits
|
| 69 |
|
| 70 |
+
| Split | Studies | PA projections | LL projections | Anatomy masks | Region masks |
|
| 71 |
+
|---|---|---|---|---|---|
|
| 72 |
+
| train | 24,128 | 24,129 | 24,129 | 10,133,770 | 482,580 |
|
| 73 |
+
| validation | 1,564 | 1,564 | 1,564 | 656,876 | 31,280 |
|
| 74 |
+
| **total** | **25,692** | **25,693** | **25,693** | **10,790,646** | **513,860** |
|
| 75 |
|
| 76 |
---
|
| 77 |
|
|
|
|
| 81 |
|
| 82 |
| Column | Type | Description |
|
| 83 |
|---|---|---|
|
| 84 |
+
| `volume_id` | `str` | Unique study identifier, e.g. `train_1_a_1`. |
|
| 85 |
| `split` | `str` | Dataset split: `train` or `validation`. |
|
| 86 |
+
| `image_pa` | `Image` | PA (posteroanterior, front) chest projection image (JPEG, 384×384). |
|
| 87 |
+
| `image_ll` | `Image` | LL (lateral, side) chest projection image (JPEG, 384×384). |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 88 |
|
| 89 |
### Anatomy Label Universe
|
| 90 |
|
| 91 |
+
The dataset defines **210 canonical anatomy classes** organized as a four-level hierarchy:
|
| 92 |
+
*body system → organ → substructure → canonical label*. At the top level, classes are grouped
|
| 93 |
+
into **10 body systems**, with a highly non-uniform per-system class count:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 94 |
|
| 95 |
+
| Body system | # classes | Example structures |
|
| 96 |
+
|---|---|---|
|
| 97 |
+
| Skeletal | 93 | ribs (1–12 L/R), thoracic vertebrae (T1–T12), cervical/lumbar vertebrae, sternum, clavicles, scapulae, humerus, femur |
|
| 98 |
+
| Abdominal | 42 | liver (with segments), spleen, pancreas, kidneys, gallbladder, stomach, intestine |
|
| 99 |
+
| Mediastinal | 25 | aorta, IVC/SVC, carotid/subclavian arteries, brachiocephalic vessels, iliac/renal vessels |
|
| 100 |
+
| Cardiac | — | atria, ventricles, myocardium, ascending aorta, pulmonary artery/vein |
|
| 101 |
+
| Pulmonary | — | left/right lung, upper/middle/lower lobes, lung nodule, tumor, effusion |
|
| 102 |
+
| Airway | — | trachea, main bronchi, larynx |
|
| 103 |
+
| Endocrine | — | thyroid, adrenal glands, thymus |
|
| 104 |
+
| Esophageal | 2 | esophagus structures |
|
| 105 |
+
| Breast | 3 | breast structures |
|
| 106 |
+
| Neural / soft tissue | 5 | spinal cord, skin, muscle |
|
| 107 |
+
|
| 108 |
+
These same 10 body systems also serve as the **region-mask** label set (10 classes/view).
|
| 109 |
+
|
| 110 |
+
The full ordered list of canonical labels is in [`label_universe.json`](./label_universe.json) at the repo root.
|
| 111 |
Use it to map labels to fixed class indices for consistent multi-label training.
|
| 112 |
|
| 113 |
---
|
|
|
|
| 121 |
|
| 122 |
ds = load_dataset("EvidenceAIResearch/radgenome-anatomy")
|
| 123 |
print(ds)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 124 |
```
|
| 125 |
|
| 126 |
### Access images
|
|
|
|
| 130 |
import io
|
| 131 |
|
| 132 |
row = ds["train"][0]
|
|
|
|
|
|
|
|
|
|
| 133 |
pa_img = Image.open(io.BytesIO(row["image_pa"]["bytes"]))
|
| 134 |
ll_img = Image.open(io.BytesIO(row["image_ll"]["bytes"]))
|
|
|
|
|
|
|
| 135 |
```
|
| 136 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 137 |
|
| 138 |
---
|
| 139 |
|