--- license: cc-by-nc-4.0 pretty_name: DosePET - An Open-Source Dataset with 2100 Radiation Dose Maps for PET/CT tags: - medical-imaging - dosimetry - pet-ct - monte-carlo - nuclear-medicine - radiation-dose size_categories: - 1K The per-organ dose statistics > for all 2100 studies are a 32 MB download, and are also browsable in the > Dataset Viewer above. See [Quick start](#quick-start). --- ## Quick start ```bash pip install huggingface_hub # recommended, not required wget https://huggingface.co/datasets/eltzanis/DosePET/resolve/main/download_dataset.py python3 download_dataset.py list # what's available python3 download_dataset.py get --content tables --out ./petct # 32 MB python3 download_dataset.py get --sample 5 --out ./petct # 5 full studies python3 download_dataset.py get --subset PSMA --out ./petct # one tracer python3 download_dataset.py get --all --out ./petct # everything python3 download_dataset.py get --all --dry-run # size check, no download ``` Every selection extracts into the same layout, so you can start small and add more later without reorganising anything. --- ## Downloading exactly what you need ### 1. Only the organ dose tables — 32 MB Every `dose_report.csv`, `metadata.json`, `dosimetry_config.json` and `segmentation/statistics.json`, for all 2100 studies. No dose images, no masks. ```bash python3 download_dataset.py get --content tables --out ./petct ``` The same data is in `metadata/dose_reports.parquet` (24 MB, 245,700 rows) if you would rather have one table than 2100 files: ```python import pandas as pd df = pd.read_parquet("hf://datasets/eltzanis/DosePET/metadata/dose_reports.parquet") df[df.organ == "liver"].groupby("isotope_key").mean_dose_rate_at_scan_mGy_per_h.describe() ``` ### 2. Named studies — only their bytes are fetched ```bash # find the ids python3 download_dataset.py list --cases # fetch three of them, from three different shards python3 download_dataset.py get \ --cases FDG/0001,FDG/0500,PSMA/PSMA_0179419e313f7d8c/05-03-2002-NA-PETCT_whole-body_PSMA-40379 \ --out ./petct ``` The dose shards are uncompressed tars and the manifest records each study's byte offset, so the script issues HTTP Range requests and pulls only what you asked for: ``` range-fetching 1 case(s), 144.04 MB of 9.91 GB range-fetching 1 case(s), 133.40 MB of 9.94 GB range-fetching 1 case(s), 105.14 MB of 9.94 GB done: 366 files ``` For a long list use a file: ```bash printf 'FDG/0001\nFDG/0002\nFDG/0500\n' > my_cases.txt python3 download_dataset.py get --case-list my_cases.txt --out ./petct ``` Add `--no-range` to download whole shards instead (useful behind a proxy that strips Range headers; the script falls back to this automatically anyway). ### 3. A representative sample ```bash python3 download_dataset.py get --sample 10 --out ./petct ``` Ten studies spread evenly across the dataset rather than ten consecutive ids. Combine with `--subset` to sample one tracer: ```bash python3 download_dataset.py get --sample 10 --subset PSMA --out ./petct ``` ### 4. Masks and tables but no dose images ```bash python3 download_dataset.py get --content tables,seg --out ./petct ``` All 245,700 AI generted organ masks for all 2100 studies: **5.3 GB** ### 5. One tracer ```bash python3 download_dataset.py get --subset FDG --out ./petct # 1503 studies python3 download_dataset.py get --subset PSMA --out ./petct # 597 studies ``` ### 6. By shard, for batching a big transfer ```bash python3 download_dataset.py get --subset FDG --shards 0-3 --out ./petct python3 download_dataset.py get --subset FDG --shards 4-7 --out ./petct ``` `FDG_dose_007.tar` and `FDG_seg_007.tar.gz` hold exactly the same studies, so a shard index always gives you complete studies. ### 7. Everything ```bash python3 download_dataset.py get --all --out ./petct ``` ### Always check first ```bash python3 download_dataset.py get --all --dry-run python3 download_dataset.py get --cases FDG/0001,FDG/0002 --dry-run ``` `--dry-run` prints the exact download size and the shards involved, and downloads nothing. ### Measured download sizes | what you ask for | download | |---|---| | `--content tables` | 32 MB | | one named study | 333 MB | | `--sample 5` | 1.46 GB | | `--sample 10` | 2.80 GB | | `--sample 50` | 13.5 GB | | `--content tables,seg` (all masks, no dose) | 5.32 GB | | `--subset PSMA` | 68.2 GB | | `--subset FDG` | 314.7 GB | | `--all` | 382.8 GB | A named study costs more than its dose image alone (175 MB) because the masks for its shard arrive as one 150 MB gzipped archive and the 32 MB tables shard comes with it. --- ## Coming back for more later **Point `--out` at the same directory and the dataset grows in place.** Nothing is re-downloaded, nothing already on disk is touched. ```bash python3 download_dataset.py get --content tables --out ./petct # today: 32 MB python3 download_dataset.py get --cases FDG/0001 --out ./petct # later: 333 MB python3 download_dataset.py get --sample 50 --out ./petct # later: 13.5 GB python3 download_dataset.py get --all --out ./petct # finally: 383 GB ``` Two things worth knowing: - Each archive is **deleted after it is extracted**, to save disk. If a download is interrupted mid-shard it restarts that shard; pass `--keep-archives` to keep them and make interruptions cheaper. - The tables shard (32 MB) covers all 2100 studies, so it comes down again with each new batch. Harmless, but it is why a "three more studies" batch reports ~867 MB rather than ~836 MB. --- ## What you end up with The extracted tree is **identical to the source dataset** — same directory structure, same filenames, same bytes. Verified by extracting a complete shard pair and diffing it against the original: ``` directory tree : IDENTICAL - 2976 paths, same names, same nesting file contents : ALL 2928 FILES BYTE-IDENTICAL ``` Partial downloads give you a correct subtree: take only the tables and you get `FDG/0001/dose_report.csv` in its proper place with `dose_image.nii.gz` simply absent. Add masks or dose images later and they land in the same tree. The one thing not preserved is **file modification times** — they are set to when you extracted, not when the data was produced. File contents are bit-for-bit identical. ### Integrity Every archive's SHA-256 is checked against `shards.json` before extraction, and the download aborts on a mismatch rather than extracting corrupt data. To re-check archives you kept with `--keep-archives`: ```bash python3 download_dataset.py verify --cache ./petct_cache ``` --- ## What each study contains ``` FDG/0001/ dose_image.nii.gz total absorbed dose, Gy, uint16 + scl_slope dose_report.csv 117 rows, per-organ dose statistics metadata.json isotope, half-life, injected activity, timings dosimetry_config.json cumulated activity, primaries, integration mode segmentation/ liver.nii.gz ... 117 binary organ masks (TotalSegmentator) statistics.json mask volumes PSMA/// same files, one extra directory level ``` ### `dose_image.nii.gz` Each voxel is the **total absorbed dose in Gy**, integrated from the start of the scan to infinity assuming **physical decay only** — the activity distribution is frozen in space, with no biological clearance and no redistribution. Stored as `uint16` with a `scl_slope` in the NIfTI header (quantisation step = `max_dose / 65535`, about 1.5e-5 relative). **You must apply `scl_slope`.** `nibabel` and `SimpleITK` do this automatically: ```python import nibabel as nib, numpy as np dose_Gy = np.asanyarray(nib.load("FDG/0001/dose_image.nii.gz").dataobj) # Gy ``` ### `dose_report.csv` One row per organ, alphabetical: | column | meaning | |---|---| | `organ` | TotalSegmentator label | | `mean_dose_Gy`, `max_dose_Gy`, `min_dose_Gy`, `dose_std_Gy` | dose in the mask | | `mean_dose_injection_Gy`, `max_dose_injection_Gy` | back-extrapolated to injection time | | `volume_cm3`, `mass_g`, `num_voxels` | mask geometry | | `dcf_Gy_per_Bqs` | dose conversion factor, Gy per decay in the FOV | | `mean_dose_rate_at_scan_mGy_per_s`, `mean_dose_rate_at_scan_mGy_per_h` | dose rate at scan start | All 245,700 rows are also published as `metadata/dose_reports.parquet` for the Dataset Viewer, joined with each study's isotope, half-life, injected activity and cumulated activity. In the Parquet table the dose conversion factor is given as **`dcf_fGy_per_Bqs`** — the same quantity as the CSVs' `dcf_Gy_per_Bqs`, in femtogray (multiplied by 10^15^). Doses back-extrapolated to injection time are provided in each study's `dose_report.csv`, and simulation parameters in its `dosimetry_config.json`. A zero in `dcf_fGy_per_Bqs` (8857 rows) means the organ mask is empty because the structure lies outside the acquired field of view, not that the value is missing. --- ## Deriving dose rate and Gy-per-decay Because the only time dependence is a single exponential shared by every voxel, both quantities are the dose image times **one scalar per study**: ``` lambda = ln2 / T_half T_half from metadata.json rate = D * 3.6e6 * lambda [mGy/h] at scan start DCF = D / A_tilde [Gy per decay] A_tilde = cumulated_from_scan ``` ```python import json, math, numpy as np, nibabel as nib case = "FDG/0001" cfg = json.load(open(f"{case}/dosimetry_config.json")) meta = json.load(open(f"{case}/metadata.json")) T_half = cfg.get("half_life_seconds") or meta["isotope"]["half_life_seconds"] A_tilde = cfg["cumulated_from_scan"] D = np.asanyarray(nib.load(f"{case}/dose_image.nii.gz").dataobj) # Gy rate_mGy_per_h = D * 3.6e6 * math.log(2) / T_half dcf_Gy_per_dec = D / A_tilde ``` For organ-level numbers you need none of this — the columns are already in `dose_report.csv`. ### `tools/convert_dose_images.py` It does the conversions above for you, and can independently re-verify the published tables. ```bash DATA=./petct # where you extracted the dataset # voxel-wise dose-rate maps, mGy/h at scan start python3 tools/convert_dose_images.py rate --root $DATA/FDG --out ./rate_maps # voxel-wise Gy-per-decay maps python3 tools/convert_dose_images.py dcf --root $DATA/PSMA --out ./dcf_maps # per-organ table straight from the image + masks, in the same column # order as dose_report.csv so the two can be diffed python3 tools/convert_dose_images.py organs --case $DATA/FDG/0001 --out table.csv # recompute every reproducible column and compare against the published CSV python3 tools/convert_dose_images.py check --root $DATA/FDG ``` Other time points are opt-in: `--at injection` (uses the stored injection correction factor) or `--at +3600` for one hour after the scan. Units via `--unit mGy_per_h | mGy_per_s | Gy_per_s`. **The conversion is lossless.** By default the tool copies the `uint16` payload byte for byte and multiplies only the NIfTI `scl_slope`, so the output carries no extra quantisation and is the same size as the input. Use `--mode float32` if your software ignores `scl_slope`. `check` is the reproducibility anchor: it recomputes organ means from the dose image and the masks, applies the scale factor, and diffs against the shipped `dose_report.csv`, printing PASS/FAIL per study: ``` [1/2] PASS 0001 117 organs, 1283 values, worst 0.499 x tolerance ``` Full usage in `tools/README.md`. Requires `numpy`, `nibabel`, and `SimpleITK` for the mask-based commands. > Converting a whole subset duplicates it on disk (hundreds of GB). Unless you > need the files on disk, apply the scalar on the fly with the six lines above. --- ## How the release is packaged Three kinds of shard, all tar archives whose members keep their original relative paths: | shard | contents | compression | why | |---|---|---|---| | `data/tables.tar.gz` | every `.csv` / `.json`, all 2100 studies | gzip | 32 MB, so table-only users download almost nothing | | `data//_dose_NNN.tar` | `dose_image.nii.gz` | **none** | already gzipped NIfTI | | `data//_seg_NNN.tar.gz` | organ masks | gzip | masks compress about **23:1** (115 GB → 5 GB) | `*_dose_NNN` and `*_seg_NNN` with the same `NNN` hold **exactly the same studies**, so a complete slice of the dataset is two downloads. Alongside the data: | path | what | |---|---| | `download_dataset.py` | the download script | | `shards.json` | manifest: sizes, SHA-256, case lists, per-case byte offsets | | `metadata/dose_reports.parquet` | all 245,700 organ rows, for the Dataset Viewer | | `tools/convert_dose_images.py` | dose-rate / Gy-per-decay conversion + verification | | `tools/README.md` | usage guide for the conversion tool | | `skills/dosepet-research/` | agent skill: instructions for AI agents working with the dataset | `shards.json` lists every shard with its size, SHA-256 and case list, and maps each case id to its shards. The download script verifies every archive against that checksum before extracting. --- ## Using DosePET with AI agents `skills/dosepet-research/` is an agent skill — a set of instructions that an agentic AI system (for example Claude Code or OpenAI Codex) can load to work with this dataset correctly. It covers selective downloading, retrieving and matching the source PET/CT examinations from ENHANCE.PET and PSMA-PET-CT-Lesions, verifying spatial correspondence before use, and the physical meaning and units of the dose quantities. ```bash hf download eltzanis/DosePET --repo-type dataset --include "skills/*" --local-dir . ``` Then make the `skills/dosepet-research` folder available to your agent (for Claude Code, copy it into `~/.claude/skills/` or the project's `.claude/skills/`). --- ## Assumptions and caveats 1. **Physical decay only.** No biological clearance or redistribution. 2. **Time zero is scan start.** 3. **`dcf_Gy_per_Bqs` is normalised to decays in the imaged FOV**, with that patient's own tracer distribution as the source. It is a FOV-normalised S-value, *not* dose per decay in a specific source organ, and should not be compared directly with MIRD/OLINDA organ-to-organ S-values. 4. **Apply `scl_slope`** (if it is not applied automatically) when reading the dose images. 5. **Four FDG studies** (`0718`, `1022`, `1195`, `1289`) have no injection correction factor, because the acquisition time is missing upstream. Their `dose_report.csv` therefore omits `mean_dose_injection_Gy` and `max_dose_injection_Gy`. Scan-time dose, dose rate and DCF are unaffected. --- ## Citation If you use DosePET in your research, please cite: ```bibtex @article{Tzanis2026DosePET, title = {DosePET: An Open-Source Dataset with 2100 Radiation Dose Maps for PET/CT}, author = {Eleftherios Tzanis and Antonios Tzortzakakis and Michail E. Klontzas}, year = {2026}, note = {Manuscript under review} } ``` ## License **CC BY-NC 4.0** — Creative Commons Attribution-NonCommercial 4.0 International. You may share and adapt this dataset for **non-commercial** purposes with attribution. See https://creativecommons.org/licenses/by-nc/4.0/ The underlying PET/CT images come from their respective source collections; please also honour their terms and cite them. - **FDG subset** — ENHANCE.PET whole-/total-body [18F]FDG-PET/CT dataset: Ferrara D, Pires M, Gutschmayer S, et al. Sharing a whole-/total-body [18F]FDG-PET/CT dataset with CT-derived segmentations: an ENHANCE.PET initiative. *Sci Data* 13, 869 (2026). https://doi.org/10.1038/s41597-026-07218-y - **PSMA subset** — LMU Munich whole-body PSMA-PET/CT dataset: Jeblick K, Schachtner B, Mittermeier A, et al. A Whole-Body PSMA-PET/CT dataset with manually annotated tumor lesions. *Sci Data* 13, 1023 (2026). https://doi.org/10.1038/s41597-026-07821-z