Dataset Viewer
Auto-converted to Parquet Duplicate
id
stringlengths
28
31
image
unknown
inst
unknown
type
unknown
sem
unknown
specimen_type
stringclasses
2 values
mpp_x
float64
0.23
0.23
mpp_y
float64
0.23
0.23
training_set_metastatic_roi_001
"iVBORw0KGgoAAAANSUhEUgAABAAAAAQACAIAAADwf7zUAAEAAElEQVR4nCz9Wa8sybUmiNmy2dw9xj2cIZPJJHl5h25Uq6sFSAU(...TRUNCATED)
"iVBORw0KGgoAAAANSUhEUgAABAAAAAQAEAAAAAAK5qgcAADZaElEQVR4nO2dB7gsRbW2u8ejGFAxgBEjJhQDZtRrzglzzpi9Zsz(...TRUNCATED)
"iVBORw0KGgoAAAANSUhEUgAABAAAAAQACAAAAABadnRfAACTNElEQVR4nO19iY7suspuqFNq/Xn/h83Vkra46q4pgwfAgHFS35b(...TRUNCATED)
"iVBORw0KGgoAAAANSUhEUgAABAAAAAQACAAAAABadnRfAAAP2ElEQVR4nO3d227cxhZFUSmt//9jAgd2cpxYkWQ5Nlm7OMdAXhL(...TRUNCATED)
metastatic
0.226316
0.226321
training_set_metastatic_roi_002
"iVBORw0KGgoAAAANSUhEUgAABAAAAAQACAIAAADwf7zUAAEAAElEQVR4nGz9R5NtWbYmCk0tltrbt4ujQqS4eS+3qCp4BY9qYTT(...TRUNCATED)
"iVBORw0KGgoAAAANSUhEUgAABAAAAAQAEAAAAAAK5qgcAAEAAElEQVR4nOxdBbw3RdXe3ftiB9iCioEK2CJidxd2Yetni4WF3d3(...TRUNCATED)
"iVBORw0KGgoAAAANSUhEUgAABAAAAAQACAAAAABadnRfAACzhklEQVR4nO19i5bjKs6uVTsn/f6P2/7XtM6qXG0jga6AU/XNrN2(...TRUNCATED)
"iVBORw0KGgoAAAANSUhEUgAABAAAAAQACAAAAABadnRfAAASyElEQVR4nO3d7XYTx7ZAUWRz3/+JGb4Dm3Aw2JbU6paqas357yQ(...TRUNCATED)
metastatic
0.226891
0.226907
training_set_metastatic_roi_003
"iVBORw0KGgoAAAANSUhEUgAABAAAAAQACAIAAADwf7zUAAEAAElEQVR4nFz9244kV5aui83zNDN3j8gki1Xda21IFxvrTvd6Nj2(...TRUNCATED)
"iVBORw0KGgoAAAANSUhEUgAABAAAAAQAEAAAAAAK5qgcAADKzUlEQVR4nO2dCbx+1fT/z/m6yDwVEZlSSCpDxmTob8iXKBkyVIp(...TRUNCATED)
"iVBORw0KGgoAAAANSUhEUgAABAAAAAQACAAAAABadnRfAACM+0lEQVR4nO1dic4jO6ou0lG///O2dIZR9lq8sBtX8t2rM/0nKRt(...TRUNCATED)
"iVBORw0KGgoAAAANSUhEUgAABAAAAAQACAAAAABadnRfAAASuUlEQVR4nO3d2Y4byRFAUVHQ/3/xADZGo1m61dxq6WbGPefNsD0(...TRUNCATED)
metastatic
0.226891
0.226907
training_set_metastatic_roi_004
"iVBORw0KGgoAAAANSUhEUgAABAAAAAQACAIAAADwf7zUAAEAAElEQVR4nFz9iY4kSZKmCfLNIqKqZu4RmVnVx8xisMBggX2GfaZ(...TRUNCATED)
"iVBORw0KGgoAAAANSUhEUgAABAAAAAQAEAAAAAAK5qgcAAD85klEQVR4nO2dB7g0R3G1Z5aLDYiMyCBAiJxzTgJERmQDJmeRo7G(...TRUNCATED)
"iVBORw0KGgoAAAANSUhEUgAABAAAAAQACAAAAABadnRfAACnIklEQVR4nO09i44rOapFT9TS/P/HjpSrFVfdedXD2LxNJY12z3S(...TRUNCATED)
"iVBORw0KGgoAAAANSUhEUgAABAAAAAQACAAAAABadnRfAAAMHElEQVR4nO3UMQEAMAyAsHb+RU9GDxIFXOwOUPWuA4A7BgBhBgB(...TRUNCATED)
metastatic
0.226316
0.226321
training_set_metastatic_roi_005
"iVBORw0KGgoAAAANSUhEUgAABAAAAAQACAIAAADwf7zUAAEAAElEQVR4nDz96Y4lSZYmiB3ZRVT13mtm7uERkUtVdVf1Mo0hQAw(...TRUNCATED)
"iVBORw0KGgoAAAANSUhEUgAABAAAAAQAEAAAAAAK5qgcAACGVElEQVR4nO2dB7xtV1Wv1765oQQJAUIRDAkgVVGKNCMoIEhRBNE(...TRUNCATED)
"iVBORw0KGgoAAAANSUhEUgAABAAAAAQACAAAAABadnRfAABkkUlEQVR4nO1di47sKg4MmSjS/f+PXSnqblZnnp2EhwEbbOOSdu+(...TRUNCATED)
"iVBORw0KGgoAAAANSUhEUgAABAAAAAQACAAAAABadnRfAAAVq0lEQVR4nO3d23IbR4JF0WRD///HFZiwPO22RIkicavM3Gu9zbR(...TRUNCATED)
metastatic
0.226316
0.226321
training_set_metastatic_roi_006
"iVBORw0KGgoAAAANSUhEUgAABAAAAAQACAIAAADwf7zUAAEAAElEQVR4nEz96ZIlSZbnh+muZndzj8jIzOqq6RZAIAKKUPAZL8E(...TRUNCATED)
"iVBORw0KGgoAAAANSUhEUgAABAAAAAQAEAAAAAAK5qgcAAB3PUlEQVR4nO2dB7htV1W2175ciNQAAQEpAkLoBKVE/REEEUNQKWI(...TRUNCATED)
"iVBORw0KGgoAAAANSUhEUgAABAAAAAQACAAAAABadnRfAABYH0lEQVR4nO2d6W4cuQ5Giw1jgLz/wxrID3OQ2LF7qUULl48UDy7(...TRUNCATED)
"iVBORw0KGgoAAAANSUhEUgAABAAAAAQACAAAAABadnRfAAAXP0lEQVR4nO3d7XLbVpZAUSLl939lTCV2Z2JbkvkBEPfevdaPruq(...TRUNCATED)
metastatic
0.226198
0.226198
training_set_metastatic_roi_007
"iVBORw0KGgoAAAANSUhEUgAABAAAAAQACAIAAADwf7zUAAEAAElEQVR4nEz96ZIkSZYuhunRXc3Ml4jIrKV7pi/uxlUuAcoV/uM(...TRUNCATED)
"iVBORw0KGgoAAAANSUhEUgAABAAAAAQAEAAAAAAK5qgcAACIeklEQVR4nO29B7xtV1mvPffOoYMgRULvShUpn4CoFMHQQo+IItK(...TRUNCATED)
"iVBORw0KGgoAAAANSUhEUgAABAAAAAQACAAAAABadnRfAABmZElEQVR4nO1d2bYkqQoNsnJl///ndq6uy11VZ8pBDQeGjbofuut(...TRUNCATED)
"iVBORw0KGgoAAAANSUhEUgAABAAAAAQACAAAAABadnRfAAAX7UlEQVR4nO3d7XYaSbKGUSPr/u9Yi1nttqdliY8CKisj8t37z5k(...TRUNCATED)
metastatic
0.226891
0.226907
training_set_metastatic_roi_008
"iVBORw0KGgoAAAANSUhEUgAABAAAAAQACAIAAADwf7zUAAEAAElEQVR4nMz9iZYjyZUlCMqTVRcAZuYeHkEyq7J6zvzM/NB8SH/(...TRUNCATED)
"iVBORw0KGgoAAAANSUhEUgAABAAAAAQAEAAAAAAK5qgcAABAwElEQVR4nO3dC7i1aV0X4PWNk6EWlmZRamqSpmVHRUvH0spDWWq(...TRUNCATED)
"iVBORw0KGgoAAAANSUhEUgAABAAAAAQACAAAAABadnRfAAAyU0lEQVR4nO3d2Y7jOBJGYbFQU4Df/2ET6JsYpJ2LLWshKS6xnA+(...TRUNCATED)
"iVBORw0KGgoAAAANSUhEUgAABAAAAAQACAAAAABadnRfAAAgZElEQVR4nO3d63LbSLKFUTTh939jICbs9rhtWRdeAFRm7bXi/Dh(...TRUNCATED)
metastatic
0.226316
0.226321
training_set_metastatic_roi_009
"iVBORw0KGgoAAAANSUhEUgAABAAAAAQACAIAAADwf7zUAAEAAElEQVR4nDz9V5NsWZYeiG0tjnD3EFdkZlV2tcBgpkHCbF7wQhq(...TRUNCATED)
"iVBORw0KGgoAAAANSUhEUgAABAAAAAQAEAAAAAAK5qgcAADP3UlEQVR4nO2dB7gsRbW2u46bq2K4mBMY8JoVVMwBMWeuAVQEAyo(...TRUNCATED)
"iVBORw0KGgoAAAANSUhEUgAABAAAAAQACAAAAABadnRfAACKA0lEQVR4nO1d244kO6oNSqkj9f9/7JbmhaPuqsqMiy/cwZG5HmZ(...TRUNCATED)
"iVBORw0KGgoAAAANSUhEUgAABAAAAAQACAAAAABadnRfAAAMHElEQVR4nO3UMQEAMAyAsHb+RU9GDxIFXOwOUPWuA4A7BgBhBgB(...TRUNCATED)
metastatic
0.226891
0.226907
training_set_metastatic_roi_010
"iVBORw0KGgoAAAANSUhEUgAABAAAAAQACAIAAADwf7zUAAEAAElEQVR4nGz9WZNl2XUmiO15ONMd3D08InICEgBBsKZmDd1mJcl(...TRUNCATED)
"iVBORw0KGgoAAAANSUhEUgAABAAAAAQAEAAAAAAK5qgcAAB84klEQVR4nO2dCdyt53iv351uCVsMMSWGiBAxRdQYc1WjprboIVp(...TRUNCATED)
"iVBORw0KGgoAAAANSUhEUgAABAAAAAQACAAAAABadnRfAABgRUlEQVR4nO1d147kug40jcYF/P8f28DBonkxG2Y6OCgwFCXWwzk(...TRUNCATED)
"iVBORw0KGgoAAAANSUhEUgAABAAAAAQACAAAAABadnRfAAARoklEQVR4nO3d2XLbxhZAUcLl//9l3oqS+Eax5XDA0N17rZfkQbJ(...TRUNCATED)
metastatic
0.226316
0.226321
End of preview. Expand in Data Studio

PUMA

Overview

PUMA contains 206 H&E images of melanoma tissue, with masks for individual nuclei, ten nucleus classes and six tissue classes. Half the images come from primary melanomas and half from metastatic melanomas. Each image is 1024 × 1024 pixels.

Nucleus labels were made with model assistance and corrected by hand. Tissue regions were drawn by hand and reviewed by dermatopathologists. The data can be used to study cells and their surrounding tissue in melanoma.

License: CC0 1.0 Universal.

Files and splits

Split File Images
train puma.parquet 206

This is the public PUMA challenge training set. It has no separate validation or test split; the challenge's private evaluation images are not included. Patient IDs are unavailable, so image numbers alone cannot tell you whether two images come from the same patient. This matters when making your own training and test groups.

Fields

Each row contains one image and its masks, stored as PNG bytes. Images are 1024 × 1024 pixels with three colour channels; masks are 1024 × 1024 arrays.

Field Contents
id Original image name, such as training_set_metastatic_roi_001
image RGB colour image; uint8 values from 0 to 255
inst Numbered nucleus mask; uint16, with 0 for background
type Nucleus class mask; uint8, with 0 for background
sem Tissue class mask; uint8, with 0 for unannotated pixels
specimen_type primary or metastatic
mpp_x, mpp_y Physical pixel size in micrometres along each image axis

Nucleus numbers follow the original GeoJSON annotation order, starting at 1, and can have gaps. An annotation with several separate pieces keeps one number. type gives the class of each marked nucleus. These numbers are local to each image.

Image size and colour values are unchanged. Pixel sizes are approximately 0.2262–0.2274 µm; use mpp_x and mpp_y for measurements at the source scale.

Labels

Nucleus classes (type)

The original nucleus and tissue class names use the following integer labels.

Value Original class name
0 background (no nucleus)
1 nuclei_tumor
2 nuclei_stroma
3 nuclei_endothelium
4 nuclei_histiocyte
5 nuclei_melanophage
6 nuclei_lymphocyte
7 nuclei_plasma_cell
8 nuclei_neutrophil
9 nuclei_apoptosis
10 nuclei_epithelium

Tissue classes (sem)

Value Original class name
0 unannotated; ignore when training or scoring tissue masks
1 tissue_tumor
2 tissue_stroma
3 tissue_epidermis
4 tissue_necrosis
5 tissue_blood_vessel
6 tissue_white_background

White background is class 6. Unannotated tissue pixels are 0; leave them out when training or scoring tissue masks. In the nucleus masks, 0 means background.

Download and read a sample

from io import BytesIO

import numpy as np
import polars as pl
from huggingface_hub import hf_hub_download
from PIL import Image


def read_png(data: bytes) -> np.ndarray:
    """Decode RGB pixels or integer labels without reducing mask bit depth."""
    with Image.open(BytesIO(data)) as image:
        return np.array(image)


path = hf_hub_download(
    repo_id="csmp-hub/puma",
    repo_type="dataset",
    filename="puma.parquet",
)
row = pl.read_parquet(path, n_rows=1).row(0, named=True)
image = read_png(row["image"])
instances = read_png(row["inst"])
cell_types = read_png(row["type"])
tissue_types = read_png(row["sem"])

Plot examples

Continue from the loading example.

import matplotlib.pyplot as plt
from matplotlib.patches import Patch
from skimage.segmentation import find_boundaries

sample_ids = [
    "training_set_metastatic_roi_001",
    "training_set_primary_roi_005",
    "training_set_primary_roi_090",
]
samples = pl.scan_parquet(path).filter(pl.col("id").is_in(sample_ids)).collect()
nucleus_names = [
    "Tumor",
    "Stroma",
    "Endothelium",
    "Histiocyte",
    "Melanophage",
    "Lymphocyte",
    "Plasma cell",
    "Neutrophil",
    "Apoptosis",
    "Epithelium",
]
nucleus_colors = (
    np.array(
        [
            [0, 0, 0],
            [216, 62, 62],
            [52, 157, 110],
            [42, 159, 174],
            [150, 104, 200],
            [139, 95, 62],
            [55, 109, 219],
            [221, 134, 39],
            [209, 83, 156],
            [110, 110, 110],
            [199, 176, 51],
        ]
    )
    / 255
)
tissue_names = [
    "Tumor",
    "Stroma",
    "Epidermis",
    "Necrosis",
    "Blood vessel",
    "White background",
]
tissue_colors = (
    np.array(
        [
            [0, 0, 0],
            [224, 77, 74],
            [54, 164, 111],
            [76, 125, 218],
            [129, 98, 149],
            [229, 160, 51],
            [235, 235, 235],
        ]
    )
    / 255
)

fig, axes = plt.subplots(3, 3, figsize=(10, 11.4))
for row_axes, sample in zip(axes, samples.iter_rows(named=True)):
    image = read_png(sample["image"])
    instances = read_png(sample["inst"])
    cell_types = read_png(sample["type"])
    foreground = instances > 0
    overlay = image / 255
    overlay[foreground] = (
        0.65 * overlay[foreground] + 0.35 * nucleus_colors[cell_types[foreground]]
    )
    edges = find_boundaries(instances, mode="inner") & foreground
    overlay[edges] = nucleus_colors[cell_types[edges]]
    tissue_types = read_png(sample["sem"])
    tissue_overlay = image / 255
    annotated = tissue_types > 0
    tissue_overlay[annotated] = (
        0.45 * tissue_overlay[annotated] + 0.55 * tissue_colors[tissue_types[annotated]]
    )
    for ax, pixels in zip(row_axes, (image, overlay, tissue_overlay)):
        ax.imshow(pixels)
        ax.set_axis_off()
    row_axes[0].text(
        0,
        1.01,
        sample["id"].removeprefix("training_set_"),
        transform=row_axes[0].transAxes,
        fontsize=8,
    )

for ax, title in zip(
    axes[0], ["RGB image", "Nucleus annotations", "Tissue annotations"]
):
    ax.set_title(title, pad=16, fontsize=11)
fig.legend(
    handles=[
        Patch(facecolor=c, label=n) for c, n in zip(nucleus_colors[1:], nucleus_names)
    ],
    loc="lower center",
    bbox_to_anchor=(0.5, 0.045),
    ncol=5,
    frameon=False,
    fontsize=8,
    title="Nuclei",
)
fig.legend(
    handles=[
        Patch(facecolor=c, label=n) for c, n in zip(tissue_colors[1:], tissue_names)
    ],
    loc="lower center",
    bbox_to_anchor=(0.5, 0.003),
    ncol=6,
    frameon=False,
    fontsize=8,
    title="Tissue",
)
fig.subplots_adjust(
    left=0.01, right=0.99, top=0.95, bottom=0.13, hspace=0.14, wspace=0.025
)
plt.show()

Three PUMA examples with aligned annotation overlays

Each row shows the colour image and its marked nuclei, followed by the tissue labels.

Two examples without the image underneath. Black shows label 0: background in nucleus masks and unannotated areas in the tissue mask. Bright instance colours distinguish objects, not cell types. Class colours match the overlay examples above.

from skimage.color import label2rgb

instance_colors = [
    (1, 0.85, 0.2),
    (0.2, 1, 1),
    (1, 0.3, 0.8),
    (0.5, 1, 0.2),
    (0.65, 0.55, 1),
]
mask_samples = samples.to_dicts()
mask_samples = [mask_samples[0], mask_samples[-1]]
mask_layers = [
    ("inst", "Nucleus instances"),
    ("type", "Nucleus classes"),
    ("sem", "Tissue classes"),
]
mask_fig, mask_axes = plt.subplots(2, 3, figsize=(9.600000000000001, 8))
for row_axes, sample in zip(mask_axes, mask_samples):
    for column, (ax, (key, title)) in enumerate(zip(row_axes, mask_layers)):
        labels = read_png(sample[key])
        if key == "type":
            pixels = nucleus_colors[labels]
        elif key == "sem":
            pixels = tissue_colors[labels]
        else:
            pixels = label2rgb(
                labels, colors=instance_colors, bg_label=0, bg_color=(0, 0, 0)
            )
        ax.imshow(pixels, interpolation="nearest")
        ax.set_axis_off()
    label = sample["id"]
    row_axes[0].text(0, 1.02, label, transform=row_axes[0].transAxes, fontsize=8)
for ax, (_, title) in zip(mask_axes[0], mask_layers):
    ax.set_title(title, fontsize=10, pad=18)
mask_fig.subplots_adjust(
    left=0.01, right=0.99, bottom=0.02, top=0.94, hspace=0.16, wspace=0.03
)
plt.show()

Two examples of the annotation masks without image backgrounds

Preparation and validation

Prepared from the PUMA dataset, version 5. The original nucleus and tissue outlines are included as GeoJSON archives.

The outlines were converted to pixel masks, keeping holes and separate pieces. Where outlines overlap, the later annotation wins. Pixels outside tissue outlines stay unannotated. Original image colour values are kept. Further conversion details are in manifest.json.

Limitations

The source has 97,429 nucleus outlines; the pixel masks contain 97,423. Two outlines cover no pixel centres, and four are completely covered by later outlines. All six remain in the original GeoJSON archive; their IDs are listed in manifest.json.

Four source outlines have geometry errors and are kept as supplied. Use the original outlines when you need overlapping objects or every source annotation.

Tissue value 0 is unannotated; leave these pixels out when training or scoring tissue masks. White background is a labelled class with value 6. There are no whole-cell or cytoplasm masks. Larger unannotated 5120 × 5120 context images are available from the original release.

License and citation

The data use CC0 1.0 Universal. Please credit Mark Schuiveling and contributing curators Willeke Blokx and Gerben Breimer at University Medical Center Utrecht, and cite the dataset and paper:

  • Schuiveling et al. (2025). A novel dataset for nuclei and tissue segmentation in melanoma with baseline nuclei segmentation and tissue segmentation benchmarks. GigaScience, 14, giaf011. Paper.
  • Schuiveling, M. (2025). Melanoma Histopathology Dataset with Tissue and Nuclei Annotations, version 5. Dataset DOI.
  • PUMA challenge.
Downloads last month
77