MVG_extract / README.md
chicagoypark's picture
Add dataset card
d31b25f verified
|
Raw
History Blame Contribute Delete
2.74 kB
---
license: other
task_categories:
- image-to-image
- image-segmentation
tags:
- medical-imaging
- brats
- synthrad
- amos
- chaos
- mri
- ct
- in-context
size_categories:
- 1K<n<10K
---
# MVG_extract — pre-extracted 2D slice tiles for the MVG_Multimodal medical baseline
Canonical **256×256** 2D slice tiles for the four datasets used by the multimodal
[MVG_Multimodal](https://github.com/ChicagoPark/MVG_Multimodal) in-context image→image model
(cross-modal **translation** + binary **segmentation**): **BraTS2023, SynthRAD2023, AMOS22, CHAOS**.
These are the exact model inputs — extracting them once removes the per-sample full-volume load
(AMOS volumes are ~200 MB) so training/eval is compute-bound, and they are the **canonical bytes**
the fair-evaluation contract hashes (so any method consuming them is byte-comparable).
## Contents
Everything unzips to a single `MVG_extract/` directory:
```
MVG_extract/{dataset}/{split}/{subject}__{img|mask}__{key}.npz
```
- `{dataset}``brats, synthrad, amos, chaos`
- `{split}``train, val, test` (BraTS has train/val only — its test uses the nnUNet/paired-PNG pools)
- `{key}` = modality (`t1n,t1c,t2w,t2f` / `mr,ct` / `ct,mri` / `t1dual,t2spir`) or `seg`/liver mask
- each `.npz` holds `zs` (int32, `n` slice indices) + `tiles` (uint8, `(n, 256, 256)`)
| dataset | train | val | test | modalities | task |
|---|--:|--:|--:|---|---|
| brats | 5752 | 307 | — | t1n,t1c,t2w,t2f (+seg) | translation + tumor seg |
| synthrad | 576 | 32 | 112 | mr, ct (brain/pelvis) | MR↔CT translation |
| amos | 580 | 32 | 108 | ct, mri (+liver) | liver seg |
| chaos | 90 | 12 | 18 | ct, t1dual, t2spir (+liver) | liver seg |
*(counts are `.npz` stacks; ~7,619 total, 9.3 GB.)*
## Usage
```python
import numpy as np
d = np.load("MVG_extract/synthrad/test/brain__BA211__img__mr.npz")
zs, tiles = d["zs"], d["tiles"] # (n,), (n,256,256) uint8
img01 = tiles[0].astype(np.float32) / 255.0 # image -> [0,1]
# mask stacks (…__mask__…) are already {0,1}: gt = tiles[0].astype(np.float32)
```
Point the loader at the unzipped root: `MedicalProvider(name, split, 256, extract_root="…/MVG_extract")`.
## Provenance
Rendered by `mm_extract.py` via the vendored `mm_preprocess` recipe (LPS reorient; per-volume body
bbox +15% → pad-square → resize 256; MR non-zero (1,99)-pct → CT HU window (−1000,1000); MR & CT share
the CT bbox). Frozen subject splits from
[`latent-diffusion_Multimodal/ldm/data/medical_splits`](https://github.com/ChicagoPark/MVG_Multimodal)
(seed 0). uint8 8-bit quantization is byte-consistent with the medical-imaging PNG pipeline.
Code + fair-evaluation protocol: **https://github.com/ChicagoPark/MVG_Multimodal**