| | --- |
| | license: cc-by-nc-sa-4.0 |
| | task_categories: |
| | - image-classification |
| | - feature-extraction |
| | language: |
| | - en |
| | tags: |
| | - spatial-transcriptomics |
| | - multimodal |
| | - histology |
| | - gene-expression |
| | - thymus |
| | - visium |
| | - biology |
| | pretty_name: "CAMEO-Thymus: A Multimodal Benchmark Dataset of Aligned H&E Patches and Visium Gene Expression Profiles in the Thymus" |
| | size_categories: |
| | - 10K<n<100K |
| | viewer: true |
| | --- |
| | |
| | # CAMEO-Thymus: A Multimodal Benchmark Dataset of Aligned H&E Patches and Visium Gene Expression Profiles in the Thymus |
| |
|
| | ## Citation |
| |
|
| | If you use this dataset, please cite it directly and the original thymus study: |
| |
|
| | ```bibtex |
| | @dataset{kuijs_cameo_thymus_2026, |
| | author = {Kuijs, Merel and Richter, Till and Gindra, Rushin H and Traeuble, Korbinian and |
| | Matek, Christian and Lukn{\'a}rov{\'a}, Rebeka and Peng, Tingying and Theis, Fabian J}, |
| | title = {CAMEO-Thymus: A Multimodal Benchmark Dataset of Aligned H\&E Patches and Visium Gene Expression Profiles in the Thymus}, |
| | year = {2026}, |
| | publisher = {Hugging Face}, |
| | doi = {10.57967/hf/7908}, |
| | url = {https://huggingface.co/datasets/theislab/CAMEO-Thymus} |
| | } |
| | |
| | @article{thymus, |
| | title = {A spatial human thymus cell atlas mapped to a continuous tissue axis}, |
| | author = {Yayon, Nadav and Kedlian, Veronika R and Boehme, Lena and Suo, Chenqu and Wachter, Brianna T and Beuschel, Rebecca T and Amsalem, Oren and Polanski, Krzysztof and Koplev, Simon and Tuck, Elizabeth and others}, |
| | journal = {Nature}, |
| | volume = {635}, |
| | number = {8039}, |
| | pages = {708--718}, |
| | year = {2024} |
| | } |
| | ``` |
| |
|
| | --- |
| |
|
| | ## Dataset Description |
| |
|
| | This dataset is part of the **CAMEO** framework for multimodal spatial transcriptomics learning. It contains paired histology images and gene expression data derived from a **10x Visium thymus cohort** comprising **19 samples from 11 donors**, spanning fetal (post-conception weeks 11–21) and pediatric (neonate to 3 years old) tissue. The dataset was originally created to map T cell development during pre- and early postnatal stages, and regions are annotated using the **Cortico-Medullary Axis (CMA)**, a common coordinate framework developed by the original study's authors. |
| |
|
| | Unlike the Xenium-based CAMEO cohorts, this dataset is **spot-based**: each row represents one **niche** — a 224×224 pixel crop of an H&E-stained histology slide paired with the transcriptome of the single Visium spot whose centroid falls within that crop. In total, the dataset contains **45,096 niches** across 19 samples. We constructed these niche-level paired representations by spatially aligning the histological and transcriptomic modalities using [SpatialData](https://github.com/scverse/spatialdata), tessellating non-overlapping crops across each slide, and applying a quality control filter to exclude niches with less than 50% tissue coverage. |
| |
|
| | In addition to raw modality data, the dataset includes a set of **precomputed embeddings** from several unimodal foundation models to facilitate research on multimodal and unimodal representation learning. |
| |
|
| | - **Organization:** [Theislab](https://huggingface.co/theislab) |
| | - **Source data:** Yayon et al., Nature 2024 |
| | - **License:** [CC BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/) |
| |
|
| | --- |
| |
|
| | ## Dataset Structure |
| |
|
| | ### Splits |
| |
|
| | The dataset is stored as a single `train` split containing all 45,096 niches across all 19 samples. |
| |
|
| | | Split | Niches | |
| | |-------|--------| |
| | | Full dataset (`train`) | 45,096 | |
| |
|
| | --- |
| |
|
| | ## Column Descriptions |
| |
|
| | Each row corresponds to one niche (224×224 px patch). The following columns are included: |
| |
|
| | > **Note:** This is a **spot-based Visium** dataset. Each niche contains exactly one spot (no cell-level decomposition, no padding mask). This differs from the Xenium-based CAMEO-Lung and CAMEO-Breast datasets. |
| |
|
| | ### Identifiers and labels |
| |
|
| | | Column | Type | Description | |
| | |--------|------|-------------| |
| | | `name` | `string` | Sample (slide) identifier, e.g. `"WSSS_F_IMMsp11765870"`. Maps to one of the 19 Visium samples. | |
| | | `annotation` | `ClassLabel` (int64) | CMA region annotation, encoded as an integer. See [Niche Label Mapping](#niche-label-mapping) below. | |
| | | `tissue` | `ClassLabel` (int64) | Tissue label. Always `0` (thymus) in this cohort. | |
| | | `species` | `ClassLabel` (int64) | Species label. Always `0` (Homo sapiens) in this cohort. | |
| | | `sample_source` | `string` | Biobank or repository from which the sample was obtained, e.g. `"Human Developmental Biology Resource"`. | |
| | | `assay` | `string` | Spatial transcriptomics assay used. Always `"Visium Spatial Gene Expression V1"` in this cohort. | |
| | | `stain` | `string` | Histological stain. Always `"HnE"` in this cohort. | |
| | | `tissue_section_thickness` | `string` | Thickness of the tissue section, e.g. `"15 μm"`. | |
| |
|
| | ### Raw modality data |
| |
|
| | | Column | Type | Shape | Description | |
| | |--------|------|-------|-------------| |
| | | `image` | `Image` | 224×224 RGB | H&E-stained histology patch. | |
| | | `gexp` | `Array2D` float32 | (1, 2000) | Visium spot-level gene expression counts. Shape (1, 2000): 1 spot × 2000 panel genes. | |
| | | `cell_coords` | `Array2D` int32 | (1, 2) | Spot centroid coordinates (x, y) in pixel space within the 224×224 patch. | |
| |
|
| | ### Precomputed embeddings |
| |
|
| | All embeddings are niche-level representations derived from the raw modalities. |
| |
|
| | | Column | Type | Shape | Description | |
| | |--------|------|-------|-------------| |
| | | `img_embed` | `Sequence` float64 | (1024,) | Image embedding from [UNI](https://github.com/mahmoodlab/UNI) | |
| | | `conch_embedding` | `Sequence` float64 | (512,) | Image embedding from [CONCH](https://github.com/mahmoodlab/CONCH) | |
| | | `ctranspath_embedding` | `Sequence` float64 | (768,) | Image embedding from [CTransPath](https://github.com/Xiyue-Wang/TransPath). | |
| | | `scvi_pool` | `Sequence` float64 | (128,) | [scVI](https://scvi-tools.org/) embedding of the spot transcriptome. | |
| | | `scvi_pseudobulk` | `Sequence` float64 | (128,) | scVI embedding computed from the spot transcriptome (equivalent to `scvi_pool` for spot-based data). | |
| | | `pca_pool` | `Sequence` float64 | (128,) | PCA embedding (128 components) of the spot transcriptome. | |
| | | `pca_pseudobulk` | `Sequence` float64 | (128,) | PCA embedding of the spot transcriptome (equivalent to `pca_pool` for spot-based data). | |
| | | `nicheformer_pool` | `Sequence` float64 | (512,) | [Nicheformer](https://github.com/theislab/nicheformer) embedding of the spot transcriptome. | |
| | | `scgpt_pool` | `Sequence` float64 | (512,) | [scGPT](https://github.com/bowang-lab/scGPT) embedding of the spot transcriptome. | |
| |
|
| | ### Niche Label Mapping |
| |
|
| | The `annotation` column contains integer class labels corresponding to CMA regions along the cortico-medullary axis: |
| |
|
| | | Integer | Region | |
| | |---------|--------| |
| | | 0 | Capsular | |
| | | 1 | Cortical CMJ | |
| | | 2 | Cortical level 1 | |
| | | 3 | Cortical level 2 | |
| | | 4 | Cortical level 3 | |
| | | 5 | Medullar CMJ | |
| | | 6 | Medullar level 1 | |
| | | 7 | Medullar level 2 | |
| | | 8 | Medullar level 3 | |
| | | 9 | Sub-Capsular | |
| | | 10 | unassigned | |
| |
|
| | --- |
| |
|
| | ## Loading the Dataset |
| |
|
| | ### Standard loading |
| |
|
| | ```python |
| | from datasets import load_dataset |
| | |
| | dataset = load_dataset("theislab/CAMEO-Thymus") |
| | train_ds = dataset["train"] |
| | |
| | # Access one example |
| | example = train_ds[0] |
| | print(example.keys()) |
| | # dict_keys(['name', 'image', 'gexp', 'cell_coords', 'tissue_section_thickness', |
| | # 'annotation', 'sample_source', 'tissue', 'assay', 'stain', 'species', |
| | # 'conch_embedding', 'ctranspath_embedding', 'img_embed', |
| | # 'pca_pool', 'pca_pseudobulk', 'scvi_pool', 'scvi_pseudobulk', |
| | # 'nicheformer_pool', 'scgpt_pool']) |
| | |
| | # The image is a PIL Image |
| | print(example["image"].size) # (224, 224) |
| | |
| | # Gene expression: shape (1, 2000) — extract the spot vector |
| | import numpy as np |
| | gexp = np.array(example["gexp"])[0] # shape (2000,) |
| | |
| | # Decode the CMA region label |
| | label_name = train_ds.features["annotation"].int2str(example["annotation"]) |
| | print(label_name) # e.g. "Sub-Capsular" |
| | ``` |
| |
|
| | ### Streaming (avoids downloading all ~4 GB upfront) |
| |
|
| | ```python |
| | from datasets import load_dataset |
| | |
| | dataset = load_dataset("theislab/CAMEO-Thymus", streaming=True) |
| | for example in dataset["train"]: |
| | # process one niche at a time |
| | break |
| | ``` |
| |
|
| | ### Filtering by sample |
| |
|
| | ```python |
| | train_samples = ["WSSS_F_IMMsp11765870", ...] |
| | train_split = dataset["train"].filter(lambda x: x["name"] in train_samples) |
| | ``` |
| |
|
| | --- |
| |
|
| | ## License |
| |
|
| | This dataset is distributed under the [Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0)](https://creativecommons.org/licenses/by-nc-sa/4.0/) license. |
| |
|