eltzanis commited on
Commit
f487fa5
·
0 Parent(s):

DosePET v1.0 — initial public release

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +60 -0
  2. README.md +484 -0
  3. data/FDG/FDG_dose_000.tar +3 -0
  4. data/FDG/FDG_dose_001.tar +3 -0
  5. data/FDG/FDG_dose_002.tar +3 -0
  6. data/FDG/FDG_dose_003.tar +3 -0
  7. data/FDG/FDG_dose_004.tar +3 -0
  8. data/FDG/FDG_dose_005.tar +3 -0
  9. data/FDG/FDG_dose_006.tar +3 -0
  10. data/FDG/FDG_dose_007.tar +3 -0
  11. data/FDG/FDG_dose_008.tar +3 -0
  12. data/FDG/FDG_dose_009.tar +3 -0
  13. data/FDG/FDG_dose_010.tar +3 -0
  14. data/FDG/FDG_dose_011.tar +3 -0
  15. data/FDG/FDG_dose_012.tar +3 -0
  16. data/FDG/FDG_dose_013.tar +3 -0
  17. data/FDG/FDG_dose_014.tar +3 -0
  18. data/FDG/FDG_dose_015.tar +3 -0
  19. data/FDG/FDG_dose_016.tar +3 -0
  20. data/FDG/FDG_dose_017.tar +3 -0
  21. data/FDG/FDG_dose_018.tar +3 -0
  22. data/FDG/FDG_dose_019.tar +3 -0
  23. data/FDG/FDG_dose_020.tar +3 -0
  24. data/FDG/FDG_dose_021.tar +3 -0
  25. data/FDG/FDG_dose_022.tar +3 -0
  26. data/FDG/FDG_dose_023.tar +3 -0
  27. data/FDG/FDG_dose_024.tar +3 -0
  28. data/FDG/FDG_dose_025.tar +3 -0
  29. data/FDG/FDG_dose_026.tar +3 -0
  30. data/FDG/FDG_dose_027.tar +3 -0
  31. data/FDG/FDG_dose_028.tar +3 -0
  32. data/FDG/FDG_dose_029.tar +3 -0
  33. data/FDG/FDG_dose_030.tar +3 -0
  34. data/FDG/FDG_dose_031.tar +3 -0
  35. data/FDG/FDG_dose_032.tar +3 -0
  36. data/FDG/FDG_seg_000.tar.gz +3 -0
  37. data/FDG/FDG_seg_001.tar.gz +3 -0
  38. data/FDG/FDG_seg_002.tar.gz +3 -0
  39. data/FDG/FDG_seg_003.tar.gz +3 -0
  40. data/FDG/FDG_seg_004.tar.gz +3 -0
  41. data/FDG/FDG_seg_005.tar.gz +3 -0
  42. data/FDG/FDG_seg_006.tar.gz +3 -0
  43. data/FDG/FDG_seg_007.tar.gz +3 -0
  44. data/FDG/FDG_seg_008.tar.gz +3 -0
  45. data/FDG/FDG_seg_009.tar.gz +3 -0
  46. data/FDG/FDG_seg_010.tar.gz +3 -0
  47. data/FDG/FDG_seg_011.tar.gz +3 -0
  48. data/FDG/FDG_seg_012.tar.gz +3 -0
  49. data/FDG/FDG_seg_013.tar.gz +3 -0
  50. data/FDG/FDG_seg_014.tar.gz +3 -0
.gitattributes ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.avro filter=lfs diff=lfs merge=lfs -text
4
+ *.bin filter=lfs diff=lfs merge=lfs -text
5
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
6
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
7
+ *.ftz filter=lfs diff=lfs merge=lfs -text
8
+ *.gz filter=lfs diff=lfs merge=lfs -text
9
+ *.h5 filter=lfs diff=lfs merge=lfs -text
10
+ *.joblib filter=lfs diff=lfs merge=lfs -text
11
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
12
+ *.lz4 filter=lfs diff=lfs merge=lfs -text
13
+ *.mds filter=lfs diff=lfs merge=lfs -text
14
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
15
+ *.model filter=lfs diff=lfs merge=lfs -text
16
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
17
+ *.npy filter=lfs diff=lfs merge=lfs -text
18
+ *.npz filter=lfs diff=lfs merge=lfs -text
19
+ *.onnx filter=lfs diff=lfs merge=lfs -text
20
+ *.ot filter=lfs diff=lfs merge=lfs -text
21
+ *.parquet filter=lfs diff=lfs merge=lfs -text
22
+ *.pb filter=lfs diff=lfs merge=lfs -text
23
+ *.pickle filter=lfs diff=lfs merge=lfs -text
24
+ *.pkl filter=lfs diff=lfs merge=lfs -text
25
+ *.pt filter=lfs diff=lfs merge=lfs -text
26
+ *.pth filter=lfs diff=lfs merge=lfs -text
27
+ *.rar filter=lfs diff=lfs merge=lfs -text
28
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
29
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
30
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
31
+ *.tar filter=lfs diff=lfs merge=lfs -text
32
+ *.tflite filter=lfs diff=lfs merge=lfs -text
33
+ *.tgz filter=lfs diff=lfs merge=lfs -text
34
+ *.wasm filter=lfs diff=lfs merge=lfs -text
35
+ *.xz filter=lfs diff=lfs merge=lfs -text
36
+ *.zip filter=lfs diff=lfs merge=lfs -text
37
+ *.zst filter=lfs diff=lfs merge=lfs -text
38
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
39
+ # Audio files - uncompressed
40
+ *.pcm filter=lfs diff=lfs merge=lfs -text
41
+ *.sam filter=lfs diff=lfs merge=lfs -text
42
+ *.raw filter=lfs diff=lfs merge=lfs -text
43
+ # Audio files - compressed
44
+ *.aac filter=lfs diff=lfs merge=lfs -text
45
+ *.flac filter=lfs diff=lfs merge=lfs -text
46
+ *.mp3 filter=lfs diff=lfs merge=lfs -text
47
+ *.ogg filter=lfs diff=lfs merge=lfs -text
48
+ *.wav filter=lfs diff=lfs merge=lfs -text
49
+ # Image files - uncompressed
50
+ *.bmp filter=lfs diff=lfs merge=lfs -text
51
+ *.gif filter=lfs diff=lfs merge=lfs -text
52
+ *.png filter=lfs diff=lfs merge=lfs -text
53
+ *.tiff filter=lfs diff=lfs merge=lfs -text
54
+ # Image files - compressed
55
+ *.jpg filter=lfs diff=lfs merge=lfs -text
56
+ *.jpeg filter=lfs diff=lfs merge=lfs -text
57
+ *.webp filter=lfs diff=lfs merge=lfs -text
58
+ # Video files - compressed
59
+ *.mp4 filter=lfs diff=lfs merge=lfs -text
60
+ *.webm filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,484 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-nc-4.0
3
+ pretty_name: DosePET - An Open-Source Dataset with 2100 Radiation Dose Maps for PET/CT
4
+ tags:
5
+ - medical-imaging
6
+ - dosimetry
7
+ - pet-ct
8
+ - monte-carlo
9
+ - nuclear-medicine
10
+ - radiation-dose
11
+ size_categories:
12
+ - 1K<n<10K
13
+ configs:
14
+ - config_name: organ_doses
15
+ data_files: metadata/dose_reports.parquet
16
+ ---
17
+
18
+ # DosePET: An Open-Source Dataset with 2100 Radiation Dose Maps for PET/CT
19
+
20
+ Voxel-level absorbed dose maps for **2100 whole-body and total-body PET/CT
21
+ studies**, computed
22
+ with GATE Monte Carlo simulation, together with **117 TotalSegmentator organ
23
+ masks** and per-organ dose statistics for every study.
24
+
25
+ | | |
26
+ |---|---|
27
+ | studies | 2100 (1503 [18F]FDG, 597 PSMA) |
28
+ | isotopes | F-18 (1872), Ga-68 (228) |
29
+ | organs per study | 117 |
30
+ | organ dose rows | 245,700 |
31
+ | unpacked size | 509 GB |
32
+ | download size | 383 GB (all), **32 MB** for the organ dose tables alone |
33
+
34
+ > The per-organ dose statistics
35
+ > for all 2100 studies are a 32 MB download, and are also browsable in the
36
+ > Dataset Viewer above. See [Quick start](#quick-start).
37
+
38
+ ---
39
+
40
+ ## Quick start
41
+
42
+ ```bash
43
+ pip install huggingface_hub # recommended, not required
44
+ wget https://huggingface.co/datasets/eltzanis/DosePET/resolve/main/download_dataset.py
45
+
46
+ python3 download_dataset.py list # what's available
47
+
48
+ python3 download_dataset.py get --content tables --out ./petct # 32 MB
49
+ python3 download_dataset.py get --sample 5 --out ./petct # 5 full studies
50
+ python3 download_dataset.py get --subset PSMA --out ./petct # one tracer
51
+ python3 download_dataset.py get --all --out ./petct # everything
52
+
53
+ python3 download_dataset.py get --all --dry-run # size check, no download
54
+ ```
55
+
56
+ Every selection extracts into the same layout, so you can start small and add
57
+ more later without reorganising anything.
58
+
59
+ ---
60
+
61
+ ## Downloading exactly what you need
62
+
63
+
64
+ ### 1. Only the organ dose tables — 32 MB
65
+
66
+ Every `dose_report.csv`, `metadata.json`, `dosimetry_config.json` and
67
+ `segmentation/statistics.json`, for all 2100 studies. No dose images, no masks.
68
+
69
+ ```bash
70
+ python3 download_dataset.py get --content tables --out ./petct
71
+ ```
72
+
73
+ The same data is
74
+ in `metadata/dose_reports.parquet` (24 MB, 245,700 rows) if you would rather
75
+ have one table than 2100 files:
76
+
77
+ ```python
78
+ import pandas as pd
79
+ df = pd.read_parquet("hf://datasets/eltzanis/DosePET/metadata/dose_reports.parquet")
80
+ df[df.organ == "liver"].groupby("isotope_key").mean_dose_rate_at_scan_mGy_per_h.describe()
81
+ ```
82
+
83
+ ### 2. Named studies — only their bytes are fetched
84
+
85
+ ```bash
86
+ # find the ids
87
+ python3 download_dataset.py list --cases
88
+
89
+ # fetch three of them, from three different shards
90
+ python3 download_dataset.py get \
91
+ --cases FDG/0001,FDG/0500,PSMA/PSMA_0179419e313f7d8c/05-03-2002-NA-PETCT_whole-body_PSMA-40379 \
92
+ --out ./petct
93
+ ```
94
+
95
+ The dose shards are uncompressed tars and the manifest records each study's
96
+ byte offset, so the script issues HTTP Range requests and pulls only what you
97
+ asked for:
98
+
99
+ ```
100
+ range-fetching 1 case(s), 144.04 MB of 9.91 GB
101
+ range-fetching 1 case(s), 133.40 MB of 9.94 GB
102
+ range-fetching 1 case(s), 105.14 MB of 9.94 GB
103
+ done: 366 files
104
+ ```
105
+
106
+ For a long list use a file:
107
+
108
+ ```bash
109
+ printf 'FDG/0001\nFDG/0002\nFDG/0500\n' > my_cases.txt
110
+ python3 download_dataset.py get --case-list my_cases.txt --out ./petct
111
+ ```
112
+
113
+ Add `--no-range` to download whole shards instead (useful behind a proxy that
114
+ strips Range headers; the script falls back to this automatically anyway).
115
+
116
+ ### 3. A representative sample
117
+
118
+ ```bash
119
+ python3 download_dataset.py get --sample 10 --out ./petct
120
+ ```
121
+
122
+ Ten studies spread evenly across the dataset rather than ten consecutive ids.
123
+ Combine with `--subset` to sample one tracer:
124
+
125
+ ```bash
126
+ python3 download_dataset.py get --sample 10 --subset PSMA --out ./petct
127
+ ```
128
+
129
+ ### 4. Masks and tables but no dose images
130
+
131
+ ```bash
132
+ python3 download_dataset.py get --content tables,seg --out ./petct
133
+ ```
134
+
135
+ All 245,700 AI generted organ masks for all 2100 studies: **5.3 GB**
136
+
137
+ ### 5. One tracer
138
+
139
+ ```bash
140
+ python3 download_dataset.py get --subset FDG --out ./petct # 1503 studies
141
+ python3 download_dataset.py get --subset PSMA --out ./petct # 597 studies
142
+ ```
143
+
144
+ ### 6. By shard, for batching a big transfer
145
+
146
+ ```bash
147
+ python3 download_dataset.py get --subset FDG --shards 0-3 --out ./petct
148
+ python3 download_dataset.py get --subset FDG --shards 4-7 --out ./petct
149
+ ```
150
+
151
+ `FDG_dose_007.tar` and `FDG_seg_007.tar.gz` hold exactly the same studies, so a
152
+ shard index always gives you complete studies.
153
+
154
+ ### 7. Everything
155
+
156
+ ```bash
157
+ python3 download_dataset.py get --all --out ./petct
158
+ ```
159
+
160
+ ### Always check first
161
+
162
+ ```bash
163
+ python3 download_dataset.py get --all --dry-run
164
+ python3 download_dataset.py get --cases FDG/0001,FDG/0002 --dry-run
165
+ ```
166
+
167
+ `--dry-run` prints the exact download size and the shards involved, and
168
+ downloads nothing.
169
+
170
+ ### Measured download sizes
171
+
172
+ | what you ask for | download |
173
+ |---|---|
174
+ | `--content tables` | 32 MB |
175
+ | one named study | 333 MB |
176
+ | `--sample 5` | 1.46 GB |
177
+ | `--sample 10` | 2.80 GB |
178
+ | `--sample 50` | 13.5 GB |
179
+ | `--content tables,seg` (all masks, no dose) | 5.32 GB |
180
+ | `--subset PSMA` | 68.2 GB |
181
+ | `--subset FDG` | 314.7 GB |
182
+ | `--all` | 382.8 GB |
183
+
184
+ A named study costs more than its dose image alone (175 MB) because the masks
185
+ for its shard arrive as one 150 MB gzipped archive and the 32 MB tables shard
186
+ comes with it.
187
+
188
+ ---
189
+
190
+ ## Coming back for more later
191
+
192
+ **Point `--out` at the same directory and the dataset grows in place.** Nothing
193
+ is re-downloaded, nothing already on disk is touched.
194
+
195
+ ```bash
196
+ python3 download_dataset.py get --content tables --out ./petct # today: 32 MB
197
+ python3 download_dataset.py get --cases FDG/0001 --out ./petct # later: 333 MB
198
+ python3 download_dataset.py get --sample 50 --out ./petct # later: 13.5 GB
199
+ python3 download_dataset.py get --all --out ./petct # finally: 383 GB
200
+ ```
201
+
202
+
203
+ Two things worth knowing:
204
+
205
+ - Each archive is **deleted after it is extracted**, to save disk. If a
206
+ download is interrupted mid-shard it restarts that shard; pass
207
+ `--keep-archives` to keep them and make interruptions cheaper.
208
+ - The tables shard (32 MB) covers all 2100 studies, so it comes down again
209
+ with each new batch. Harmless, but it is why a "three more studies" batch
210
+ reports ~867 MB rather than ~836 MB.
211
+
212
+ ---
213
+
214
+ ## What you end up with
215
+
216
+ The extracted tree is **identical to the source dataset** — same directory
217
+ structure, same filenames, same bytes. Verified by extracting a complete shard
218
+ pair and diffing it against the original:
219
+
220
+ ```
221
+ directory tree : IDENTICAL - 2976 paths, same names, same nesting
222
+ file contents : ALL 2928 FILES BYTE-IDENTICAL
223
+ ```
224
+
225
+ Partial downloads give you a correct subtree: take only the
226
+ tables and you get `FDG/0001/dose_report.csv` in its proper place with
227
+ `dose_image.nii.gz` simply absent. Add masks or dose images later and they land
228
+ in the same tree.
229
+
230
+ The one thing not preserved is **file modification times** — they are set to
231
+ when you extracted, not when the data was produced. File contents are bit-for-bit
232
+ identical.
233
+
234
+ ### Integrity
235
+
236
+ Every archive's SHA-256 is checked against `shards.json` before extraction, and
237
+ the download aborts on a mismatch rather than extracting corrupt data. To
238
+ re-check archives you kept with `--keep-archives`:
239
+
240
+ ```bash
241
+ python3 download_dataset.py verify --cache ./petct_cache
242
+ ```
243
+
244
+ ---
245
+
246
+ ## What each study contains
247
+
248
+ ```
249
+ FDG/0001/
250
+ dose_image.nii.gz total absorbed dose, Gy, uint16 + scl_slope
251
+ dose_report.csv 117 rows, per-organ dose statistics
252
+ metadata.json isotope, half-life, injected activity, timings
253
+ dosimetry_config.json cumulated activity, primaries, integration mode
254
+ segmentation/
255
+ liver.nii.gz ... 117 binary organ masks (TotalSegmentator)
256
+ statistics.json mask volumes
257
+
258
+ PSMA/<patient>/<scan>/ same files, one extra directory level
259
+ ```
260
+
261
+ ### `dose_image.nii.gz`
262
+
263
+ Each voxel is the **total absorbed dose in Gy**, integrated from the start of
264
+ the scan to infinity assuming **physical decay only** — the activity
265
+ distribution is frozen in space, with no biological clearance and no
266
+ redistribution.
267
+
268
+ Stored as `uint16` with a `scl_slope` in the NIfTI header (quantisation step =
269
+ `max_dose / 65535`, about 1.5e-5 relative). **You must apply `scl_slope`.**
270
+ `nibabel` and `SimpleITK` do this automatically:
271
+
272
+ ```python
273
+ import nibabel as nib, numpy as np
274
+ dose_Gy = np.asanyarray(nib.load("FDG/0001/dose_image.nii.gz").dataobj) # Gy
275
+ ```
276
+
277
+ ### `dose_report.csv`
278
+
279
+ One row per organ, alphabetical:
280
+
281
+ | column | meaning |
282
+ |---|---|
283
+ | `organ` | TotalSegmentator label |
284
+ | `mean_dose_Gy`, `max_dose_Gy`, `min_dose_Gy`, `dose_std_Gy` | dose in the mask |
285
+ | `mean_dose_injection_Gy`, `max_dose_injection_Gy` | back-extrapolated to injection time |
286
+ | `volume_cm3`, `mass_g`, `num_voxels` | mask geometry |
287
+ | `dcf_Gy_per_Bqs` | dose conversion factor, Gy per decay in the FOV |
288
+ | `mean_dose_rate_at_scan_mGy_per_s`, `mean_dose_rate_at_scan_mGy_per_h` | dose rate at scan start |
289
+
290
+ All 245,700 rows are also published as `metadata/dose_reports.parquet` for the
291
+ Dataset Viewer, joined with each study's isotope, half-life, injected activity
292
+ and cumulated activity.
293
+
294
+ In the Parquet table the dose conversion factor is given as
295
+ **`dcf_fGy_per_Bqs`** — the same quantity as the CSVs' `dcf_Gy_per_Bqs`, in
296
+ femtogray (multiplied by 10^15^). Doses back-extrapolated to injection time are provided in
297
+ each study's `dose_report.csv`, and simulation parameters in its
298
+ `dosimetry_config.json`.
299
+
300
+ A zero in `dcf_fGy_per_Bqs` (8857 rows) means the organ mask is empty because
301
+ the structure lies outside the acquired field of view, not that the value is
302
+ missing.
303
+
304
+ ---
305
+
306
+ ## Deriving dose rate and Gy-per-decay
307
+
308
+ Because the only time dependence is a single exponential shared by every voxel,
309
+ both quantities are the dose image times **one scalar per study**:
310
+
311
+ ```
312
+ lambda = ln2 / T_half T_half from metadata.json
313
+ rate = D * 3.6e6 * lambda [mGy/h] at scan start
314
+ DCF = D / A_tilde [Gy per decay] A_tilde = cumulated_from_scan
315
+ ```
316
+
317
+ ```python
318
+ import json, math, numpy as np, nibabel as nib
319
+ case = "FDG/0001"
320
+ cfg = json.load(open(f"{case}/dosimetry_config.json"))
321
+ meta = json.load(open(f"{case}/metadata.json"))
322
+ T_half = cfg.get("half_life_seconds") or meta["isotope"]["half_life_seconds"]
323
+ A_tilde = cfg["cumulated_from_scan"]
324
+
325
+ D = np.asanyarray(nib.load(f"{case}/dose_image.nii.gz").dataobj) # Gy
326
+ rate_mGy_per_h = D * 3.6e6 * math.log(2) / T_half
327
+ dcf_Gy_per_dec = D / A_tilde
328
+ ```
329
+
330
+ For organ-level numbers you need none of this — the columns are already in
331
+ `dose_report.csv`.
332
+
333
+ ### `tools/convert_dose_images.py`
334
+
335
+ It does the conversions above for you, and can
336
+ independently re-verify the published tables.
337
+
338
+ ```bash
339
+ DATA=./petct # where you extracted the dataset
340
+
341
+ # voxel-wise dose-rate maps, mGy/h at scan start
342
+ python3 tools/convert_dose_images.py rate --root $DATA/FDG --out ./rate_maps
343
+
344
+ # voxel-wise Gy-per-decay maps
345
+ python3 tools/convert_dose_images.py dcf --root $DATA/PSMA --out ./dcf_maps
346
+
347
+ # per-organ table straight from the image + masks, in the same column
348
+ # order as dose_report.csv so the two can be diffed
349
+ python3 tools/convert_dose_images.py organs --case $DATA/FDG/0001 --out table.csv
350
+
351
+ # recompute every reproducible column and compare against the published CSV
352
+ python3 tools/convert_dose_images.py check --root $DATA/FDG
353
+ ```
354
+
355
+ Other time points are opt-in: `--at injection` (uses the stored injection
356
+ correction factor) or `--at +3600` for one hour after the scan. Units via
357
+ `--unit mGy_per_h | mGy_per_s | Gy_per_s`.
358
+
359
+ **The conversion is lossless.** By default the tool copies the `uint16` payload
360
+ byte for byte and multiplies only the NIfTI `scl_slope`, so the output carries
361
+ no extra quantisation and is the same size as the input. Use `--mode float32`
362
+ if your software ignores `scl_slope`.
363
+
364
+ `check` is the reproducibility anchor: it recomputes organ means from the dose
365
+ image and the masks, applies the scale factor, and diffs against the shipped
366
+ `dose_report.csv`, printing PASS/FAIL per study:
367
+
368
+ ```
369
+ [1/2] PASS 0001 117 organs, 1283 values, worst 0.499 x tolerance
370
+ ```
371
+
372
+ Full usage in `tools/README.md`. Requires `numpy`, `nibabel`, and `SimpleITK`
373
+ for the mask-based commands.
374
+
375
+ > Converting a whole subset duplicates it on disk (hundreds of GB). Unless you
376
+ > need the files on disk, apply the scalar on the fly with the six lines above.
377
+
378
+ ---
379
+
380
+ ## How the release is packaged
381
+
382
+ Three kinds of shard, all tar archives whose members keep their original
383
+ relative paths:
384
+
385
+ | shard | contents | compression | why |
386
+ |---|---|---|---|
387
+ | `data/tables.tar.gz` | every `.csv` / `.json`, all 2100 studies | gzip | 32 MB, so table-only users download almost nothing |
388
+ | `data/<subset>/<subset>_dose_NNN.tar` | `dose_image.nii.gz` | **none** | already gzipped NIfTI |
389
+ | `data/<subset>/<subset>_seg_NNN.tar.gz` | organ masks | gzip | masks compress about **23:1** (115 GB → 5 GB) |
390
+
391
+ `*_dose_NNN` and `*_seg_NNN` with the same `NNN` hold **exactly the same
392
+ studies**, so a complete slice of the dataset is two downloads.
393
+
394
+ Alongside the data:
395
+
396
+ | path | what |
397
+ |---|---|
398
+ | `download_dataset.py` | the download script |
399
+ | `shards.json` | manifest: sizes, SHA-256, case lists, per-case byte offsets |
400
+ | `metadata/dose_reports.parquet` | all 245,700 organ rows, for the Dataset Viewer |
401
+ | `tools/convert_dose_images.py` | dose-rate / Gy-per-decay conversion + verification |
402
+ | `tools/README.md` | usage guide for the conversion tool |
403
+ | `skills/dosepet-research/` | agent skill: instructions for AI agents working with the dataset |
404
+
405
+ `shards.json` lists every shard with its size, SHA-256 and case list, and maps
406
+ each case id to its shards. The download script verifies every archive against
407
+ that checksum before extracting.
408
+
409
+ ---
410
+
411
+ ## Using DosePET with AI agents
412
+
413
+ `skills/dosepet-research/` is an agent skill — a set of instructions that an
414
+ agentic AI system (for example Claude Code or OpenAI Codex) can load to work
415
+ with this dataset correctly. It covers selective downloading, retrieving and
416
+ matching the source PET/CT examinations from ENHANCE.PET and
417
+ PSMA-PET-CT-Lesions, verifying spatial correspondence before use, and the
418
+ physical meaning and units of the dose quantities.
419
+
420
+ ```bash
421
+ hf download eltzanis/DosePET --repo-type dataset --include "skills/*" --local-dir .
422
+ ```
423
+
424
+ Then make the `skills/dosepet-research` folder available to your agent (for
425
+ Claude Code, copy it into `~/.claude/skills/` or the project's
426
+ `.claude/skills/`).
427
+
428
+ ---
429
+
430
+ ## Assumptions and caveats
431
+
432
+ 1. **Physical decay only.** No biological clearance or redistribution.
433
+ 2. **Time zero is scan start.**
434
+ 3. **`dcf_Gy_per_Bqs` is normalised to decays in the imaged FOV**, with that
435
+ patient's own tracer distribution as the source. It is a FOV-normalised
436
+ S-value, *not* dose per decay in a specific source organ, and should not be
437
+ compared directly with MIRD/OLINDA organ-to-organ S-values.
438
+ 4. **Apply `scl_slope`** (if it is not applied automatically) when reading the dose images.
439
+ 5. **Four FDG studies** (`0718`, `1022`, `1195`, `1289`) have no injection
440
+ correction factor, because the acquisition time is missing upstream. Their
441
+ `dose_report.csv` therefore omits `mean_dose_injection_Gy` and
442
+ `max_dose_injection_Gy`. Scan-time dose, dose rate and DCF are unaffected.
443
+
444
+ ---
445
+
446
+
447
+
448
+ ## Citation
449
+
450
+ If you use DosePET in your research, please cite:
451
+
452
+ ```bibtex
453
+ @article{Tzanis2026DosePET,
454
+ title = {DosePET: An Open-Source Dataset with 2100 Radiation Dose Maps for PET/CT},
455
+ author = {Eleftherios Tzanis and Antonios Tzortzakakis and Michail E. Klontzas},
456
+ year = {2026},
457
+ note = {Manuscript under review}
458
+ }
459
+ ```
460
+
461
+
462
+ ## License
463
+
464
+ **CC BY-NC 4.0** — Creative Commons Attribution-NonCommercial 4.0
465
+ International. You may share and adapt this dataset for **non-commercial**
466
+ purposes with attribution. See https://creativecommons.org/licenses/by-nc/4.0/
467
+
468
+ The underlying PET/CT images come from their respective source collections;
469
+ please also honour their terms and cite them.
470
+
471
+ - **FDG subset** — ENHANCE.PET whole-/total-body [18F]FDG-PET/CT dataset:
472
+
473
+ Ferrara D, Pires M, Gutschmayer S, et al. Sharing a whole-/total-body
474
+ [18F]FDG-PET/CT dataset with CT-derived segmentations: an ENHANCE.PET
475
+ initiative. *Sci Data* 13, 869 (2026).
476
+ https://doi.org/10.1038/s41597-026-07218-y
477
+
478
+ - **PSMA subset** — LMU Munich whole-body PSMA-PET/CT dataset:
479
+
480
+ Jeblick K, Schachtner B, Mittermeier A, et al. A Whole-Body PSMA-PET/CT
481
+ dataset with manually annotated tumor lesions. *Sci Data* 13, 1023 (2026).
482
+ https://doi.org/10.1038/s41597-026-07821-z
483
+
484
+
data/FDG/FDG_dose_000.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:832d813deb9aad31f6b69451d53a15a7841f75872b9a7aca17793532fef2e293
3
+ size 10636636160
data/FDG/FDG_dose_001.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5f904c328f2cb386aa6fdd3883586a923cbe856799b03fc9070ea17134842a8f
3
+ size 10371153920
data/FDG/FDG_dose_002.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:eb6f3f03a89512586445c40b1aa8dccaf61653ce4a4d23917497830475fa63ca
3
+ size 10707230720
data/FDG/FDG_dose_003.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a4cc5e45e77790c280d174256591ad521f984cfbeec57f352aa0d3ca5b6709ee
3
+ size 10432808960
data/FDG/FDG_dose_004.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:18e6634f9a15007f5218c6f2b570bc96f391c36b7a36b15152d5e7aa8117b455
3
+ size 10436833280
data/FDG/FDG_dose_005.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2e63fdbd2b15624198645cb450a474308e83ee35e8b7c45a3200bf0c5cc92b9d
3
+ size 10591221760
data/FDG/FDG_dose_006.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:79265abff0cb355f56947b015a8c4e001f191d02a7df30eef532337d6985ea2d
3
+ size 10384568320
data/FDG/FDG_dose_007.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:96936fca2678bd454d513bb7e96fc8804b6cfad75ad36c60d079d324c954b887
3
+ size 10641192960
data/FDG/FDG_dose_008.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0d7f8af75b8741d54e8a492982630502f4abcda9026bc24d2331c267079f1ba7
3
+ size 10369546240
data/FDG/FDG_dose_009.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ca6474215c183d5c71d48fb97cbd387c8eb39ca51a50a39d3f18cb22581c0fb5
3
+ size 10617886720
data/FDG/FDG_dose_010.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7e247f6741700c3db273dda9e0f516b62daf58b9915a21ec670966b2926bf1a6
3
+ size 10677739520
data/FDG/FDG_dose_011.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ef539abadec26e7a1987c5acdeea281815465dbfadb2d48f3d74afa6158c1e2c
3
+ size 10630973440
data/FDG/FDG_dose_012.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:383883bd89d4bc3724afb8f6d53d4e406cb852974fc7f50565f5d12b2ed5f2aa
3
+ size 10480814080
data/FDG/FDG_dose_013.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b0770f8087de50b78217cf2c53f6afbfe05fff4cb292c5eacf096e9ad6b39450
3
+ size 10588016640
data/FDG/FDG_dose_014.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f4d78ae378981a3a7e14c79b46413ea0fb17da8e72463b282f4a5166f6ffc645
3
+ size 10256455680
data/FDG/FDG_dose_015.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b26326db0a3e306753c6314c81cee8480b66d0f584630f8993454f5379736c61
3
+ size 10661662720
data/FDG/FDG_dose_016.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:548b2e0e65368f7931f1fa4d862159965a7a8e03eb67e85bc1e17af235675c1a
3
+ size 10627358720
data/FDG/FDG_dose_017.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c121b4e12fe05a38f5862c4ab6e98d362e2218b77246a198ce17e93e70a7452e
3
+ size 10457856000
data/FDG/FDG_dose_018.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2783a9b63c2e399e480aab8f469a3414038b660a653883c48d384613153ab274
3
+ size 10532608000
data/FDG/FDG_dose_019.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8753e0d5e0c777dec4df2ff209898b0cf038ec1f748a234dceed4da4ae67794c
3
+ size 10651228160
data/FDG/FDG_dose_020.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bd5774637c0f0602fe076ea928a7742987c62b56f816941bc4c70665813b2de4
3
+ size 10703923200
data/FDG/FDG_dose_021.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:59f21be93d3e796e7699f6fdea3125af1dab022e058d96554b43767b7f7d3a8c
3
+ size 10693918720
data/FDG/FDG_dose_022.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1213ad3c0df47abdf54af94694bf49a44a64b465754ad0c6e0ff196d77e3801c
3
+ size 10478868480
data/FDG/FDG_dose_023.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4da5847cdb5e5198bf94f750c0a7f4e8512b24bbf4e87525733ccecf344d109a
3
+ size 10606254080
data/FDG/FDG_dose_024.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:044ae15a358475df955019ea42878584b97ec56ca0a9cf57768ae6e2e35675fb
3
+ size 10667816960
data/FDG/FDG_dose_025.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:69f96626756ebbf563756b4efd2acfbed3d8b851307fe380ba2eb6b31f4f9f91
3
+ size 10658191360
data/FDG/FDG_dose_026.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:89a599803137a35d5e37f937be4ab08d26e7fcf7f88214f31e79e8b3d23a5392
3
+ size 10679961600
data/FDG/FDG_dose_027.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dfa3cffb9726dcca2f1f53ce7ca2f842e4c1c175294cf7f45193f6fb25e1e7b5
3
+ size 2836285440
data/FDG/FDG_dose_028.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2fcab9a04a913e18d5a3a89ea6adcc5c1a3c374738bac5762f8fecc5f52218e2
3
+ size 10188820480
data/FDG/FDG_dose_029.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2f78c0113c69066ce9ebcb656d77db1efde0591f6131c94f76a211bbe78bf96c
3
+ size 10187960320
data/FDG/FDG_dose_030.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:977958966180071bfe974efa7ff491303c51bd397e7f828733362fa03a677cf5
3
+ size 10730567680
data/FDG/FDG_dose_031.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:64e420277c9e46cb507c92069852b28cb278583242d4e14c1d294cce5abefcc2
3
+ size 10574100480
data/FDG/FDG_dose_032.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:409d3e5dcad88a3a1e4410c8dba4d487119aed8c89236a7db272eae6a134d6f2
3
+ size 3554467840
data/FDG/FDG_seg_000.tar.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f76412d3577673927db195c182802a7b84eada73fd0b89de3c83488da238b2bb
3
+ size 165887993
data/FDG/FDG_seg_001.tar.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8cc6aa3c0a3f76a8c22460ae6fa7d44452caca5f3ff21cc5b0f690bb83774969
3
+ size 162961480
data/FDG/FDG_seg_002.tar.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c6efc3aa6173665607c521e7834940347358f6d547d44ba56dd73ee22f23bbd3
3
+ size 165075669
data/FDG/FDG_seg_003.tar.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:61c7f83af2d317433e1fa5c52049e2b89f11aa7fc70b2a15d82a71fa43d96cd5
3
+ size 146777708
data/FDG/FDG_seg_004.tar.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e20b91e3fe7c4f8d9357197f56f8acdb945cadacc792f646dc7bb653919f1ad8
3
+ size 162178798
data/FDG/FDG_seg_005.tar.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b2ee9b75e9e10b54346e3a10bd14dc8377d7f045d11376bf37b82d48eb10b29b
3
+ size 147648293
data/FDG/FDG_seg_006.tar.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b7a00cb006f53a87262af1fdbbbfc48bbea545c9feb9fe5b387fbd49e450f744
3
+ size 159494174
data/FDG/FDG_seg_007.tar.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bda5c3cb7989335fd382cf20dc93edcc5b1a6a005f65b233d90ecf3d7db42242
3
+ size 167790305
data/FDG/FDG_seg_008.tar.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3ef37b1289e4c63f97489a4a5dcdd598cff059ebe2ae9e2ebfb0d33befdebc97
3
+ size 161687079
data/FDG/FDG_seg_009.tar.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1267f035f3c4eba6368729f61e0ad8560772c6653de73fc7d98e2ac0fe26b4bd
3
+ size 162514771
data/FDG/FDG_seg_010.tar.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d46bcbd4652e0edf72fb50ee20b60f67c9f619287700483705d85780f52007f3
3
+ size 158864071
data/FDG/FDG_seg_011.tar.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:76c718fa6007098092159b5e79f817df8658ac93305e23123f82265709aee62d
3
+ size 154079475
data/FDG/FDG_seg_012.tar.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:605a43a8747df1ca4f19dbe02a4bdd63afb4c1469829a239195c76c4fe092be0
3
+ size 160262111
data/FDG/FDG_seg_013.tar.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3074dddbff55b086d115d352d49c7798b7a8bed7da4490ff56c9aeaff3234b6a
3
+ size 154137296
data/FDG/FDG_seg_014.tar.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1fbb6a17cfdace9b2fbf37b9333079474cb84ffd2ea9e7b48f66d07b141c45e7
3
+ size 156090259