Dataset Viewer
Auto-converted to Parquet
The dataset viewer is not available for this split.
Job manager crashed while running this job (missing heartbeats).
Error code:   JobManagerCrashedError

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.

STHELAR dataset (40x)

STHELAR (Spatial Transcriptomics and H&E histology for Large-scale Annotation Resource) is a multi-tissue dataset designed for developing models capable of predicting cell types directly from histological Hematoxylin & Eosin (H&E) whole slide images. It integrates high-resolution spatial transcriptomics data with histology, to provide detailed segmentation masks and cell-type annotations.


Available dataset versions

  • STHELAR_40x — 587,555 image patches at 40x magnification
  • STHELAR_20x — 154,814 image patches at 20x magnification

Both datasets share identical structures and metadata, differing only in image magnification levels.


Detailed background

The STHELAR dataset is built from spatial transcriptomics (ST) data combined with Hematoxylin and Eosin (H&E) images, specifically sourced from the 10X Genomics platform using Xenium technology. The dataset comprises 27 human tissue FFPE slides, representing 13 distinct tissue types, including samples from 20 cancerous patients. Both modalities were aligned. Cell-type annotations were generated using the Tangram method, aligning the ST data with single-cell RNA reference atlases, and were subsequently refined via Leiden clustering combined with differential gene expression analysis. The aligned H&E images were divided into H&E patches, each accompanied by masks for nuclei segmentation and cell-type classification. Quality control steps were conducted, notably by comparing STHELAR segmentation masks with predictions from the pretrained CellViT model on the PanNuke dataset.


Dataset description

Each dataset (STHELAR_40x or STHELAR_20x) consists of:

  • file_name: Filename of the H&E image patch (e.g., breast_s0_10.png).
  • slide_id: Identifier of the slide from which the patch was extracted (e.g., breast_s0).
  • tissue: Tissue type, provided as categorical labels (e.g., Breast, Lung, Colon).
  • image: RGB color images of size 256×256 pixels, extracted from H&E-stained whole-slide images at 40x or 20x magnification, with a 64-pixel overlap between adjacent patches.
  • instance_map: Grayscale (16-bit) segmentation mask corresponding exactly to the H&E patch, with each nucleus uniquely labeled by a positive integer (0 represents background).
  • type_map: Grayscale (8-bit) classification mask corresponding exactly to the H&E patch, where each nucleus is labeled according to its annotated cell type using the labels provided below (0 represents background).
  • cell_counts: List of integers indicating the number of cells per cell type within the patch, ordered according to the cell type labels provided.
  • Dice: Dice similarity coefficient measuring the overlap between the provided segmentation masks and segmentation predicted by a pre-trained CellViT model (SAM-H encoder).
  • Jaccard: Jaccard index measuring segmentation accuracy relative to predictions made by a pre-trained CellViT model (SAM-H encoder).
  • bPQ: Binary Panoptic Quality score, evaluating segmentation and instance-detection accuracy simultaneously, computed relative to predictions made by a pre-trained CellViT model (SAM-H encoder).

Cell type labels

Cell type annotations are provided using the following consistent labels:

Label ID Cell type Description
1 T_NK Includes T lymphocytes and natural killer (NK) cells.
2 B_Plasma Combines B lymphocytes and plasma cells.
3 Myeloid Comprises macrophages, monocytes, dendritic cells, neutrophils, mast cells, and plasmacytoid dendritic cells (pDCs). Due to their dual myeloid/lymphoid characteristics and rarity, pDCs were grouped here, with minimal impact expected.
4 Blood_vessel Covers endothelial cells, pericytes, and smooth muscle cells.
5 Fibroblast_Myofibroblast Contains fibroblasts, myofibroblasts, and mesenchymal stromal cells.
6 Epithelial Includes various epithelial cells often specific to individual tissues. For instance, in pancreatic tissue, it includes pancreatic acinar, ductal, and islet cells.
7 Specialized Captures tissue-specific cells such as cardiomyocytes, osteoblasts, osteoclasts, and some endocrine cells.
8 Melanocyte Represents melanocytes or melanoma cells specifically found in skin tissue.
9 Other Encompasses cells without marker genes or those with fewer than 10 RNAs.

Tissue types and associated slides

The dataset covers a variety of normal and cancerous human tissues:

Tissue type Included slides (WSIs)
Breast breast_s0, breast_s1, breast_s3, breast_s6
Cervix cervix_s0
Colon colon_s1, colon_s2
Heart heart_s0
Kidney kidney_s0, kidney_s1
Liver liver_s0, liver_s1
Lung lung_s1, lung_s3
LymphNode lymph_node_s0
Ovarian ovary_s0, ovary_s1
Pancreatic pancreatic_s0, pancreatic_s1, pancreatic_s2
Prostate prostate_s0
Skin skin_s1, skin_s2, skin_s3, skin_s4
Tonsil tonsil_s0, tonsil_s1

Slides with cancerous tissue are: 'breast_s0', 'breast_s1', 'breast_s3', 'breast_s6', 'cervix_s0', 'colon_s1', 'colon_s2', 'kidney_s1', 'liver_s1', 'lung_s1', 'lung_s3', 'ovary_s0', 'ovary_s1', 'pancreatic_s0', 'pancreatic_s1', 'pancreatic_s2', 'prostate_s0', 'skin_s2', 'skin_s3', 'skin_s4'.


Quality control

Segmentation and alignment quality were assessed using metrics from comparisons to segmentation predictions by pre-trained CellViT (SAM-H) model. Metrics included:

  • Dice coefficient: Measures overlap accuracy.
  • Jaccard index: Intersection-over-union metric.
  • Binary Panoptic Quality (bPQ): Evaluates segmentation and detection quality simultaneously.

These metrics facilitate dynamic filtering based on required accuracy thresholds (e.g., retaining patches with Jaccard index ≥ 0.45).
A high score generally reflects good alignment and segmentation quality for our dataset. Conversely, a low score does not always indicate poor quality—it may result from actual data issues or from inaccurate predictions by CellViT (see article for details).


Dataset format

license: cc-by-4.0
data_files:
  - split: train
    path: data/train-*
dataset_info:
  features:
  - name: file_name
    dtype: string
  - name: image
    dtype: image
  - name: slide_id
    dtype: string
  - name: tissue
    dtype:
      class_label:
        names:
          '0': Breast
          '1': Cervix
          '2': Colon
          '3': Heart
          '4': Kidney
          '5': Liver
          '6': Lung
          '7': LymphNode
          '8': Ovarian
          '9': Pancreatic
          '10': Prostate
          '11': Skin
          '12': Tonsil
  - name: cell_counts
    list: uint16
  - name: instance_map
    dtype: image
  - name: type_map
    dtype: image
  - name: Dice
    dtype: float16
  - name: Jaccard
    dtype: float16
  - name: bPQ
    dtype: float16
  splits:
  - name: train
    num_bytes: 129491720344.55
    num_examples: 587555
  download_size: 58113715063
  dataset_size: 129491720344.55

Loading the dataset

  • To load the full dataset:
from datasets import load_dataset

ds = load_dataset("FelicieGS/STHELAR_40x") # (replace 'STHELAR_40x' with 'STHELAR_20x' as needed)
  • Or to see how it looks, you can stream, using for instance:
from datasets import load_dataset, Image
import matplotlib.pyplot as plt
import numpy as np

def to_numpy(ex):
    ex["instance_map"] = np.asarray(ex["instance_map"], dtype=np.uint16)
    ex["type_map"] = np.asarray(ex["type_map"], dtype=np.uint8)
    return ex

def decode_sample(ex):
    rgb   = np.array(ex["image"])
    inst  = ex["instance_map"].astype(np.uint16)
    ctype = ex["type_map"].astype(np.uint8)
    return rgb, inst, ctype

def plot_sample(ex, rgb, inst, ctype):
    fig, ax = plt.subplots(1, 3, figsize=(10, 3))

    ax[0].imshow(rgb)
    ax[0].set_title("RGB patch"); ax[0].axis("off")

    ax[1].imshow(inst, cmap="viridis")
    ax[1].set_title("Instance map"); ax[1].axis("off")

    ax[2].imshow(ctype, cmap="tab10")
    ax[2].set_title("Cell-type map"); ax[2].axis("off")

    plt.tight_layout()
    plt.show()

    print("Slide:", ex["slide_id"])
    print("Tissue class:", tissue_label.int2str(ex["tissue"]))
    print("Cell counts:", ex["cell_counts"])
    print("Dice/Jaccard/bPQ:", ex["Dice"], ex["Jaccard"], ex["bPQ"])
    print("Unique instances:", np.unique(inst))
    print("Unique cell types:", np.unique(ctype))


ds = load_dataset("FelicieGS/STHELAR_40x", split="train", streaming=True)
print("Features: ", ds.features)
tissue_label = ds.features["tissue"]
ds = ds.cast_column("image", Image(decode=True))
ds = ds.map(to_numpy)
stream = iter(ds)

ex1 = next(stream)
rgb1, inst1, ctype1 = decode_sample(ex1)
plot_sample(ex1, rgb1, inst1, ctype1)

Associated publication and data resources


Citation

Giraud-Sauveur, F. et al. STHELAR, a multi-tissue dataset linking spatial transcriptomics and histology for cell type annotation. bioRxiv (2025) doi:10.1101/2025.07.11.664123.


License

Released under the CC-BY 4.0 License.

Downloads last month
218