MS3SEG_t1w_t2w / README.md
Gaurav08's picture
Update README.md (#1)
2a28f41
metadata
license: cc0-1.0
dataset_info:
  features:
    - name: volume_id
      dtype: int32
    - name: slice_id
      dtype: int32
    - name: type
      dtype: string
    - name: age
      dtype: int32
    - name: sex
      dtype: string
    - name: weight
      dtype: float32
    - name: height
      dtype: float32
    - name: image
      dtype: image
    - name: vent_mask
      dtype: image
    - name: nwmh_mask
      dtype: image
    - name: abwmh_mask
      dtype: image
  splits:
    - name: train
      num_bytes: 95451164.224
      num_examples: 3636
  download_size: 93588878
  dataset_size: 95451164.224
configs:
  - config_name: default
    data_files:
      - split: train
        path: data/train-*
language:
  - en
task_categories:
  - image-segmentation
tags:
  - mri
  - medical
  - multiple-sclerosis
  - lesion-segmentation
  - white-matter
pretty_name: MS3SEG  Multiple Sclerosis MRI Dataset with Tri-Mask Annotations
size_categories:
  - 1K<n<10K

MS3SEG: Multiple Sclerosis MRI Dataset with Tri-Mask Annotations for Lesion Segmentation

This dataset contains materials from the study "A Multiple Sclerosis MRI Dataset with Tri-Mask Annotations for Lesion Segmentation" by Bashiri Bawil et al. (2026), aimed at developing and benchmarking segmentation algorithms that distinguish true MS demyelinating lesions from normal age-related white matter hyperintensities (WMH) and ventricular CSF artifacts.

🧠 Dataset Description

This repository provides a 2D slice-based version of the original MS3SEG dataset, designed for efficient deep learning and segmentation workflows.

Each entry corresponds to a single 2D slice extracted from a volume and includes the normalized MRI image, three corresponding segmentation masks, and participant-level clinical/demographic metadata.

The dataset addresses a critical clinical challenge: not all white matter hyperintensities visible on images represent pathological MS lesions. The tri-mask annotation framework explicitly distinguishes:

  1. Ventricles (vent_mask) — Fluid-filled cavities in the brain center. Explicitly masking ventricles gives the model anatomical context to avoid misclassifying these boundaries as pathology.

  2. Normal WMH (nwmh_mask) — Diffuse white matter signal changes from natural aging: gradual myelin degradation, axonal loss, and increased extracellular fluid. Not pathological MS activity — must be excluded from lesion burden calculations to avoid inflating disease scores.

  3. Abnormal WMH (abwmh_mask) — Focal MS demyelinating plaques. These are the primary clinical target — the basis for MS diagnosis and treatment response monitoring.

📦 Dataset Structure

Each dataset entry contains:

  • volume_id → Unique identifier for the MRI volume / patient
  • slice_id → Index of the 2D slice within the volume
  • type → MRI sequence type (e.g., T1WI, T2WI)
  • age → Participant age
  • sex → Participant sex
  • weight → Participant weight (kg)
  • height → Participant height (m)
  • image → 2D preprocessed slice (256×256, brain-extracted)
  • vent_mask → Binary segmentation mask for ventricles
  • nwmh_mask → Binary segmentation mask for normal white matter hyperintensities
  • abwmh_mask → Binary segmentation mask for abnormal (MS) white matter hyperintensities

Use

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

dataset = load_dataset("chehablab/ms3seg_t1w_t2w", split="train")

sample_id = 42

image    = dataset[sample_id]["image"]
vent     = dataset[sample_id]["vent_mask"]
nwmh     = dataset[sample_id]["nwmh_mask"]
abwmh    = dataset[sample_id]["abwmh_mask"]
scan_type = dataset[sample_id]["type"]

fig, axes = plt.subplots(1, 4, figsize=(16, 4))
axes[0].imshow(image,  cmap="gray");  axes[0].set_title(f"Image ({scan_type})")
axes[1].imshow(vent,   cmap="Blues"); axes[1].set_title("Ventricles")
axes[2].imshow(nwmh,   cmap="Greens"); axes[2].set_title("Normal WMH")
axes[3].imshow(abwmh,  cmap="Reds");  axes[3].set_title("Abnormal WMH")
for ax in axes: ax.axis("off")
plt.tight_layout()
plt.show()

📚 Citation

If you use this dataset, please acknowledge our lab Chehab Lab and cite the original dataset:

@article{Bawil2026,
  author = {Bawil, Mahdi Bashiri and Shamsi, Mousa and Ghalehasadi, Aydin and Jafargholkhanloo, Ali Fahmi and Bavil, Abolhassan Shakeri},
  title = {A Multiple Sclerosis MRI Dataset with Tri-Mask Annotations for Lesion Segmentation},
  journal = {Scientific Data},
  year = {2026},
  month = apr,
  day = {14},
  abstract = {Multiple sclerosis (MS) lesion segmentation from MRI is essential for diagnosis, monitoring, and treatment evaluation, yet existing datasets exhibit limited geographic diversity, scanner vendor bias, and inability to distinguish normal from pathological white matter hyperintensities. We present MS3SEG, a publicly available dataset comprising 100 MS patients from an Iranian cohort acquired on a 1.5 T Toshiba scanner, featuring multi-sequence MRI (T1-weighted, T2-weighted, T2-FLAIR in axial and sagittal planes) with novel tri-mask annotations. Expert annotators systematically delineated three classes on axial T2-FLAIR images: ventricles, normal white matter hyperintensities (age-related or CSF-contaminated regions), and abnormal white matter hyperintensities (MS lesions), incorporating automated quality control to minimize annotation errors. This tri-mask framework addresses a critical clinical challenge where benign periventricular hyperintensities are frequently misclassified as pathological lesions. Data are provided in multiple formats: raw DICOM, preprocessed NIfTI with co-registration and brain extraction, ground-truth masks, and visualization overlays. Baseline validation using U-Net, U-Net++, UNETR, and Swin UNETR across 5-fold cross-validation demonstrated dataset quality, with U-Net achieving Dice coefficients of 0.7469 for binary lesion segmentation and 0.6686 for multi-class abnormal hyperintensity segmentation. MS3SEG enables research on anatomically-aware segmentation, algorithm robustness to real-world clinical acquisition variations, and clinically relevant normal-versus-abnormal hyperintensity distinction, complementing existing 3D volumetric MS datasets.},
  issn = {2052-4463},
  doi = {10.1038/s41597-026-07184-5},
  url = {https://doi.org/10.1038/s41597-026-07184-5}
}

📜 License

This dataset is released under the Creative Commons CC0 1.0 Universal (CC0 1.0) Public Domain Dedication. You may copy, modify, distribute, and use the data, even for commercial purposes, without asking permission. CC0 1.0

Chehab Lab @ 2026