File size: 4,566 Bytes
a80e011
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
---
license: mit
pretty_name: CELL-FM Virtual OpenCell
tags:
  - biology
  - microscopy
  - protein
  - virtual-staining
  - opencell
size_categories:
  - 100K<n<1M
viewer: false
---

# CELL-FM Virtual OpenCell

CELL-FM's virtual staining of 1,276 [OpenCell](https://opencell.sf.czbiohub.org) proteins:
fluorescence images generated from each protein's amino-acid sequence alone, in 2D and in 3D.

- Browse them in the **Virtual OpenCell** tab of the demo: [huggingface.co/spaces/BoHuangLab/CELL-FM](https://huggingface.co/spaces/BoHuangLab/CELL-FM)
- Model weights: [huggingface.co/BoHuangLab/CELL-FM](https://huggingface.co/BoHuangLab/CELL-FM)
- Code: [github.com/BoHuangLab/CELL-FM](https://github.com/BoHuangLab/CELL-FM)

Every image is drawn in the same cell. The nucleus channel is one real OpenCell nucleus, from
an ATG7 cell line, shared by every protein; CELL-FM generates the protein channel from the
sequence. Differences between proteins therefore come from the sequence, not from the cell, and
a protein's samples are independent draws for that same nucleus.

## Contents

| Path | Files | Each file |
|---|---|---|
| `OpenCell/virtual_staining/<GENE>/NNNN.tif` | 93,510 (30-215 per protein), 24.6 GB | 2D: `(2, 256, 256)` uint16, channels nucleus, protein |
| `OpenCell/virtual_staining_3d/<GENE>/NNNN.tif` | 81,664 (64 per protein), 579 GB | 3D: `(48, 2, 192, 192)` uint16, z first, then nucleus, protein |
| `OpenCell/virtual_staining_3d_thumbnails/<GENE>.jpg` | 1,276 | Preview sheet of a protein's 64 3D samples |

- **Proteins.** The 1,276 OpenCell proteins with sequences of at most 2,048 residues; the other
  35 of OpenCell's 1,311 are longer and were left out. Folder names are OpenCell gene names.
  `opencell/vs_genes.csv` in the model repo lists all 1,311 with UniProt and Ensembl
  identifiers, OpenCell's localization annotations and sequences.
- **Numbering.** Each protein's files run from `0001.tif` without gaps, so a sample can be
  requested by name without listing the repo.
- **2D.** Made with `opencell/cellfm_vs.bin` from the model repo. Each protein has as many
  samples as OpenCell has real 256 x 256 crops of its cell line, so the set mirrors OpenCell's
  2D projection crops protein for protein. The shared nucleus is
  `opencell/vs_anchor_nucleus.npy` in the model repo. `opencell/vs_umap_embedding.npz` holds a
  UMAP of all 93,510 samples, the map shown in the demo.
- **3D.** Made with CELL-FM's 3D model, whose weights are not in the model repo. Each sample is
  a 48 x 192 x 192 stack centred on the nucleus, so the middle slice (25 of 48) cuts through
  its centre. The files are ImageJ hyperstacks (48 slices x 2 channels) and open as such in
  Fiji. The voxel size is not recorded.
- **Intensities.** Values are relative, not camera counts: each channel is the model's
  [-1, 1] range mapped linearly to 0-65535, as `(x + 1) / 2 * 65535`. Rescale each image (for
  example to its 0.1-99.9 percentiles) before display.
- **Thumbnail sheets.** For previews only: each sheet is an 8 x 8 grid of 96 x 96 tiles, sample
  1 at top left, showing the middle slice of each 3D sample rendered as in the demo (nucleus
  blue, protein grey).

## Usage

```python
from huggingface_hub import hf_hub_download, snapshot_download
import tifffile

# one 2D sample
path = hf_hub_download("BoHuangLab/CELL-FM", "OpenCell/virtual_staining/TOMM20/0001.tif",
                       repo_type="dataset")
nucleus, protein = tifffile.imread(path)  # each (256, 256) uint16

# all 3D samples of one protein (about 450 MB)
root = snapshot_download("BoHuangLab/CELL-FM", repo_type="dataset",
                         allow_patterns="OpenCell/virtual_staining_3d/TOMM20/*")
stack = tifffile.imread(f"{root}/OpenCell/virtual_staining_3d/TOMM20/0001.tif")
print(stack.shape)  # (48, 2, 192, 192): z, channel (nucleus, protein), y, x
```

The whole 2D set: `hf download BoHuangLab/CELL-FM --repo-type dataset --include "OpenCell/virtual_staining/*"`.

## Source

The nucleus image and the list of proteins come from OpenCell (Cho et al., *Science* 2022,
[opencell.sf.czbiohub.org](https://opencell.sf.czbiohub.org)). The protein images are CELL-FM's
predictions, not measurements.

## Citation

```bibtex
@article{zheng2026virtual,
  title   = {Virtual experiments bridge sequence and microscopy with generative models},
  author  = {Zheng, Dihan and Hong, Kibeom and Huang, Bo},
  journal = {bioRxiv},
  year    = {2026},
  doi     = {10.64898/2026.09.13.751243},
  url     = {https://www.biorxiv.org/content/10.64898/2026.09.13.751243v1}
}
```