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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: cc-by-4.0
|
| 3 |
+
pretty_name: CellImageNet
|
| 4 |
+
task_categories:
|
| 5 |
+
- image-classification
|
| 6 |
+
tags:
|
| 7 |
+
- biology
|
| 8 |
+
- single-cell
|
| 9 |
+
- cell-type-classification
|
| 10 |
+
- DAPI
|
| 11 |
+
- nuclear-morphology
|
| 12 |
+
- spatial-transcriptomics
|
| 13 |
+
- xenium
|
| 14 |
+
size_categories:
|
| 15 |
+
- 1M<n<10M
|
| 16 |
+
configs:
|
| 17 |
+
- config_name: human
|
| 18 |
+
data_files:
|
| 19 |
+
- split: full
|
| 20 |
+
path: data/human/*.tar
|
| 21 |
+
- config_name: mouse
|
| 22 |
+
data_files:
|
| 23 |
+
- split: full
|
| 24 |
+
path: data/mouse/*.tar
|
| 25 |
+
---
|
| 26 |
+
|
| 27 |
+
# CellImageNet
|
| 28 |
+
|
| 29 |
+
**CellImageNet** is a large-scale single-cell image database of **paired DAPI
|
| 30 |
+
nuclear images with cell-type annotations**, built from publicly available
|
| 31 |
+
10x Genomics Xenium data. It contains **~10 million cells** from **42 Xenium
|
| 32 |
+
samples — 28 human and 14 mouse tissues** — spanning diverse species, biological
|
| 33 |
+
conditions, and tissue types, annotated with **31 harmonized cell-type classes**
|
| 34 |
+
(unified from the source datasets' own annotations into a common label set).
|
| 35 |
+
|
| 36 |
+
Each cell has paired DAPI crops centered on the same cell at complementary context scales:
|
| 37 |
+
|
| 38 |
+
- **2.5×** — a tight view capturing fine nuclear morphology, and
|
| 39 |
+
- **10×** — a wider view capturing the local tissue context / neighbourhood.
|
| 40 |
+
|
| 41 |
+
Crops are provided at their **native resolution** (variable per sample; they are
|
| 42 |
+
*not* pre-resized — resize to a fixed input size, e.g. 224×224, is left to the
|
| 43 |
+
downstream model).
|
| 44 |
+
|
| 45 |
+
## Configurations & splits
|
| 46 |
+
|
| 47 |
+
| config | content |
|
| 48 |
+
|---|---|
|
| 49 |
+
| `human` | 28 human Xenium samples (~6.5M cells) |
|
| 50 |
+
| `mouse` | 14 mouse Xenium samples (~3.4M cells) |
|
| 51 |
+
|
| 52 |
+
(Counts are pre-filtering segmentation totals; the released set is marginally
|
| 53 |
+
smaller after removing cells with tiny nuclear masks or missing crops.)
|
| 54 |
+
|
| 55 |
+
This is an unsplit corpus: each config exposes a single `full` split (we do not
|
| 56 |
+
ship an official train/test partition). The exact subset used to train MorphPT
|
| 57 |
+
is specified in the [MorphPT weights repo](https://huggingface.co/jilab/MorphPT)
|
| 58 |
+
under `splits/`.
|
| 59 |
+
|
| 60 |
+
```python
|
| 61 |
+
from datasets import load_dataset
|
| 62 |
+
ds = load_dataset("jilab/CellImageNet", "human", split="full", streaming=True)
|
| 63 |
+
ex = next(iter(ds))
|
| 64 |
+
ex["2p5x.png"], ex["10x.png"], ex["json"]["cell_type"]
|
| 65 |
+
```
|
| 66 |
+
|
| 67 |
+
## Sample schema (WebDataset)
|
| 68 |
+
|
| 69 |
+
Each sample (one cell) is keyed by `cell_id` with three members:
|
| 70 |
+
|
| 71 |
+
| member | type | description |
|
| 72 |
+
|---|---|---|
|
| 73 |
+
| `2p5x.png` | image | 2.5× DAPI crop (grayscale, native resolution) |
|
| 74 |
+
| `10x.png` | image | 10× DAPI crop (grayscale, native resolution) |
|
| 75 |
+
| `json` | dict | metadata (below) |
|
| 76 |
+
|
| 77 |
+
`json` fields: `cell_id`, `dataset` (source Xenium sample), `species`
|
| 78 |
+
(Human/Mouse), `tissue`, `condition`, `cell_type` (one of the 31 classes below,
|
| 79 |
+
plus a small `Unknown` bucket in some mouse samples), `x_centroid`, `y_centroid`
|
| 80 |
+
(nuclear centroid, **microns**).
|
| 81 |
+
|
| 82 |
+
> Note: the field is named `cell_type` (the fine-grained cell label). It is
|
| 83 |
+
> *not* the coarse morphology "group" used by the MorphPT router — that grouping
|
| 84 |
+
> lives in the model repo, not in this dataset.
|
| 85 |
+
|
| 86 |
+
## Cell-type classes
|
| 87 |
+
|
| 88 |
+
The 31 harmonized cell-type labels in `cell_type`:
|
| 89 |
+
|
| 90 |
+
<details>
|
| 91 |
+
<summary>All 31 classes</summary>
|
| 92 |
+
|
| 93 |
+
Astrocytes · B cells · Brain cancer cells · Cardiac muscle cells · Chondrocytes ·
|
| 94 |
+
Colon cancer cells · Endothelial cells · Ependymal cells · Epithelial cells ·
|
| 95 |
+
Erythrocytes · Fibroblasts · Kidney cancer cells · Liver cancer cells ·
|
| 96 |
+
Lung cancer cells · Mesangial cells · Microglia · Myeloid cells · NK cells ·
|
| 97 |
+
Neurons · OPCs · Oligodendrocytes · Ovary cancer cells · Pancreas cancer cells ·
|
| 98 |
+
Pericytes · Schwann cells · Skeletal muscle cells · Skin cancer cells ·
|
| 99 |
+
Smooth muscle cells · Stem and progenitor cells · Stromal cells · T cells
|
| 100 |
+
|
| 101 |
+
</details>
|
| 102 |
+
|
| 103 |
+
`Unknown` is **mouse-only** (~134k cells, ≈3.8% of the mouse split; no human cell
|
| 104 |
+
carries it) and marks cells left unannotated in the source. Filter it out if you
|
| 105 |
+
need a clean 31-class label space.
|
| 106 |
+
|
| 107 |
+
## How it was built
|
| 108 |
+
|
| 109 |
+
Source: 42 Xenium samples (28 human, 14 mouse) from the
|
| 110 |
+
[10x Genomics datasets portal](https://www.10xgenomics.com/datasets). From each
|
| 111 |
+
tissue-wide DAPI image we used the `morphology_mip` maximum-intensity-projection
|
| 112 |
+
channel (or `morphology_focus` when unavailable). Nuclear segmentation masks
|
| 113 |
+
(10x Xenium Onboard Analysis) were converted to pixels at 0.2125 µm/px; cells
|
| 114 |
+
with rasterized nuclear area < 5 px or a bounding box < 10 px in either dimension
|
| 115 |
+
were removed. For each cell, two square crops centred on the nuclear centroid
|
| 116 |
+
were extracted at context scales r = 2.5 and r = 10 (side length S_r = r·d, with
|
| 117 |
+
d the per-sample mean nuclear bounding-box size) and zero-padded at image
|
| 118 |
+
borders. Crops are stored at native resolution.
|
| 119 |
+
|
| 120 |
+
## License & attribution
|
| 121 |
+
|
| 122 |
+
CellImageNet is a **derivative work** of publicly available 10x Genomics Xenium
|
| 123 |
+
datasets. The underlying imaging data is distributed by 10x Genomics under the
|
| 124 |
+
**Creative Commons Attribution 4.0 International ([CC BY 4.0](https://creativecommons.org/licenses/by/4.0/))**
|
| 125 |
+
license. Because CellImageNet is derived from CC BY 4.0 material, the image crops
|
| 126 |
+
are released under **CC BY 4.0**; the cell-type annotations and derived metadata
|
| 127 |
+
contributed by the CellImageNet authors are likewise released under CC BY 4.0.
|
| 128 |
+
See [`LICENSE`](LICENSE) for the full statement.
|
| 129 |
+
|
| 130 |
+
Under CC BY 4.0 you may share and adapt this dataset, including commercially,
|
| 131 |
+
provided you (1) credit 10x Genomics and the CellImageNet authors, (2) link the
|
| 132 |
+
license, and (3) **indicate that changes were made** — the images here have been
|
| 133 |
+
cropped/re-framed and re-annotated and are **not** the original 10x Genomics
|
| 134 |
+
files.
|
| 135 |
+
|
| 136 |
+
### Source datasets
|
| 137 |
+
|
| 138 |
+
All 42 source samples are 10x Genomics Xenium In Situ datasets from the
|
| 139 |
+
[10x Genomics datasets portal](https://www.10xgenomics.com/datasets). Each is
|
| 140 |
+
individually licensed CC BY 4.0 on its dataset page. The complete list of source
|
| 141 |
+
samples (dataset name, species, tissue, condition, and its 10x dataset URL) is
|
| 142 |
+
provided in **[`attribution_manifest.csv`](attribution_manifest.csv)** in this
|
| 143 |
+
repository.
|
| 144 |
+
|
| 145 |
+
Please cite both 10x Genomics and the individual source datasets in addition to
|
| 146 |
+
the CellImageNet/MorphPT paper below.
|
| 147 |
+
|
| 148 |
+
## Limitations
|
| 149 |
+
|
| 150 |
+
- **DAPI only** — nuclear morphology, no gene expression or protein channels
|
| 151 |
+
(despite deriving from Xenium spatial-transcriptomics runs).
|
| 152 |
+
- **Native-resolution crops** vary in pixel size across samples; downstream
|
| 153 |
+
models must resize to a fixed input.
|
| 154 |
+
- **Unsplit and imbalanced** — no official train/test split, and class frequency
|
| 155 |
+
is highly skewed (tissue/condition sampling reflects the source datasets, not a
|
| 156 |
+
balanced design). Subsample or reweight for classifier training.
|
| 157 |
+
- Labels are the source annotations harmonized into 31 classes; ≈3.8% of mouse
|
| 158 |
+
cells (none in human) are `Unknown`.
|
| 159 |
+
|
| 160 |
+
## Relation to MorphPT
|
| 161 |
+
|
| 162 |
+
CellImageNet is the training corpus for **MorphPT**, a visual foundation model
|
| 163 |
+
for cell classification. MorphPT was trained on a human-only, per-class
|
| 164 |
+
subsampled subset of CellImageNet.
|
| 165 |
+
|
| 166 |
+
- Code: <https://github.com/AnitaCao/MorphPT>
|
| 167 |
+
- Model weights: <https://huggingface.co/jilab/MorphPT>
|
| 168 |
+
|
| 169 |
+
|
| 170 |
+
## Citation
|
| 171 |
+
|
| 172 |
+
```bibtex
|
| 173 |
+
@article{cao2026visual,
|
| 174 |
+
title = {A visual foundation model for cell classification},
|
| 175 |
+
author = {Cao, Ting and Zhuang, Haotian and Zhang, Boxuan and
|
| 176 |
+
Pang, Zhiping P. and Tang, Ruixiang and Liu, Dongfang and
|
| 177 |
+
Ji, Zhicheng},
|
| 178 |
+
year = {2026}
|
| 179 |
+
}
|
| 180 |
+
```
|