Datasets:
Tighten README: trim noise, fix repo names, ASCII-only.
Browse files
README.md
CHANGED
|
@@ -8,9 +8,7 @@ task_categories:
|
|
| 8 |
tags:
|
| 9 |
- cell-painting
|
| 10 |
- microscopy
|
| 11 |
-
- representation-learning
|
| 12 |
- single-cell
|
| 13 |
-
- biology
|
| 14 |
- jump-cp
|
| 15 |
configs:
|
| 16 |
- config_name: default
|
|
@@ -19,138 +17,90 @@ configs:
|
|
| 19 |
path: data/shard-*.tar
|
| 20 |
---
|
| 21 |
|
| 22 |
-
# CP-BG-Bench
|
| 23 |
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
framework.
|
| 27 |
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
|
|
|
| 33 |
|
| 34 |
-
|
| 35 |
|
| 36 |
-
##
|
| 37 |
|
| 38 |
-
|
| 39 |
-
|
| 40 |
|
| 41 |
-
|
| 42 |
-
View-specific image content (raw / background-masked / density-augmented).
|
| 43 |
-
- `{key}.mask.bin` — raw uint8 bytes, shape `(2, 224, 224)`, channel-first.
|
| 44 |
-
Segmentation mask (`[nucleus, cell]`); identical across all four views.
|
| 45 |
-
- `{key}.json` — per-cell metadata (see below).
|
| 46 |
|
| 47 |
-
|
|
|
|
|
|
|
|
|
|
| 48 |
|
| 49 |
-
|
| 50 |
-
import numpy as np
|
| 51 |
-
cell = np.frombuffer(cell_bytes, dtype=np.uint8).reshape((5, 224, 224))
|
| 52 |
-
mask = np.frombuffer(mask_bytes, dtype=np.uint8).reshape((2, 224, 224))
|
| 53 |
```
|
| 54 |
|
| 55 |
-
##
|
| 56 |
-
|
| 57 |
-
The 5 channels are stored in this order:
|
| 58 |
|
| 59 |
-
|
|
| 60 |
|---|---|---|
|
| 61 |
-
|
|
| 62 |
-
|
|
| 63 |
-
|
|
| 64 |
-
| 3 | Mito | MitoTracker Deep Red |
|
| 65 |
-
| 4 | RNA | SYTO 14 |
|
| 66 |
|
| 67 |
-
|
| 68 |
-
> from both the JUMP-CP v2 publication order `[DNA, ER, RNA, AGP, Mito]` and
|
| 69 |
-
> the Recursion RxRx order `[DNA, ER, AGP, RNA, Mito, ...]`.** Code that
|
| 70 |
-
> assumes a particular order without checking will feed the wrong stain to
|
| 71 |
-
> downstream channel slots. A machine-readable `channels.json` is provided at
|
| 72 |
-
> the repo root; please use it. The CP-BG-Bench framework resolves channels
|
| 73 |
-
> by name and is robust to per-dataset reorderings.
|
| 74 |
|
|
|
|
| 75 |
|
| 76 |
-
|
|
|
|
|
|
|
| 77 |
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
| 0 | nucleus | binary nucleus segmentation mask |
|
| 81 |
-
| 1 | cell | binary whole-cell segmentation mask |
|
| 82 |
|
| 83 |
-
|
| 84 |
-
A machine-readable `channels.json` is provided at the repo root.
|
| 85 |
|
|
|
|
|
|
|
|
|
|
| 86 |
|
| 87 |
-
|
| 88 |
|
| 89 |
-
|
| 90 |
|
| 91 |
-
|
|
| 92 |
|---|---|---|
|
| 93 |
-
| `row_key` | str |
|
| 94 |
-
| `source` | str |
|
| 95 |
-
| `batch`
|
| 96 |
-
| `plate`
|
| 97 |
-
| `well`
|
| 98 |
-
| `tile`
|
| 99 |
-
| `id_local` | int |
|
| 100 |
-
| `perturbation` | str |
|
| 101 |
-
| `Metadata_InChIKey` | str |
|
| 102 |
-
| `Metadata_PlateType` | str | `
|
| 103 |
-
| `nuc_area`, `cyto_area`
|
| 104 |
-
| `
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
`
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
##
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
-
|
| 115 |
-
- Plate types: COMPOUND: 445,968, TARGET2: 199,422
|
| 116 |
-
- Sources (JUMP partners): 10
|
| 117 |
-
- Plates: 900
|
| 118 |
-
- Unique perturbations (InChIKeys): 1467
|
| 119 |
-
|
| 120 |
-
## Splits
|
| 121 |
-
|
| 122 |
-
A natural held-out batch is `source_4` (21,177 cells), used in the
|
| 123 |
-
CP-BG-Bench cross-batch retrieval evaluation. Filter with:
|
| 124 |
-
|
| 125 |
-
```python
|
| 126 |
-
ds = ds.filter(lambda r: r["source"] == "source_4")
|
| 127 |
-
```
|
| 128 |
-
|
| 129 |
-
## Pairing across views
|
| 130 |
-
|
| 131 |
-
The four CP-BG-Bench JUMP repos share `row_key` exactly. To use a paired
|
| 132 |
-
dataloader, load all four and join on `row_key` (the `metadata.parquet` files
|
| 133 |
-
make this cheap):
|
| 134 |
-
|
| 135 |
-
- `<anon-org>/jump-c-target2` (this view: C)
|
| 136 |
-
- `<anon-org>/jump-s-target2`
|
| 137 |
-
- `<anon-org>/jump-cd-target2`
|
| 138 |
-
- `<anon-org>/jump-sd-target2`
|
| 139 |
-
|
| 140 |
-
## Shard ordering
|
| 141 |
-
|
| 142 |
-
- Rows are written in the order they appear in the source HF Datasets
|
| 143 |
-
directory. Shuffle at load time (PyTorch `DataLoader(shuffle=True)` or
|
| 144 |
-
`webdataset.WebDataset(...).shuffle(N)`); shards are not pre-shuffled.
|
| 145 |
-
- `(shard_index, key_in_shard)` for every row is in `metadata.parquet`.
|
| 146 |
|
| 147 |
## License
|
| 148 |
|
| 149 |
-
CC0 1.0
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
## Citation
|
| 153 |
-
|
| 154 |
-
Anonymous submission to NeurIPS 2026 Datasets & Benchmarks Track.
|
| 155 |
-
|
| 156 |
-
For the underlying JUMP-CP data, please cite the JUMP-CP consortium release.
|
|
|
|
| 8 |
tags:
|
| 9 |
- cell-painting
|
| 10 |
- microscopy
|
|
|
|
| 11 |
- single-cell
|
|
|
|
| 12 |
- jump-cp
|
| 13 |
configs:
|
| 14 |
- config_name: default
|
|
|
|
| 17 |
path: data/shard-*.tar
|
| 18 |
---
|
| 19 |
|
| 20 |
+
# CP-BG-Bench JUMP SD: background-masked + density-augmented cell crop
|
| 21 |
|
| 22 |
+
Single-cell tiles from JUMP-CP, packaged for the CP-BG-Bench evaluation.
|
| 23 |
+
This is one of four row-aligned views of the same 645,390 cells:
|
|
|
|
| 24 |
|
| 25 |
+
| view | repo | cell.bin content |
|
| 26 |
+
|---|---|---|
|
| 27 |
+
| C | `cp-bg-bench-anon/jump-c` | raw 5-channel crop |
|
| 28 |
+
| S | `cp-bg-bench-anon/jump-s` | background-masked crop |
|
| 29 |
+
| CD | `cp-bg-bench-anon/jump-cd` | density-augmented crop |
|
| 30 |
+
| SD | `cp-bg-bench-anon/jump-sd` | background-masked + density-augmented |
|
| 31 |
|
| 32 |
+
All four share `row_key`. Join on it to combine views.
|
| 33 |
|
| 34 |
+
## Loading
|
| 35 |
|
| 36 |
+
```python
|
| 37 |
+
import json, numpy as np, webdataset as wds
|
| 38 |
|
| 39 |
+
URLS = "https://huggingface.co/datasets/cp-bg-bench-anon/jump-sd/resolve/main/data/shard-{{00000..00042}}.tar"
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
|
| 41 |
+
def decode(s):
|
| 42 |
+
cell = np.frombuffer(s["cell.bin"], dtype=np.uint8).reshape(5, 224, 224)
|
| 43 |
+
mask = np.frombuffer(s["mask.bin"], dtype=np.uint8).reshape(2, 224, 224)
|
| 44 |
+
return cell, mask, json.loads(s["json"])
|
| 45 |
|
| 46 |
+
ds = wds.WebDataset(URLS, shardshuffle=True).shuffle(2000).map(decode)
|
|
|
|
|
|
|
|
|
|
| 47 |
```
|
| 48 |
|
| 49 |
+
## Per-cell payload
|
|
|
|
|
|
|
| 50 |
|
| 51 |
+
| file | shape | dtype |
|
| 52 |
|---|---|---|
|
| 53 |
+
| `<key>.cell.bin` | (5, 224, 224) | uint8 |
|
| 54 |
+
| `<key>.mask.bin` | (2, 224, 224) | uint8 |
|
| 55 |
+
| `<key>.json` | - | json |
|
|
|
|
|
|
|
| 56 |
|
| 57 |
+
`cell.bin` and `mask.bin` are raw bytes. Channel order is in `channels.json`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
|
| 59 |
+
### Image channels (cell.bin)
|
| 60 |
|
| 61 |
+
| 0 | 1 | 2 | 3 | 4 |
|
| 62 |
+
|---|---|---|---|---|
|
| 63 |
+
| DNA (Hoechst) | AGP (Phalloidin+WGA) | ER (ConA) | Mito (MitoTracker DR) | RNA (SYTO 14) |
|
| 64 |
|
| 65 |
+
This order differs from JUMP-CP v2 `[DNA, ER, RNA, AGP, Mito]` and Recursion
|
| 66 |
+
`[DNA, ER, AGP, RNA, Mito, ...]`. Cross-dataset code must remap by name.
|
|
|
|
|
|
|
| 67 |
|
| 68 |
+
### Mask channels (mask.bin)
|
|
|
|
| 69 |
|
| 70 |
+
| 0 | 1 |
|
| 71 |
+
|---|---|
|
| 72 |
+
| nucleus | cell |
|
| 73 |
|
| 74 |
+
Binary uint8 in {0, 255}. Identical across all four views.
|
| 75 |
|
| 76 |
+
### JSON metadata
|
| 77 |
|
| 78 |
+
| field | dtype | example |
|
| 79 |
|---|---|---|
|
| 80 |
+
| `row_key` | str | `source_4__20210922_Run1__BR00121430__J18__1__27` |
|
| 81 |
+
| `source` | str | `source_4` |
|
| 82 |
+
| `batch` | str | `source_4` |
|
| 83 |
+
| `plate` | str | `BR00121430` |
|
| 84 |
+
| `well` | str | `J18` |
|
| 85 |
+
| `tile` | str | `1` |
|
| 86 |
+
| `id_local` | int | `27` |
|
| 87 |
+
| `perturbation` | str | `IAZDPXIOMUYVGZ-UHFFFAOYSA-N` |
|
| 88 |
+
| `Metadata_InChIKey` | str | `IAZDPXIOMUYVGZ-UHFFFAOYSA-N` |
|
| 89 |
+
| `Metadata_PlateType` | str | `COMPOUND` or `TARGET2` |
|
| 90 |
+
| `nuc_area`, `cyto_area` | int | nuclear / cytoplasm pixel counts |
|
| 91 |
+
| `nuc_cyto_ratio` | float | derived |
|
| 92 |
+
| `n_cells_in_fov`, `n_cells_scaled` | int, float | local density |
|
| 93 |
+
|
| 94 |
+
`metadata.parquet` mirrors the JSON fields and adds `shard_index` and
|
| 95 |
+
`key_in_shard` for direct cell lookup.
|
| 96 |
+
|
| 97 |
+
## Stats
|
| 98 |
+
|
| 99 |
+
645,390 cells, 43 shards, 10 sources, 900 plates,
|
| 100 |
+
1467 compounds. Plate library: COMPOUND 445,968 cells, TARGET2 199,422 cells.
|
| 101 |
+
Held-out evaluation batch: `source_4` (21,177 cells).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 102 |
|
| 103 |
## License
|
| 104 |
|
| 105 |
+
CC0 1.0. Anonymous NeurIPS 2026 Datasets and Benchmarks submission; citation
|
| 106 |
+
on acceptance.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|