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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
pretty_name: GenSegDataset
|
| 3 |
+
license: other
|
| 4 |
+
license_name: mixed-per-subset
|
| 5 |
+
task_categories:
|
| 6 |
+
- image-segmentation
|
| 7 |
+
task_ids:
|
| 8 |
+
- semantic-segmentation
|
| 9 |
+
tags:
|
| 10 |
+
- medical
|
| 11 |
+
- medical-imaging
|
| 12 |
+
- 2d-segmentation
|
| 13 |
+
- semantic-segmentation
|
| 14 |
+
- benchmark
|
| 15 |
+
- multi-modality
|
| 16 |
+
size_categories:
|
| 17 |
+
- 10K<n<100K
|
| 18 |
+
# NOTE: the `configs:` data_files mapping below is finalized once the on-disk
|
| 19 |
+
# format (Parquet vs PNG mirror) is chosen; left as a template for now.
|
| 20 |
+
# configs:
|
| 21 |
+
# - config_name: cvc_clinicdb
|
| 22 |
+
# data_files:
|
| 23 |
+
# - split: train
|
| 24 |
+
# path: cvc_clinicdb/official/train/*
|
| 25 |
+
---
|
| 26 |
+
|
| 27 |
+
# GenSegDataset — A Unified 2D Medical Image Segmentation Benchmark
|
| 28 |
+
|
| 29 |
+
**GenSegDataset** is a standardized collection of **10 public 2D medical image
|
| 30 |
+
segmentation datasets** spanning **8 imaging modalities**, re-packaged into a single
|
| 31 |
+
consistent layout (identical directory structure, mask encoding, split files, and
|
| 32 |
+
metadata) so that segmentation models — and generative mask-conditioned data
|
| 33 |
+
augmentation methods — can be trained and compared across modalities with one data
|
| 34 |
+
pipeline.
|
| 35 |
+
|
| 36 |
+
> This repository redistributes **standardized derivatives** of existing public
|
| 37 |
+
> datasets. Each subset retains the license and citation requirements of its
|
| 38 |
+
> original source — see [Licensing & Attribution](#licensing--attribution) and
|
| 39 |
+
> please cite the original works.
|
| 40 |
+
|
| 41 |
+
---
|
| 42 |
+
|
| 43 |
+
## Overview
|
| 44 |
+
|
| 45 |
+
| Subset | Modality | Anatomy / Target | Classes | Channels | Sample size | Protocol | Train / Val / Test |
|
| 46 |
+
|---|---|---|---|---|---|---|---|
|
| 47 |
+
| `cvc_clinicdb` | Colonoscopy | Polyp | 2 | RGB | 384×288 | official | 490 / 61 / 61 |
|
| 48 |
+
| `kvasir_seg` | GI endoscopy | Polyp | 2 | RGB | ~622×529 (var) | official | 800 / 100 / 100 |
|
| 49 |
+
| `fives` | Retinal fundus | Vessel | 2 | RGB | 2048×2048 | official | 480 / 120 / 200 |
|
| 50 |
+
| `busi` | Breast ultrasound | Tumor | 2 | RGB | variable | 5-fold (fold01–05) | 545 / 78 / 157 (fold01) |
|
| 51 |
+
| `refuge2` | Retinal fundus | Optic disc & cup | 3 | RGB | ~2124×2056 | official | 400 / 400 / 400 |
|
| 52 |
+
| `acdc_png` | Cardiac MRI (2D slices) | RV / Myo / LV | 4 | grayscale | ~240×256 (var) | official | 136 / 210 / 380 |
|
| 53 |
+
| `idridd_segmentation` | Retinal fundus | Diabetic-retinopathy lesions | 6 | RGB | 4288×2848 | 5-fold (fold01–05) | 43 / 11 / 27 (fold01) |
|
| 54 |
+
| `pannuke_semantic` | Histopathology (H&E) | Nuclei (5 types) | 6 | RGB | 256×256 | 3-fold (fold01–03) | 2722 / 2523 / 2656 (fold01) |
|
| 55 |
+
| `medsegdb_isic2018` | Dermoscopy | Skin lesion | 2 | RGB | 256×256 | holdout | 2582 / 369 / 737 |
|
| 56 |
+
| `medsegdb_kits19` | Kidney CT (2D slices) | Kidney region (binary) | 2 | grayscale¹ | 256×256 | 5-fold (fold01–05) | 2832 / 479 / 705 (fold01) |
|
| 57 |
+
|
| 58 |
+
¹ `medsegdb_kits19` images are grayscale in content but stored as 3-channel PNG;
|
| 59 |
+
read them as grayscale (`IMREAD_GRAYSCALE`) for true single-channel input.
|
| 60 |
+
|
| 61 |
+
For cross-validation subsets (`busi`, `idridd_segmentation`, `medsegdb_kits19`:
|
| 62 |
+
5 folds; `pannuke_semantic`: 3 folds) every fold reuses the **same images** under a
|
| 63 |
+
different train/val/test partition. `holdout` and `official` provide a single fixed
|
| 64 |
+
partition.
|
| 65 |
+
|
| 66 |
+
---
|
| 67 |
+
|
| 68 |
+
## Directory layout
|
| 69 |
+
|
| 70 |
+
Each subset is shipped as a single archive **`<subset>.tar`** at the repo root;
|
| 71 |
+
extracting it yields the structure below.
|
| 72 |
+
|
| 73 |
+
```
|
| 74 |
+
GenSegDataset/
|
| 75 |
+
<subset>.tar # download & extract -> <subset>/...
|
| 76 |
+
<subset>/ # (after extraction)
|
| 77 |
+
metadata.json # subset-level metadata
|
| 78 |
+
manifest.jsonl # one JSON line per image: relative image/mask paths
|
| 79 |
+
<protocol>/ # e.g. official | fold01..fold05 | fold01..fold03 | holdout
|
| 80 |
+
train/ val/ test/
|
| 81 |
+
images/ # input images (.png)
|
| 82 |
+
masks/ # segmentation masks (.png)
|
| 83 |
+
README.md # this card
|
| 84 |
+
```
|
| 85 |
+
|
| 86 |
+
- **Pairing**: an image and its mask share the same file stem
|
| 87 |
+
(`images/<id>.png` ↔ `masks/<id>.png`); `manifest.jsonl` also lists the pairing
|
| 88 |
+
explicitly with paths relative to the subset root.
|
| 89 |
+
- **Modality / channels**: input images are RGB (3-channel) except `acdc_png`
|
| 90 |
+
(true grayscale) and `medsegdb_kits19` (grayscale content, 3-channel container).
|
| 91 |
+
|
| 92 |
+
### Mask encoding
|
| 93 |
+
|
| 94 |
+
Masks are single-channel `uint8` label maps with **values `0 … C-1`**
|
| 95 |
+
(`0` = background), **not** 0/255. Semantic meaning per index (confirmed against each
|
| 96 |
+
subset's `metadata.json` and the standardization scripts):
|
| 97 |
+
|
| 98 |
+
| Subset | Class indices |
|
| 99 |
+
|---|---|
|
| 100 |
+
| `cvc_clinicdb`, `kvasir_seg` | 0 background · 1 polyp |
|
| 101 |
+
| `fives` | 0 background · 1 vessel |
|
| 102 |
+
| `busi` | 0 background · 1 tumor (multi-instance masks merged) |
|
| 103 |
+
| `medsegdb_isic2018` | 0 background · 1 lesion |
|
| 104 |
+
| `medsegdb_kits19` | 0 background · 1 foreground (kidney region, binary) |
|
| 105 |
+
| `refuge2` | 0 background · 1 optic disc · 2 optic cup |
|
| 106 |
+
| `acdc_png` | 0 background · 1 right ventricle · 2 myocardium · 3 left ventricle |
|
| 107 |
+
| `idridd_segmentation` | 0 background · 1 microaneurysms · 2 haemorrhages · 3 hard exudates · 4 soft exudates · 5 optic disc |
|
| 108 |
+
| `pannuke_semantic` | 0 background · 1 neoplastic · 2 inflammatory · 3 connective · 4 dead · 5 epithelial |
|
| 109 |
+
|
| 110 |
+
---
|
| 111 |
+
|
| 112 |
+
## Usage
|
| 113 |
+
|
| 114 |
+
### Download & extract a subset
|
| 115 |
+
|
| 116 |
+
```python
|
| 117 |
+
from huggingface_hub import hf_hub_download
|
| 118 |
+
import tarfile
|
| 119 |
+
|
| 120 |
+
p = hf_hub_download("GenSegDataset/GenSegDataset", "cvc_clinicdb.tar", repo_type="dataset")
|
| 121 |
+
tarfile.open(p).extractall("GenSegDataset") # -> GenSegDataset/cvc_clinicdb/...
|
| 122 |
+
```
|
| 123 |
+
|
| 124 |
+
### Direct file access (after extraction)
|
| 125 |
+
|
| 126 |
+
```python
|
| 127 |
+
import cv2, glob, os
|
| 128 |
+
|
| 129 |
+
root = "GenSegDataset/cvc_clinicdb/official/train"
|
| 130 |
+
img = cv2.imread(f"{root}/images/0001.png") # RGB input
|
| 131 |
+
msk = cv2.imread(f"{root}/masks/0001.png", cv2.IMREAD_GRAYSCALE) # label map 0..C-1
|
| 132 |
+
```
|
| 133 |
+
|
| 134 |
+
### With `datasets` (once the Parquet/loader build is published)
|
| 135 |
+
|
| 136 |
+
```python
|
| 137 |
+
from datasets import load_dataset
|
| 138 |
+
ds = load_dataset("GenSegDataset/GenSegDataset", "cvc_clinicdb") # config = subset
|
| 139 |
+
sample = ds["train"][0] # {"image": PIL.Image, "mask": PIL.Image, ...}
|
| 140 |
+
```
|
| 141 |
+
|
| 142 |
+
> The `datasets`-loadable build (Parquet with embedded image/mask + a config per
|
| 143 |
+
> subset) is added on top of the raw file mirror; until then use direct file access.
|
| 144 |
+
|
| 145 |
+
---
|
| 146 |
+
|
| 147 |
+
## Standardization methodology
|
| 148 |
+
|
| 149 |
+
All subsets were converted to the unified layout above with a shared pipeline:
|
| 150 |
+
|
| 151 |
+
1. **Format unification** — images/masks re-encoded to `.png`; masks remapped to a
|
| 152 |
+
contiguous `0 … C-1` label space.
|
| 153 |
+
2. **Fixed, reproducible splits** — official splits used where they exist
|
| 154 |
+
(`cvc_clinicdb`, `kvasir_seg`, `fives`, `refuge2`, `acdc_png`); otherwise fixed
|
| 155 |
+
k-fold (`busi`, `idridd_segmentation`, `medsegdb_kits19`: 5-fold;
|
| 156 |
+
`pannuke_semantic`: official 3-fold) or a fixed holdout (`medsegdb_isic2018`).
|
| 157 |
+
Splits are frozen in `manifest.jsonl` so results are reproducible.
|
| 158 |
+
3. **Metadata** — each subset carries `metadata.json` and a per-image
|
| 159 |
+
`manifest.jsonl`.
|
| 160 |
+
|
| 161 |
+
The collection was assembled to benchmark (a) 2D segmentation backbones and
|
| 162 |
+
(b) generative, mask-conditioned data-augmentation methods under one consistent
|
| 163 |
+
interface.
|
| 164 |
+
|
| 165 |
+
---
|
| 166 |
+
|
| 167 |
+
## Licensing & Attribution
|
| 168 |
+
|
| 169 |
+
This repository contains **standardized derivatives** of the datasets below. **Each
|
| 170 |
+
subset is governed by its original license**; users must comply with the source
|
| 171 |
+
terms and **cite the original publications**. Source links:
|
| 172 |
+
|
| 173 |
+
| Subset | Source |
|
| 174 |
+
|---|---|
|
| 175 |
+
| `cvc_clinicdb` | CVC-ClinicDB (Bernal et al., 2015) |
|
| 176 |
+
| `kvasir_seg` | Kvasir-SEG (Jha et al., 2020) |
|
| 177 |
+
| `fives` | FIVES (Jin et al., 2022) |
|
| 178 |
+
| `busi` | BUSI (Al-Dhabyani et al., 2020) |
|
| 179 |
+
| `refuge2` | REFUGE / REFUGE2 (Orlando et al., 2020; Fang et al., 2022) |
|
| 180 |
+
| `acdc_png` | ACDC (Bernard et al., 2018) |
|
| 181 |
+
| `idridd_segmentation` | IDRiD (Porwal et al., 2018, 2020) |
|
| 182 |
+
| `pannuke_semantic` | PanNuke (Gamper et al., 2019, 2020) |
|
| 183 |
+
| `medsegdb_isic2018` | ISIC 2018 / HAM10000 (Codella et al., 2019; Tschandl et al., 2018) |
|
| 184 |
+
| `medsegdb_kits19` | KiTS19 (Heller et al., 2019, 2021) |
|
| 185 |
+
|
| 186 |
+
---
|
| 187 |
+
|
| 188 |
+
## Citation
|
| 189 |
+
|
| 190 |
+
If you use **GenSegDataset**, please cite this collection **and** the original
|
| 191 |
+
source dataset(s) you use.
|
| 192 |
+
|
| 193 |
+
```bibtex
|
| 194 |
+
@misc{gensegdataset2026,
|
| 195 |
+
title = {GenSegDataset: A Unified 2D Medical Image Segmentation Benchmark},
|
| 196 |
+
author = {<authors>},
|
| 197 |
+
year = {2026},
|
| 198 |
+
howpublished = {Hugging Face Datasets},
|
| 199 |
+
note = {Standardized collection of 10 public 2D medical segmentation datasets}
|
| 200 |
+
}
|
| 201 |
+
```
|
| 202 |
+
|
| 203 |
+
<details>
|
| 204 |
+
<summary>Original-source BibTeX (please verify before camera-ready)</summary>
|
| 205 |
+
|
| 206 |
+
```bibtex
|
| 207 |
+
@article{bernal2015cvcclinicdb,
|
| 208 |
+
title={WM-DOVA maps for accurate polyp highlighting in colonoscopy},
|
| 209 |
+
author={Bernal, Jorge and S{\'a}nchez, F Javier and Fern{\'a}ndez-Esparrach, Gloria and Gil, Debora and Rodr{\'i}guez, Cristina and Vilari{\~n}o, Fernando},
|
| 210 |
+
journal={Computerized Medical Imaging and Graphics}, volume={43}, pages={99--111}, year={2015}}
|
| 211 |
+
|
| 212 |
+
@inproceedings{jha2020kvasirseg,
|
| 213 |
+
title={Kvasir-SEG: A segmented polyp dataset},
|
| 214 |
+
author={Jha, Debesh and Smedsrud, Pia H and Riegler, Michael A and Halvorsen, P{\aa}l and de Lange, Thomas and Johansen, Dag and Johansen, H{\aa}vard D},
|
| 215 |
+
booktitle={MultiMedia Modeling (MMM)}, year={2020}}
|
| 216 |
+
|
| 217 |
+
@article{jin2022fives,
|
| 218 |
+
title={FIVES: A fundus image dataset for artificial intelligence based vessel segmentation},
|
| 219 |
+
author={Jin, Kai and Huang, Xingru and Zhou, Jingxing and others},
|
| 220 |
+
journal={Scientific Data}, volume={9}, year={2022}}
|
| 221 |
+
|
| 222 |
+
@article{aldhabyani2020busi,
|
| 223 |
+
title={Dataset of breast ultrasound images},
|
| 224 |
+
author={Al-Dhabyani, Walid and Gomaa, Mohammed and Khaled, Hussien and Fahmy, Aly},
|
| 225 |
+
journal={Data in Brief}, volume={28}, year={2020}}
|
| 226 |
+
|
| 227 |
+
@article{orlando2020refuge,
|
| 228 |
+
title={REFUGE Challenge: A unified framework for evaluating automated methods for glaucoma assessment from fundus photographs},
|
| 229 |
+
author={Orlando, Jos{\'e} Ignacio and Fu, Huazhu and others},
|
| 230 |
+
journal={Medical Image Analysis}, volume={59}, year={2020}}
|
| 231 |
+
|
| 232 |
+
@article{bernard2018acdc,
|
| 233 |
+
title={Deep learning techniques for automatic MRI cardiac multi-structures segmentation and diagnosis: Is the problem solved?},
|
| 234 |
+
author={Bernard, Olivier and Lalande, Alain and others},
|
| 235 |
+
journal={IEEE Transactions on Medical Imaging}, volume={37}, number={11}, year={2018}}
|
| 236 |
+
|
| 237 |
+
@article{porwal2020idrid,
|
| 238 |
+
title={IDRiD: Diabetic retinopathy -- segmentation and grading challenge},
|
| 239 |
+
author={Porwal, Prasanna and Pachade, Samiksha and others},
|
| 240 |
+
journal={Medical Image Analysis}, volume={59}, year={2020}}
|
| 241 |
+
|
| 242 |
+
@article{gamper2020pannuke,
|
| 243 |
+
title={PanNuke dataset extension, insights and baselines},
|
| 244 |
+
author={Gamper, Jevgenij and Koohbanani, Navid Alemi and others},
|
| 245 |
+
journal={arXiv:2003.10778}, year={2020}}
|
| 246 |
+
|
| 247 |
+
@article{codella2019isic2018,
|
| 248 |
+
title={Skin lesion analysis toward melanoma detection 2018: A challenge hosted by the ISIC},
|
| 249 |
+
author={Codella, Noel and Rotemberg, Veronica and others},
|
| 250 |
+
journal={arXiv:1902.03368}, year={2019}}
|
| 251 |
+
|
| 252 |
+
@article{tschandl2018ham10000,
|
| 253 |
+
title={The HAM10000 dataset, a large collection of multi-source dermatoscopic images of common pigmented skin lesions},
|
| 254 |
+
author={Tschandl, Philipp and Rosendahl, Cliff and Kittler, Harald},
|
| 255 |
+
journal={Scientific Data}, volume={5}, year={2018}}
|
| 256 |
+
|
| 257 |
+
@article{heller2021kits19,
|
| 258 |
+
title={The state of the art in kidney and kidney tumor segmentation in contrast-enhanced CT imaging: Results of the KiTS19 challenge},
|
| 259 |
+
author={Heller, Nicholas and Isensee, Fabian and others},
|
| 260 |
+
journal={Medical Image Analysis}, volume={67}, year={2021}}
|
| 261 |
+
```
|
| 262 |
+
|
| 263 |
+
</details>
|
| 264 |
+
|
| 265 |
+
---
|
| 266 |
+
|
| 267 |
+
## Maintenance notes
|
| 268 |
+
|
| 269 |
+
- Class indices/names above were confirmed from each subset's `metadata.json`,
|
| 270 |
+
the actual mask label values, and the standardization scripts
|
| 271 |
+
(`tools/process_downloaded_segmentation_datasets.py`). Most subsets' `metadata.json`
|
| 272 |
+
omits an explicit `num_classes`/`modality` field (the two `medsegdb_*` subsets
|
| 273 |
+
include them).
|
| 274 |
+
- Read `acdc_png` and `medsegdb_kits19` as grayscale even though some files are
|
| 275 |
+
stored as 3-channel containers.
|