Datasets:
The dataset viewer is not available for this subset.
Exception: SplitsNotFoundError
Message: The split names could not be parsed from the dataset config.
Traceback: Traceback (most recent call last):
File "/usr/local/lib/python3.14/site-packages/datasets/inspect.py", line 286, in get_dataset_config_info
for split_generator in builder._split_generators(
~~~~~~~~~~~~~~~~~~~~~~~~~^
StreamingDownloadManager(base_path=builder.base_path, download_config=download_config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/webdataset/webdataset.py", line 83, in _split_generators
raise ValueError(
...<2 lines>...
)
ValueError: The TAR archives of the dataset should be in WebDataset format, but the files in the archive don't share the same prefix or the same types.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/src/services/worker/src/worker/job_runners/config/split_names.py", line 66, in compute_split_names_from_streaming_response
for split in get_dataset_split_names(
~~~~~~~~~~~~~~~~~~~~~~~^
path=dataset,
^^^^^^^^^^^^^
config_name=config,
^^^^^^^^^^^^^^^^^^^
token=hf_token,
^^^^^^^^^^^^^^^
)
^
File "/usr/local/lib/python3.14/site-packages/datasets/inspect.py", line 340, in get_dataset_split_names
info = get_dataset_config_info(
path,
...<6 lines>...
**config_kwargs,
)
File "/usr/local/lib/python3.14/site-packages/datasets/inspect.py", line 291, in get_dataset_config_info
raise SplitsNotFoundError("The split names could not be parsed from the dataset config.") from err
datasets.inspect.SplitsNotFoundError: The split names could not be parsed from the dataset config.Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
GenSegDataset — A Unified 2D Medical Image Segmentation Benchmark
GenSegDataset is a standardized collection of 10 public 2D medical image segmentation datasets spanning 8 imaging modalities, re-packaged into a single consistent layout (identical directory structure, mask encoding, split files, and metadata) so that segmentation models — and generative mask-conditioned data augmentation methods — can be trained and compared across modalities with one data pipeline.
This repository redistributes standardized derivatives of existing public datasets. Each subset retains the license and citation requirements of its original source — see Licensing & Attribution and please cite the original works.
Overview
| Subset | Modality | Anatomy / Target | Classes | Channels | Sample size | Protocol | Train / Val / Test |
|---|---|---|---|---|---|---|---|
cvc_clinicdb |
Colonoscopy | Polyp | 2 | RGB | 384×288 | official | 490 / 61 / 61 |
kvasir_seg |
GI endoscopy | Polyp | 2 | RGB | ~622×529 (var) | official | 800 / 100 / 100 |
fives |
Retinal fundus | Vessel | 2 | RGB | 2048×2048 | official | 480 / 120 / 200 |
busi |
Breast ultrasound | Tumor | 2 | RGB | variable | 5-fold (fold01–05) | 545 / 78 / 157 (fold01) |
refuge2 |
Retinal fundus | Optic disc & cup | 3 | RGB | ~2124×2056 | official | 400 / 400 / 400 |
acdc_png |
Cardiac MRI (2D slices) | RV / Myo / LV | 4 | grayscale | ~240×256 (var) | official | 136 / 210 / 380 |
idridd_segmentation |
Retinal fundus | Diabetic-retinopathy lesions | 6 | RGB | 4288×2848 | 5-fold (fold01–05) | 43 / 11 / 27 (fold01) |
pannuke_semantic |
Histopathology (H&E) | Nuclei (5 types) | 6 | RGB | 256×256 | 3-fold (fold01–03) | 2722 / 2523 / 2656 (fold01) |
medsegdb_isic2018 |
Dermoscopy | Skin lesion | 2 | RGB | 256×256 | holdout | 2582 / 369 / 737 |
medsegdb_kits19 |
Kidney CT (2D slices) | Kidney region (binary) | 2 | grayscale¹ | 256×256 | 5-fold (fold01–05) | 2832 / 479 / 705 (fold01) |
¹ medsegdb_kits19 images are grayscale in content but stored as 3-channel PNG;
read them as grayscale (IMREAD_GRAYSCALE) for true single-channel input.
For cross-validation subsets (busi, idridd_segmentation, medsegdb_kits19:
5 folds; pannuke_semantic: 3 folds) every fold reuses the same images under a
different train/val/test partition. holdout and official provide a single fixed
partition.
Directory layout
Each subset is shipped as a single archive <subset>.tar at the repo root;
extracting it yields the structure below.
GenSegDataset/
<subset>.tar # download & extract -> <subset>/...
<subset>/ # (after extraction)
metadata.json # subset-level metadata
manifest.jsonl # one JSON line per image: relative image/mask paths
<protocol>/ # e.g. official | fold01..fold05 | fold01..fold03 | holdout
train/ val/ test/
images/ # input images (.png)
masks/ # segmentation masks (.png)
README.md # this card
- Pairing: an image and its mask share the same file stem
(
images/<id>.png↔masks/<id>.png);manifest.jsonlalso lists the pairing explicitly with paths relative to the subset root. - Modality / channels: input images are RGB (3-channel) except
acdc_png(true grayscale) andmedsegdb_kits19(grayscale content, 3-channel container).
Mask encoding
Masks are single-channel uint8 label maps with values 0 … C-1
(0 = background), not 0/255. Semantic meaning per index (confirmed against each
subset's metadata.json and the standardization scripts):
| Subset | Class indices |
|---|---|
cvc_clinicdb, kvasir_seg |
0 background · 1 polyp |
fives |
0 background · 1 vessel |
busi |
0 background · 1 tumor (multi-instance masks merged) |
medsegdb_isic2018 |
0 background · 1 lesion |
medsegdb_kits19 |
0 background · 1 foreground (kidney region, binary) |
refuge2 |
0 background · 1 optic disc · 2 optic cup |
acdc_png |
0 background · 1 right ventricle · 2 myocardium · 3 left ventricle |
idridd_segmentation |
0 background · 1 microaneurysms · 2 haemorrhages · 3 hard exudates · 4 soft exudates · 5 optic disc |
pannuke_semantic |
0 background · 1 neoplastic · 2 inflammatory · 3 connective · 4 dead · 5 epithelial |
Usage
Download & extract a subset
from huggingface_hub import hf_hub_download
import tarfile
p = hf_hub_download("GenSegDataset/GenSegDataset", "cvc_clinicdb.tar", repo_type="dataset")
tarfile.open(p).extractall("GenSegDataset") # -> GenSegDataset/cvc_clinicdb/...
Direct file access (after extraction)
import cv2, glob, os
root = "GenSegDataset/cvc_clinicdb/official/train"
img = cv2.imread(f"{root}/images/0001.png") # RGB input
msk = cv2.imread(f"{root}/masks/0001.png", cv2.IMREAD_GRAYSCALE) # label map 0..C-1
With datasets (once the Parquet/loader build is published)
from datasets import load_dataset
ds = load_dataset("GenSegDataset/GenSegDataset", "cvc_clinicdb") # config = subset
sample = ds["train"][0] # {"image": PIL.Image, "mask": PIL.Image, ...}
The
datasets-loadable build (Parquet with embedded image/mask + a config per subset) is added on top of the raw file mirror; until then use direct file access.
Standardization methodology
All subsets were converted to the unified layout above with a shared pipeline:
- Format unification — images/masks re-encoded to
.png; masks remapped to a contiguous0 … C-1label space. - Fixed, reproducible splits — official splits used where they exist
(
cvc_clinicdb,kvasir_seg,fives,refuge2,acdc_png); otherwise fixed k-fold (busi,idridd_segmentation,medsegdb_kits19: 5-fold;pannuke_semantic: official 3-fold) or a fixed holdout (medsegdb_isic2018). Splits are frozen inmanifest.jsonlso results are reproducible. - Metadata — each subset carries
metadata.jsonand a per-imagemanifest.jsonl.
The collection was assembled to benchmark (a) 2D segmentation backbones and (b) generative, mask-conditioned data-augmentation methods under one consistent interface.
Licensing & Attribution
This repository contains standardized derivatives of the datasets below. Each subset is governed by its original license; users must comply with the source terms and cite the original publications. Source links:
| Subset | Source |
|---|---|
cvc_clinicdb |
CVC-ClinicDB (Bernal et al., 2015) |
kvasir_seg |
Kvasir-SEG (Jha et al., 2020) |
fives |
FIVES (Jin et al., 2022) |
busi |
BUSI (Al-Dhabyani et al., 2020) |
refuge2 |
REFUGE / REFUGE2 (Orlando et al., 2020; Fang et al., 2022) |
acdc_png |
ACDC (Bernard et al., 2018) |
idridd_segmentation |
IDRiD (Porwal et al., 2018, 2020) |
pannuke_semantic |
PanNuke (Gamper et al., 2019, 2020) |
medsegdb_isic2018 |
ISIC 2018 / HAM10000 (Codella et al., 2019; Tschandl et al., 2018) |
medsegdb_kits19 |
KiTS19 (Heller et al., 2019, 2021) |
Citation
If you use GenSegDataset, please cite this collection and the original source dataset(s) you use.
@misc{gensegdataset2026,
title = {GenSegDataset: A Unified 2D Medical Image Segmentation Benchmark},
author = {<authors>},
year = {2026},
howpublished = {Hugging Face Datasets},
note = {Standardized collection of 10 public 2D medical segmentation datasets}
}
Original-source BibTeX (please verify before camera-ready)
@article{bernal2015cvcclinicdb,
title={WM-DOVA maps for accurate polyp highlighting in colonoscopy},
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},
journal={Computerized Medical Imaging and Graphics}, volume={43}, pages={99--111}, year={2015}}
@inproceedings{jha2020kvasirseg,
title={Kvasir-SEG: A segmented polyp dataset},
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},
booktitle={MultiMedia Modeling (MMM)}, year={2020}}
@article{jin2022fives,
title={FIVES: A fundus image dataset for artificial intelligence based vessel segmentation},
author={Jin, Kai and Huang, Xingru and Zhou, Jingxing and others},
journal={Scientific Data}, volume={9}, year={2022}}
@article{aldhabyani2020busi,
title={Dataset of breast ultrasound images},
author={Al-Dhabyani, Walid and Gomaa, Mohammed and Khaled, Hussien and Fahmy, Aly},
journal={Data in Brief}, volume={28}, year={2020}}
@article{orlando2020refuge,
title={REFUGE Challenge: A unified framework for evaluating automated methods for glaucoma assessment from fundus photographs},
author={Orlando, Jos{\'e} Ignacio and Fu, Huazhu and others},
journal={Medical Image Analysis}, volume={59}, year={2020}}
@article{bernard2018acdc,
title={Deep learning techniques for automatic MRI cardiac multi-structures segmentation and diagnosis: Is the problem solved?},
author={Bernard, Olivier and Lalande, Alain and others},
journal={IEEE Transactions on Medical Imaging}, volume={37}, number={11}, year={2018}}
@article{porwal2020idrid,
title={IDRiD: Diabetic retinopathy -- segmentation and grading challenge},
author={Porwal, Prasanna and Pachade, Samiksha and others},
journal={Medical Image Analysis}, volume={59}, year={2020}}
@article{gamper2020pannuke,
title={PanNuke dataset extension, insights and baselines},
author={Gamper, Jevgenij and Koohbanani, Navid Alemi and others},
journal={arXiv:2003.10778}, year={2020}}
@article{codella2019isic2018,
title={Skin lesion analysis toward melanoma detection 2018: A challenge hosted by the ISIC},
author={Codella, Noel and Rotemberg, Veronica and others},
journal={arXiv:1902.03368}, year={2019}}
@article{tschandl2018ham10000,
title={The HAM10000 dataset, a large collection of multi-source dermatoscopic images of common pigmented skin lesions},
author={Tschandl, Philipp and Rosendahl, Cliff and Kittler, Harald},
journal={Scientific Data}, volume={5}, year={2018}}
@article{heller2021kits19,
title={The state of the art in kidney and kidney tumor segmentation in contrast-enhanced CT imaging: Results of the KiTS19 challenge},
author={Heller, Nicholas and Isensee, Fabian and others},
journal={Medical Image Analysis}, volume={67}, year={2021}}
Maintenance notes
- Class indices/names above were confirmed from each subset's
metadata.json, the actual mask label values, and the standardization scripts (tools/process_downloaded_segmentation_datasets.py). Most subsets'metadata.jsonomits an explicitnum_classes/modalityfield (the twomedsegdb_*subsets include them). - Read
acdc_pngandmedsegdb_kits19as grayscale even though some files are stored as 3-channel containers.
- Downloads last month
- 31