CAMEO-Breast / README.md
merelkuijs's picture
Update README.md
bed4ac3 verified
---
license: cc-by-nc-sa-4.0
task_categories:
- image-classification
- feature-extraction
language:
- en
tags:
- spatial-transcriptomics
- multimodal
- histology
- gene-expression
- breast
- xenium
- biology
- single-cell
pretty_name: "CAMEO-Breast: A Multimodal Benchmark Dataset of Aligned H&E Patches and Gene Expression Profiles in the Breast"
size_categories:
- 100K<n<1M
viewer: true
---
# CAMEO-Breast: A Multimodal Benchmark Dataset of Aligned H&E Patches and Gene Expression Profiles in the Breast
## Citation
If you use this dataset, please cite it directly and the original breast study:
```bibtex
@dataset{kuijs_cameo_breast_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-Breast: A Multimodal Benchmark Dataset of Aligned H&E Patches and Gene Expression Profiles in the Breast},
year = {2026},
publisher = {Hugging Face},
doi = {10.57967/hf/7909},
url = {https://huggingface.co/datasets/theislab/CAMEO-Breast}
}
@article{breast,
title = {High resolution mapping of the tumor microenvironment using integrated single-cell, spatial and in situ analysis},
author = {Janesick, Amanda and Shelansky, Robert and Gottscho, Andrew D and Wagner, Florian and Williams, Stephen R and Rouault, Morgane and Beliakoff, Ghezal and Morrison, Carolyn A and Oliveira, Michelli F and Sicherman, Jordan T and others},
journal = {Nature Communications},
volume = {14},
number = {1},
pages = {8353},
year = {2023}
}
```
---
## 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 **7 publicly available 10x Xenium breast cancer samples from 4 patients**, originally hosted on the [10x Genomics website](https://www.10xgenomics.com/datasets).
Each row represents one **niche** — a 224×224 pixel crop of an H&E-stained histology slide paired with the single-cell gene expression profiles of all cells located within that crop, together with expert pathologist niche annotations, per-cell coordinates, and cell-type composition. In total, the dataset contains **126,770 niches** encompassing approximately **2.3 million cells** across 7 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. Transcripts from partially included cells are treated as whole-cell data within the niche. Niche-level annotations were provided by our collaborating expert pathologist using the Elston-Ellis grading system.
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:** [10x Genomics Xenium breast cancer samples](https://www.10xgenomics.com/datasets) (publicly available)
- **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 126,770 niches across all 7 samples.
| Split | Niches |
|-------|--------|
| Full dataset (`train`) | 126,770 |
---
## Column Descriptions
Each row corresponds to one niche (224×224 px patch). The following columns are included:
### Identifiers and labels
| Column | Type | Description |
|--------|------|-------------|
| `name` | `string` | Sample (slide) identifier, e.g. `"TENX97_vectorized_annotated_allpolys_noCT"`. Maps to one of the 7 Xenium samples. |
| `annotation` | `ClassLabel` (int64) | Expert pathologist niche annotation, encoded as an integer. See [Niche Label Mapping](#niche-label-mapping) below. |
| `species` | `ClassLabel` (int64) | Species label. Always `0` (human) in this cohort. |
| `cancer` | `ClassLabel` (int64) | Cancer flag (schema inherited from the combined CAMEO dataset). |
| `tissue` | `ClassLabel` (int64) | Tissue label (schema inherited from the combined CAMEO dataset). |
### Raw modality data
| Column | Type | Shape | Description |
|--------|------|-------|-------------|
| `image` | `Image` | 224×224 RGB | H&E-stained histology patch. |
| `gexp` | `Array2D` float32 | (200, 280) | Raw gene expression counts per cell. Up to 200 cells per niche (zero-padded); 280 Xenium panel genes. Use `mask` to identify valid cells. |
| `spot_gexp` | `Array2D` float32 | (1, 280) | Niche-level pseudobulk gene expression (sum over valid cells). |
| `mask` | `Sequence` bool | (200,) | Boolean mask indicating valid cells (`True` = real cell, `False` = padding). |
| `cell_coords` | `Array2D` int32 | (200, 2) | Cell centroid coordinates (x, y) in pixel space within the 224×224 patch. Padded to 200 rows. |
### Precomputed embeddings
All embeddings are niche-level representations derived from the raw modalities.
| Column | Type | Shape | Description |
|--------|------|-------|-------------|
| `img_embed` | `Sequence` float32 | (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). |
| `gexp_embed` | `Sequence` float32 | (128,) | Gene expression embedding learned by a self-supervised Graph Attention Network. |
| `scvi_pool` | `Sequence` float64 | (128,) | [scVI](https://scvi-tools.org/) embedding, pooled over valid cells in the niche. |
| `scvi_pseudobulk` | `Sequence` float64 | (128,) | scVI embedding computed from the pseudobulk niche expression profile. |
| `pca_pool` | `Sequence` float64 | (128,) | PCA embedding (128 components), pooled over valid cells in the niche. |
| `pca_pseudobulk` | `Sequence` float64 | (128,) | PCA embedding computed from the pseudobulk niche expression profile. |
| `nicheformer_pool` | `Sequence` float64 | (512,) | [Nicheformer](https://github.com/theislab/nicheformer) embedding, pooled over valid cells in the niche. |
| `scgpt_pool` | `Sequence` float64 | (512,) | [scGPT](https://github.com/bowang-lab/scGPT) embedding, pooled over valid cells in the niche. |
### Niche Label Mapping
The `annotation` column contains integer class labels corresponding to expert-annotated niche types:
| Integer | Niche type |
|---------|------------|
| 0 | DCIS |
| 1 | Flat epithelial atypia |
| 2 | Invasive Adenocarcinoma |
| 3 | Lymphocyte Rich Tumor Stroma |
| 4 | NOANNOT |
| 5 | Necrosis |
| 6 | Normal breast lobules |
| 7 | adenosis |
| 8 | blood_vessels |
| 9 | columnar cell change |
| 10 | duct |
| 11 | fat |
| 12 | stroma |
| 13 | tumor_epithelium |
---
## Loading the Dataset
### Standard loading
```python
from datasets import load_dataset
dataset = load_dataset("theislab/CAMEO-Breast")
train_ds = dataset["train"]
# Access one example
example = train_ds[0]
print(example.keys())
# dict_keys(['name', 'image', 'img_embed', 'gexp_embed', 'cell_type_ratio',
# 'annotation', 'species', 'cancer', 'tissue', 'gexp', 'mask',
# 'cell_coords', 'spot_gexp', 'conch_embedding', 'ctranspath_embedding',
# '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 (200, 280), use mask to select valid cells
import numpy as np
gexp = np.array(example["gexp"]) # shape (200, 280)
mask = np.array(example["mask"]) # shape (200,) bool
gexp_valid = gexp[mask] # shape (n_cells, 280)
# Decode the niche label
label_name = train_ds.features["annotation"].int2str(example["annotation"])
print(label_name) # e.g. "Invasive Adenocarcinoma"
```
### Streaming (avoids downloading all ~40 GB upfront)
```python
from datasets import load_dataset
dataset = load_dataset("theislab/CAMEO-Breast", streaming=True)
for example in dataset["train"]:
# process one niche at a time
break
```
### Filtering by sample
```python
train_samples = ["TENX97_vectorized_annotated_allpolys_noCT", ...]
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.