Dataset Viewer
Auto-converted to Parquet Duplicate
id
stringlengths
38
43
image
unknown
inst
unknown
type
unknown
sem
unknown
core_id
stringclasses
55 values
patient_id
stringclasses
11 values
source_split
stringclasses
1 value
x
int32
0
1.41k
y
int32
0
928
mpp
float64
0.38
0.38
partial_instance_ids
listlengths
0
81
source_license
stringclasses
1 value
source_mask_kind
stringclasses
1 value
quality_status
stringclasses
2 values
human_training_approved
bool
1 class
ignored_regions
listlengths
0
0
skip_training
bool
1 class
phillips2021immune_bsrmsvtc_0000_x0_y0
"iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAIAAAB7GkOtAAEAAElEQVR4nDT9iZIcSZauiemuZu4RASCzqruGc0VIkXn/Z+EbUMj(...TRUNCATED)
"iVBORw0KGgoAAAANSUhEUgAAAgAAAAIAEAAAAACBg1dlAAApU0lEQVR4nO2dDaxcZZ3GX6SFLsgiqEviyiZ0lxhQdxE0jWti2W4(...TRUNCATED)
"iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAAAAADRE4smAAAeR0lEQVR4nO1d247bOBKVOwGCFdFuYCBN///neSQMEGeo3XlIsvB(...TRUNCATED)
null
phillips2021immune_bsrmsvtc_0000
bsrmsvtc
train
0
0
0.37744
[ 8, 18, 47, 167, 223, 233, 234, 237, 242, 243, 248 ]
CC BY 4.0
original cell regions
unreviewed
null
[]
false
phillips2021immune_bsrmsvtc_0000_x128_y0
"iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAIAAAB7GkOtAAEAAElEQVR4nET9+ZMlWXbfid39ur8llsyspRuNxjocAUOjKHFEiRz(...TRUNCATED)
"iVBORw0KGgoAAAANSUhEUgAAAgAAAAIAEAAAAACBg1dlAAA5bklEQVR4nO2dC8xeVZnv1y5fobRgp1Vo5CKnjIboCCJiEPUABwN(...TRUNCATED)
"iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAAAAADRE4smAAAnhUlEQVR4nO1d247jOA5VpRtojIVKA4t46v8/rybGAJ1eZXYeumu(...TRUNCATED)
null
phillips2021immune_bsrmsvtc_0000
bsrmsvtc
train
128
0
0.37744
[ 8, 18, 47, 167, 242, 270, 293, 304, 320, 336, 338, 339, 341, 344, 345 ]
CC BY 4.0
original cell regions
unreviewed
null
[]
false
phillips2021immune_bsrmsvtc_0000_x256_y0
"iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAIAAAB7GkOtAAEAAElEQVR4nDz96bMt63bWib19Zs65ut2c5ja6kpAACwiMTZkwlMP(...TRUNCATED)
"iVBORw0KGgoAAAANSUhEUgAAAgAAAAIAEAAAAACBg1dlAAA9X0lEQVR4nO2dC8wlVZXv9/7sbpvm0QIXidiOQiRGJ47gI4yPES7(...TRUNCATED)
"iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAAAAADRE4smAAAom0lEQVR4nO1da4/jts72TAdYNMRMgYOk/f8/b5ugQGfBnFPgLfZ(...TRUNCATED)
null
phillips2021immune_bsrmsvtc_0000
bsrmsvtc
train
256
0
0.37744
[ 52, 55, 57, 167, 242, 270, 293, 304, 320, 360, 388, 403, 418 ]
CC BY 4.0
original cell regions
unreviewed
null
[]
false
phillips2021immune_bsrmsvtc_0000_x384_y0
"iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAIAAAB7GkOtAAEAAElEQVR4nDz9ac8ta5rfCd1zRKz1THs4Q2ZlZY1tU27LGNwY7Ea(...TRUNCATED)
"iVBORw0KGgoAAAANSUhEUgAAAgAAAAIAEAAAAACBg1dlAAAyrElEQVR4nO2dbcxmVX3u13p8mDOMwAgUDDjUjpEQ21iB40ilrZA(...TRUNCATED)
"iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAAAAADRE4smAAAiBElEQVR4nO1dC4sjOQ6u7m0YLqJ7YUm4///zhoSF6cG5G7hljjw(...TRUNCATED)
null
phillips2021immune_bsrmsvtc_0000
bsrmsvtc
train
384
0
0.37744
[ 125, 142, 143, 146, 148, 149, 167, 242, 270, 293, 304, 320, 360, 388, 403, 455, 497, 506 ]
CC BY 4.0
original cell regions
unreviewed
null
[]
false
phillips2021immune_bsrmsvtc_0000_x512_y0
"iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAIAAAB7GkOtAAEAAElEQVR4nET92bNt2ZXeh81+rb1Pe5u82QGJQrWsYpkqizZtUQ4(...TRUNCATED)
"iVBORw0KGgoAAAANSUhEUgAAAgAAAAIAEAAAAACBg1dlAAAl70lEQVR4nO2dX6wtVX3HZx0vN3AFroBg9EKV1L74UI0RU1CpiYn(...TRUNCATED)
"iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAAAAADRE4smAAAYXUlEQVR4nO1d2Y4kqQ6lqlNqTSL109T/f2DNU0vOq5amNFeZlUs(...TRUNCATED)
null
phillips2021immune_bsrmsvtc_0000
bsrmsvtc
train
512
0
0.37744
[ 223, 233, 234, 237, 242, 243, 248, 270, 293, 304, 320, 360, 388, 403, 455, 497, 539, 554 ]
CC BY 4.0
original cell regions
unreviewed
null
[]
false
phillips2021immune_bsrmsvtc_0000_x640_y0
"iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAIAAAB7GkOtAAEAAElEQVR4nEz9Wa9tWXqmh412zrXPiTYzmW2RRVZJKlm2b/wvDfj(...TRUNCATED)
"iVBORw0KGgoAAAANSUhEUgAAAgAAAAIAEAAAAACBg1dlAAAV5klEQVR4nO3dTah1V3kH8L1P34YUWmNFMjEZOXMoWOg4A6eiCJq(...TRUNCATED)
"iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAAAAADRE4smAAAO0klEQVR4nO2d22ojOxBFO7Zh4Ajy5v//QL8FNDCQwMFOHPdF90u(...TRUNCATED)
null
phillips2021immune_bsrmsvtc_0000
bsrmsvtc
train
640
0
0.37744
[ 336, 338, 339, 341, 344, 345, 360, 388, 403, 455, 497, 539, 554, 614, 631 ]
CC BY 4.0
original cell regions
unreviewed
null
[]
false
phillips2021immune_bsrmsvtc_0000_x768_y0
"iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAIAAAB7GkOtAAEAAElEQVR4nET9iZYkyXFtiepsHlkAb3f///eRQKEAEENluJlOb+2(...TRUNCATED)
"iVBORw0KGgoAAAANSUhEUgAAAgAAAAIAEAAAAACBg1dlAAAPu0lEQVR4nO3dP6/k1n0G4BlikVYIEKixValTKcAGUqtQHajTCqk(...TRUNCATED)
"iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAAAAADRE4smAAAK0ElEQVR4nO3dTXObuhoAYNvJTBda9///wLvWIovM3Glz0jopoG8(...TRUNCATED)
null
phillips2021immune_bsrmsvtc_0000
bsrmsvtc
train
768
0
0.37744
[ 418, 455, 497, 539, 554, 614, 687, 718, 726 ]
CC BY 4.0
original cell regions
unreviewed
null
[]
false
phillips2021immune_bsrmsvtc_0000_x896_y0
"iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAIAAAB7GkOtAAEAAElEQVR4nET92ZIs2ZVtie1ezU8AN4svfKj//6J6pAhFihQhEz2(...TRUNCATED)
"iVBORw0KGgoAAAANSUhEUgAAAgAAAAIAEAAAAACBg1dlAAAPpklEQVR4nO3dz4okx4EH4OooefAaw+5lLuvLwggMA7roFfQERje(...TRUNCATED)
"iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAAAAADRE4smAAAKvUlEQVR4nO3dy5KbuhYAUJI+VRlonP//wIw1yCBVt+5JctId89A(...TRUNCATED)
null
phillips2021immune_bsrmsvtc_0000
bsrmsvtc
train
896
0
0.37744
[ 497, 506, 539, 554, 614, 687, 736, 759, 780, 794, 807, 813 ]
CC BY 4.0
original cell regions
unreviewed
null
[]
false
phillips2021immune_bsrmsvtc_0000_x1024_y0
"iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAIAAAB7GkOtAAEAAElEQVR4nET9iZYkx5Vlicqoah5gVv3//9XrJAmALCaJcFMZ39p(...TRUNCATED)
"iVBORw0KGgoAAAANSUhEUgAAAgAAAAIAEAAAAACBg1dlAAAUcklEQVR4nO3dO6hs12EG4NHsa2PFLgKOwbgKSCC4Qk1Qb5ArN4Y(...TRUNCATED)
"iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAAAAADRE4smAAANZ0lEQVR4nO3dyW7cOBCAYdoIYCB19vs/YM41gG8DJ47TalHclyL(...TRUNCATED)
null
phillips2021immune_bsrmsvtc_0000
bsrmsvtc
train
1,024
0
0.37744
[ 554, 614, 687, 736, 759, 780, 820, 841, 861, 872, 884, 892, 893 ]
CC BY 4.0
original cell regions
unreviewed
null
[]
false
phillips2021immune_bsrmsvtc_0000_x1152_y0
"iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAIAAAB7GkOtAAEAAElEQVR4nDz92ZYkyXVli0qrah4J1vn/f7tv54yqYiIBkAAi3FT(...TRUNCATED)
"iVBORw0KGgoAAAANSUhEUgAAAgAAAAIAEAAAAACBg1dlAAAYvElEQVR4nO3dPchc153H8Tv3PDGRIohBCWxSLdgQiAkGy33Abuz(...TRUNCATED)
"iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAAAAADRE4smAAAP+klEQVR4nO3dy27jOBBAUdsI0EBq7fn/72uvK4B3g+44iW3xUSS(...TRUNCATED)
null
phillips2021immune_bsrmsvtc_0000
bsrmsvtc
train
1,152
0
0.37744
[ 631, 687, 736, 759, 780, 820, 841, 861, 872, 893, 973, 974, 977, 981, 993 ]
CC BY 4.0
original cell regions
unreviewed
null
[]
false
End of preview. Expand in Data Studio

Phillips CTCL

H&E images of skin biopsies from people with cutaneous T-cell lymphoma, with cell-region instance masks and cell types from paired CODEX imaging. The source study examined how the arrangement of immune and tumour cells relates to response to pembrolizumab. This dataset contains 69 paired tissue regions from 14 patients.

The data is licensed under CC BY 4.0. Credit Phillips and colleagues and SPORA, link the license and describe any changes. The original license and citation are included as LICENSE and reference.bib.

Images and annotations

Images keep their original RGB values at 0.37744 micrometres per pixel. Each crop is 512 × 512 pixels. Crops start 128 pixels apart, with the final row and column placed against the core edge. Each 1,440 × 1,920-pixel core contributes 108 overlapping crops.

The instance masks keep the original cell-region IDs. Use core_id and the instance ID together to identify a cell across crops.

The 23 cell types retain the source table's new_cluster names. They include T-cell groups, B cells, plasma cells, macrophages, dendritic cells, Langerhans cells, mast cells, neutrophils, stromal cells, epithelium and tumour cells. Here, tumour cells are malignant T cells; they should not be treated as epithelial tumour cells. classes.json maps the names to mask codes. Background is zero; 255 is reserved for unknown labels.

There are 107,331 distinct cells in the masks. The source cell table contains 9,839 additional cell records without an object in the exported masks. These records are retained with present_in_mask=false in cell-annotations.parquet.

H&E, cell-region boundaries, instance masks and cell-type masks

Instance colours distinguish cell regions. Cell-type colours follow the legend. Black is background.

Cell-type instance counts

These counts include only cells present in the crop masks. Each source cell is counted once using its slide and original instance ID, even when crops overlap. Partial cells at crop edges are included. Counts include all quality flags; Unknown and source quality labels remain separate from biological classes.

Unique source instances per cell type

Original class Train Test Unique total Crop appearances
B cells 1,755 284 2,039 26,219
CD4+ T cells 848 278 1,126 14,800
CD8+ T cells 3,742 947 4,689 60,536
CLA+ leukocytes 117 54 171 2,242
DCs, CD11c+ 30 144 174 2,117
IDO+ stromal cells 173 15 188 2,500
Langerhans cells 1,337 231 1,568 19,223
PD1+CD4+ T cells 271 115 386 4,788
PD1+CD8+ T cells 148 178 326 3,831
Tregs 6,863 579 7,442 91,763
epithelium 9,779 5,483 15,262 189,546
lymphatics 479 197 676 8,430
macrophages (M1=M2) 3,266 672 3,938 49,044
macrophages (M1>M2) 10,432 2,137 12,569 157,305
macrophages (M2>M1) 843 815 1,658 20,523
mast cells 479 98 577 7,567
nerves 418 86 504 5,883
neutrophils 321 74 395 5,442
plasma cells 563 120 683 8,670
stroma 7,344 2,510 9,854 123,904
tumor cells 25,686 11,042 36,728 465,815
tumor cells, intraepithelial 652 632 1,284 16,832
vasculature 4,046 1,048 5,094 66,267
Unknown 0 0 0 0
Total 79,592 27,739 107,331 1,353,247

instance-counts.csv has one row per crop in train.parquet or test.parquet. Match id to the crop row; source_file names its Parquet file. It records total_instances and one class:<original name> column per class, including zero counts. It also includes the split, slide, patient, crop position, review status and skip_training flag. Background is not counted. Within a crop, each instance ID counts once. Summing rows counts a cell again wherever it appears in overlapping crops; the unique totals above avoid this.

Splits

The original patient splits are retained. Repeat biopsies from the same patient stay together. Do not split overlapping crops into different partitions.

Split Crops Tissue regions Patients
Train 5,940 55 11
Test 1,512 14 3
Total 7,452 69 14

Annotation quality

These are source annotations and may miss cells or have imperfect boundaries. A visual review of 24 selected training crops found all 24 usable, with good image-to-mask alignment. These crops have quality_status="usable" and human_training_approved=true. The remaining 7,428 crops are unreviewed and have null approval. All test crops remain unreviewed.

No rejected areas were marked, so no crops are flagged for skipping. skip_training=false does not imply visual approval. Review applies to the exact inspected crops; overlapping crops are not automatically approved. The selected review sample does not establish a dataset-wide quality rate or validate every cell-type label. reviewed-training-index.parquet lists the 24 reviewed crops; crop-quality.parquet records flags for all crops.

Files and columns

train.parquet and test.parquet contain one row per crop.

Column Contents
id Unique crop ID
image PNG bytes; uint8 RGB, height × width × 3
inst PNG bytes; uint16 cell-region IDs, height × width; background 0
type PNG bytes; uint8 cell types, height × width; background 0, unknown 255
sem Null
core_id, patient_id, source_split Source region, patient and split
x, y, mpp Crop origin in pixels and micrometres per pixel
partial_instance_ids IDs of cells that extend outside the crop
quality_status, human_training_approved Review status and nullable approval
skip_training, ignored_regions Recorded rejection flag and crop-local rejected rectangles
source_license, source_mask_kind License and annotation description

cell-annotations.parquet retains source cell IDs, original and updated class names, source categories and whether the cell appears in a mask. crop-instances.parquet lists each cell's crop appearances and pixel counts. Cells can appear in several crops; count distinct core/instance pairs when counting cells. training-index.parquet lists the training crop IDs.

Loading and viewing examples

from io import BytesIO
import json

import matplotlib.pyplot as plt
from matplotlib.patches import Patch
import numpy as np
import polars as pl
from PIL import Image
from huggingface_hub import hf_hub_download
from skimage.segmentation import find_boundaries


def read_png(data: bytes) -> np.ndarray:
    with Image.open(BytesIO(data)) as image:
        return np.array(image)


repo = "csmp-hub/phillips-ctcl"
path = hf_hub_download(repo_id=repo, filename="train.parquet", repo_type="dataset")
classes_path = hf_hub_download(repo_id=repo, filename="classes.json", repo_type="dataset")
with open(classes_path) as stream:
    classes = json.load(stream)["classes"]
classes.setdefault("Unknown", 255)

palette = np.vstack((plt.get_cmap("tab20").colors, plt.get_cmap("Set3").colors))
palette = palette[np.ptp(palette, axis=1) > 0.1]
colours = np.zeros((256, 3))
greys = {"unknown": 0.35, "undefined": 0.55, "dirt": 0.7, "excluded": 0.45, "low": 0.8}
for name, code in classes.items():
    if code:
        colours[code] = greys.get(name.lower(), palette[(code - 1) % len(palette)])

rows = pl.read_parquet(path, n_rows=2)
fig, axes = plt.subplots(2, 4, figsize=(17, 10))
present = set()
for row, panels in zip(rows.iter_rows(named=True), axes):
    image = read_png(row["image"])
    instances = read_png(row["inst"])
    cell_types = read_png(row["type"])
    present.update(np.unique(cell_types).tolist())
    overlay = image.copy()
    overlay[find_boundaries(instances, mode="inner")] = (0, 255, 120)
    masks = plt.get_cmap("turbo")((instances.astype(np.uint32) % 251 * 37 % 251) / 250)[..., :3]
    masks[instances == 0] = 0
    for panel, values, title in zip(
        panels,
        (image, overlay, masks, colours[cell_types]),
        ("H&E", "Boundaries", "Instances", "Cell types"),
    ):
        panel.imshow(values)
        panel.set_title(title)
        panel.axis("off")
handles = [Patch(facecolor=colours[code], label=name)
           for name, code in classes.items() if code and code in present]
fig.legend(handles=handles, loc="lower center", ncol=4, fontsize=8)
fig.subplots_adjust(left=0.01, right=0.99, top=0.97, bottom=0.13, wspace=0.04, hspace=0.1)
plt.show()

Sources

Downloads last month
174