UCSF_PDGM / README.md
AhmadMM2024's picture
Update README.md
938e48b verified
|
Raw
History Blame Contribute Delete
7.75 kB
metadata
dataset_info:
  features:
    - name: volume_id
      dtype: string
    - name: slice_id
      dtype: int32
    - name: t1
      dtype: image
    - name: t1c
      dtype: image
    - name: t2
      dtype: image
    - name: tumor_mask
      dtype: image
    - name: is_tumorous
      dtype: bool
    - name: tumor_type
      dtype: string
    - name: who_grade
      dtype: string
    - name: sex
      dtype: string
    - name: age
      dtype: float32
  splits:
    - name: train
      num_bytes: 1554208362.105
      num_examples: 77655
  download_size: 1591700680
  dataset_size: 1554208362.105
configs:
  - config_name: default
    data_files:
      - split: train
        path: data/train-*
license: cc-by-4.0
task_categories:
  - image-segmentation
  - image-classification
language:
  - en
tags:
  - mri
  - medical
  - t1
  - t2
  - t1c
  - medical volumes
  - brain
  - scans
  - tumor
pretty_name: The University of California San Francisco Preoperative Diffuse Glioma MRI
size_categories:
  - 10K<n<100K

UCSF_PDGM — 2D Slice-Based Multi-Sequence Brain MRI Dataset with Tumor Segmentation

This dataset is derived from the UCSF Preoperative Diffuse Glioma MRI (UCSF-PDGM) collection, a large-scale, preoperative brain MRI dataset of patients with histopathologically confirmed diffuse gliomas, hosted on The Cancer Imaging Archive (TCIA). The original collection provides skull-stripped, co-registered, multi-sequence 3D MRI volumes along with expert-corrected multicompartment tumor segmentations and detailed clinical/molecular metadata.

Here, we provide a 2D slice-based version, extracted from three of the available MRI sequences per patient — T1-weighted (T1), post-contrast T1-weighted (T1c), and T2-weighted (T2) — paired slice-for-slice with the corresponding tumor segmentation mask and patient-level clinical metadata. The dataset is designed for multimodal tumor segmentation, classification, and representation learning on brain MRI.


📦 Dataset Structure

The dataset has a single train split, with each row corresponding to a single 2D axial slice from a patient's coregistered T1 / T1c / T2 volumes:

Field Description
volume_id Unique patient/case identifier (e.g., UCSF-PDGM-0152)
slice_id Index of the axial slice within the volume
t1 2D pre-contrast T1-weighted MRI slice
t1c 2D post-contrast (gadolinium-enhanced) T1-weighted MRI slice
t2 2D T2-weighted MRI slice
tumor_mask 2D multicompartment tumor segmentation mask (see Tumor Mask Labels below)
is_tumorous Boolean — whether any tumor label is present on this slice
tumor_type Final pathologic diagnosis (WHO 2021 classification)
who_grade WHO CNS tumor grade: 2, 3, or 4
sex Patient sex: M or F
age Patient age at MRI, in years

tumor_type, who_grade, sex, and age are patient-level attributes and are therefore identical across all slices belonging to the same volume_id.

tumor_type takes one of four values, per the integrated WHO CNS 2021 diagnostic categories used by UCSF-PDGM:

  • Glioblastoma, IDH-wildtype
  • Astrocytoma, IDH-mutant
  • Astrocytoma, IDH-wildtype
  • Oligodendroglioma, IDH-mutant, 1p/19q-codeleted

⚙️ Preprocessing

  • For each patient, the preprocessed, skull-stripped, and co-registered T1, T1c, and T2 NIfTI volumes were used (all UCSF-PDGM volumes are resampled to a shared 1mm isotropic space defined by the T2/FLAIR image)
  • Volumes were sliced into 2D axial slices; the tumor segmentation volume was sliced identically and aligned per-slice with its source volume
  • Patient-level clinical metadata (tumor_type, who_grade, sex, age) was broadcast from the UCSF-PDGM clinical data table to every slice belonging to that patient
  • All slices (tumorous and non-tumorous) were exported; use is_tumorous to filter or balance

🚀 Usage

from datasets import load_dataset
import matplotlib.pyplot as plt
import numpy as np

ds = load_dataset("chehablab/UCSF_PDGM", split="train")

# Grab a tumorous slice and view all three sequences plus the mask overlay
sample = next(s for s in ds if s["is_tumorous"])

fig, axes = plt.subplots(1, 4, figsize=(16, 4))
for ax, key in zip(axes[:3], ["t1", "t1c", "t2"]):
    ax.imshow(sample[key], cmap="gray")
    ax.set_title(key.upper())
    ax.axis("off")

axes[3].imshow(sample["t1c"], cmap="gray")
axes[3].imshow(np.array(sample["tumor_mask"]), cmap="jet", alpha=0.4, vmin=0, vmax=4)
axes[3].set_title("Tumor Mask Overlay")
axes[3].axis("off")

fig.suptitle(
    f"{sample['volume_id']} | Slice {sample['slice_id']} | "
    f"{sample['tumor_type']} (WHO grade {sample['who_grade']})"
)
plt.tight_layout()
plt.show()

🏷️ Tumor Mask Labels

Tumor segmentation in UCSF-PDGM was generated as part of the 2021 BraTS challenge pipeline (automated ensemble segmentation, manually corrected by trained radiologists and approved by expert reviewers), and follows the standard BraTS multicompartment labeling convention:

Value Label Description
0 Background No tumor
1 NCR/NET Necrotic and non-enhancing tumor core
2 ED Peritumoral edema / surrounding FLAIR abnormality
4 ET GD-enhancing tumor

Note label 3 is unused (a holdover from the original BraTS labeling scheme). Common derived regions of interest: Whole Tumor = {1, 2, 4}, Tumor Core = {1, 4}, Enhancing Tumor = {4}.


🧪 Use Cases

  • Multimodal (T1 / T1c / T2) brain tumor segmentation
  • WHO grade or tumor subtype classification from imaging
  • Multi-task learning combining segmentation with clinical metadata prediction
  • Slice-level pretraining and representation learning for glioma MRI
  • Studying enhancing vs. non-enhancing tumor compartments across sequences

⚠️ Important Notes

  • Class imbalance: most slices, particularly toward the superior/inferior extremes of a volume, contain no tumor. Use is_tumorous to filter or apply weighted sampling.
  • Volume-level splits: always split train/val/test at the volume_id level, never at the slice level, to avoid leakage between sets.
  • Patient duplicates: per TCIA's documentation, a small number of UCSF-PDGM case IDs are short-interval follow-up imaging of another case in the collection rather than fully independent patients. Be mindful of this when constructing splits across the full dataset.
  • Mask-image alignment: tumor_mask is in the same 2D slice space as t1, t1c, and t2 for a given row, so no additional registration is needed to overlay it.

📚 Citation

This dataset is derived from data made available on The Cancer Imaging Archive (TCIA) under a CC BY 4.0 license. If you use this dataset, please acknowledge Chehab Lab and cite the original UCSF-PDGM dataset:

@misc{Calabrese2022,
  author = {Calabrese, E. and Villanueva-Meyer, J. and Rudie, J. and Rauschecker, A. and Baid, U. and Bakas, S. and Cha, S. and Mongan, J. and Hess, C.},
  title  = {The University of California San Francisco Preoperative Diffuse Glioma MRI (UCSF-PDGM) (Version 5) [dataset]},
  year   = {2022},
  publisher = {The Cancer Imaging Archive},
  doi    = {10.7937/tcia.bdgf-8v37}
}

📜 License

This dataset is released under the Creative Commons Attribution 4.0 International (CC BY 4.0) license, consistent with the source data on TCIA. You may copy, modify, distribute, and use the data, even for commercial purposes, provided that appropriate credit is given to the original authors and TCIA.

CC BY 4.0

Chehab Lab @ 2026