Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,37 +1,26 @@
|
|
| 1 |
---
|
| 2 |
license: mit
|
| 3 |
-
language: en
|
| 4 |
tags:
|
| 5 |
- spatial-transcriptomics
|
| 6 |
- computational-pathology
|
| 7 |
- histology
|
| 8 |
- gene-expression-prediction
|
| 9 |
- uncertainty-quantification
|
| 10 |
-
- bayesian-deep-learning
|
| 11 |
-
- he-staining
|
| 12 |
-
- transformer
|
| 13 |
-
- pathology-foundation-model
|
| 14 |
-
datasets:
|
| 15 |
-
- HER2ST
|
| 16 |
-
- cSCC
|
| 17 |
-
- PRAD-HEST
|
| 18 |
-
- TCGA-BRCA
|
| 19 |
pipeline_tag: image-to-image
|
| 20 |
---
|
| 21 |
|
| 22 |
-
# DELPHI
|
| 23 |
|
| 24 |
-
Pre-trained
|
| 25 |
-
that predicts spatially resolved gene expression from routine H&E-stained
|
| 26 |
-
histology images with calibrated dual-scale confidence (spot-level + gene-level).
|
| 27 |
|
| 28 |
-
|
|
|
|
| 29 |
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
|
| 33 |
-
|
|
| 34 |
-
| `
|
| 35 |
|
| 36 |
## Usage
|
| 37 |
|
|
@@ -39,23 +28,19 @@ histology images with calibrated dual-scale confidence (spot-level + gene-level)
|
|
| 39 |
from src.model import DELPHI
|
| 40 |
import torch
|
| 41 |
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
model.load_state_dict(state)
|
| 46 |
model.eval()
|
| 47 |
|
| 48 |
-
#
|
| 49 |
with torch.no_grad():
|
| 50 |
mu, log_phi, pi, sigma_al, sigma_ep = model(x, pos)
|
| 51 |
```
|
| 52 |
|
| 53 |
## Architecture
|
| 54 |
|
| 55 |
-
|
| 56 |
-
- **Grid**: 12×12 Swin Transformer with K=8 window self-attention
|
| 57 |
-
- **Head**: Bayesian Last Layer (BLL) + Hurdle-Gaussian with zero-inflation
|
| 58 |
-
- **Output**: Per-spot gene expression (785 genes) + dual-scale confidence (sigma_ep, gene-conf)
|
| 59 |
|
| 60 |
## Citation
|
| 61 |
|
|
@@ -68,7 +53,3 @@ with torch.no_grad():
|
|
| 68 |
year={2025}
|
| 69 |
}
|
| 70 |
```
|
| 71 |
-
|
| 72 |
-
## License
|
| 73 |
-
|
| 74 |
-
MIT. The UNI2-h foundation model is subject to CC BY-NC 4.0.
|
|
|
|
| 1 |
---
|
| 2 |
license: mit
|
|
|
|
| 3 |
tags:
|
| 4 |
- spatial-transcriptomics
|
| 5 |
- computational-pathology
|
| 6 |
- histology
|
| 7 |
- gene-expression-prediction
|
| 8 |
- uncertainty-quantification
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
pipeline_tag: image-to-image
|
| 10 |
---
|
| 11 |
|
| 12 |
+
# DELPHI
|
| 13 |
|
| 14 |
+
Pre-trained weights for the DELPHI model described in:
|
|
|
|
|
|
|
| 15 |
|
| 16 |
+
> *DELPHI: Dual-scale calibrated confidence enables trustworthy spatial gene
|
| 17 |
+
> expression prediction from histology.* Under review.
|
| 18 |
|
| 19 |
+
## Model
|
| 20 |
+
|
| 21 |
+
| File | Size | Description |
|
| 22 |
+
|------|------|-------------|
|
| 23 |
+
| `delphi_her2st.pt` | 34 MB | HER2ST full-dataset model (seed 42, epoch 22) |
|
| 24 |
|
| 25 |
## Usage
|
| 26 |
|
|
|
|
| 28 |
from src.model import DELPHI
|
| 29 |
import torch
|
| 30 |
|
| 31 |
+
model = DELPHI(uni2h_dim=1536, hidden_dim=384, num_genes=785,
|
| 32 |
+
gh=12, gw=12, knn_k=8, n_swin_blocks=4)
|
| 33 |
+
model.load_state_dict(torch.load("delphi_her2st.pt", map_location="cpu"))
|
|
|
|
| 34 |
model.eval()
|
| 35 |
|
| 36 |
+
# Inference: x [N, 1536] UNI2-h features, pos [N, 2] coordinates
|
| 37 |
with torch.no_grad():
|
| 38 |
mu, log_phi, pi, sigma_al, sigma_ep = model(x, pos)
|
| 39 |
```
|
| 40 |
|
| 41 |
## Architecture
|
| 42 |
|
| 43 |
+
Frozen UNI2-h ViT encoder → 12×12 Swin grid (K=8) → Bayesian Last Layer → Hurdle-Gaussian head
|
|
|
|
|
|
|
|
|
|
| 44 |
|
| 45 |
## Citation
|
| 46 |
|
|
|
|
| 53 |
year={2025}
|
| 54 |
}
|
| 55 |
```
|
|
|
|
|
|
|
|
|
|
|
|