You need to agree to share your Hugging Face information to access this dataset

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

PanNuke is released by its authors under CC BY-NC-SA 4.0 for research purposes only. By requesting access you agree to those terms, to cite the PanNuke papers, and to share any derivative under the same licence.

Log in or Sign Up to review the conditions and access this dataset content.

PanNuke in the nuclei store format

A faithful conversion of the PanNuke dataset (Gamper and others, 2019 and 2020) into one store format shared by several nuclei datasets: images and masks in sharded Zarr, one row per image and one row per nucleus in Parquet. Every pixel, every instance and every class label was checked equal to the original fold files on 31-10-2026. The original data, its licence and its citation requirements are unchanged.

Source and licence

  • Source: PanNuke, Tissue Image Analytics centre, University of Warwick, https://warwick.ac.uk/fac/cross_fac/tia/data/pannuke, folds 1 to 3 as distributed.
  • Licence: CC BY-NC-SA 4.0, research purposes only, as stated on the source page. This copy carries the same licence. Commercial use is not allowed.
  • Cite, as the source asks: Gamper, J., Koohbanani, N. A., Benet, K., Khuram, A., Rajpoot, N. (2019). PanNuke: an open pan-cancer histology dataset for nuclei instance segmentation and classification. European Congress on Digital Pathology, 11 to 19. Gamper, J., Koohbanani, N. A., Graham, S., Jahanifar, M., Khurram, S. A., Azam, A., Hewitt, K., Rajpoot, N. (2020). PanNuke dataset extension, insights and baselines. arXiv:2003.10778.

What changed in the conversion

  • Pixels: PanNuke stores images as float64; they are rounded and clipped to uint8. No resampling.
  • Masks: PanNuke stores one instance channel per class (six channels, the last being background). They are merged into one instance map: a pixel in two class channels goes to the later channel, and a nucleus left with no pixel is dropped. The class of each nucleus is its channel. The store holds 189,744 nuclei in 7,901 images.
  • Tissue type and fold are kept per image. Folds are named fold1, fold2 and fold3 by their image counts (2,656, 2,523 and 2,722), as the organisers numbered them.
  • Pixel size: PanNuke states 40x and no pixel size; the store records 0.25 um/px with the origin assumed and that evidence, so nothing pretends to know more than the source.

Layout

native/pannuke/card.json        what the dataset is: source, licence, scale and its
                                evidence, label origin, class names, arrays present
native/pannuke/data.zarr        Zarr v3, sharded, Zstd level 3, CRC32C checksums
    images     uint8  (7901, 3, 256, 256)   RGB
    instances  uint32 (7901, 256, 256)      0 background, one id per nucleus per image
native/pannuke/images.parquet   one row per image
native/pannuke/objects.parquet  one row per nucleus (GeoParquet, point geometry)
views/pannuke_split1.parquet    the organisers' split 1: fold1 train, fold2 validation,
                                fold3 test
views/pannuke_split2.parquet    split 2: fold2 train, fold1 validation, fold3 test
views/pannuke_split3.parquet    split 3: fold3 train, fold2 validation, fold1 test

images.parquet columns: image (row number, the index into the arrays), key (foldN/NNNN), height, width, um_per_px, split, patient (not reported by PanNuke), slide (not reported), organ (the tissue type as PanNuke spells it), group, annotated_classes, label_origin, intensity_low and intensity_high (per-channel percentiles), and parent_image, parent_x, parent_y, parent_scale (not applicable in the native tier).

objects.parquet columns: image, object (the nucleus's id in instances), native_class, label_origin, x_min, y_min, x_max, y_max (bounding box in pixels) and geometry (the nucleus centre, WKB).

Class names are PanNuke's own, never regrouped. A class code is the position in card.json's native_classes, counted from 1; 0 means no class:

code native_class nuclei
1 neoplastic 77,403
2 inflammatory 32,276
3 connective 50,585
4 dead 2,908
5 epithelial 26,572

Images per organ and fold:

organ fold1 fold2 fold3
Adrenal_gland 134 148 155
Bile-duct 159 103 158
Bladder 21 61 64
Breast 827 749 775
Cervix 155 52 86
Colon 478 468 494
Esophagus 155 128 141
HeadNeck 70 169 145
Kidney 37 56 41
Liver 65 66 93
Lung 80 53 51
Ovarian 54 40 52
Pancreatic 78 89 28
Prostate 77 37 68
Skin 59 87 41
Stomach 50 48 48
Testis 60 79 57
Thyroid 80 84 62
Uterus 17 6 163

Nuclei per image: minimum 0, median 20, maximum 289; 343 images hold no nucleus, which the PanNuke evaluation protocol skips for binary PQ.

Reading the store

With zarr (3.x) and pandas:

import pandas as pd
import zarr

root = zarr.open_group("native/pannuke/data.zarr", mode="r")
image = root["images"][0]          # (3, 256, 256) uint8
instances = root["instances"][0]   # (256, 256) uint32
images = pd.read_parquet("native/pannuke/images.parquet")
objects = pd.read_parquet("native/pannuke/objects.parquet")
classes = objects[objects["image"] == 0].set_index("object")["native_class"]

With pathomix[nuclei-datasets], the package this format belongs to, a store opens with Store.open, a view loads with load_role, and a PyTorch loader comes from pathomix.nuclei.datasets.loading. The package's patches tier is the native tier for PanNuke, since its images already are 256 px patches at the recorded scale; copy native/pannuke to patches/pannuke when a tool expects that tier.

Limits

  • Labels are PanNuke's semi-automatic labels checked by pathologists, with their known imperfections; nothing was corrected.
  • The pixel size is assumed, not measured.
  • Models trained on this data inherit the non-commercial licence.
Downloads last month
16

Paper for saahilw/nuclei-pannuke