wakeupR41n commited on
Commit
4f694bc
·
verified ·
1 Parent(s): 06ee305

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +14 -33
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: Deep Epistemic Learning for Pathology-Histology Inference
23
 
24
- Pre-trained model weights for DELPHI, a Bayesian deep learning framework
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
- ## Model Variants
 
29
 
30
- | Variant | Use | Files | Size |
31
- |---------|-----|-------|------|
32
- | `her2st_loocv/` | Fig 2: HER2ST cross-donor LOOCV | 40 × ~43 MB | ~1.7 GB |
33
- | `cscc_loocv/` | Fig 2: cSCC cross-donor LOOCV | 20 × ~43 MB | ~860 MB |
34
- | `her2st_full/` | Fig 3/5: HER2ST full-dataset + cross-organ transfer | 5 × ~43 MB | ~215 MB |
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
- # Load a LOOCV checkpoint
43
- model = DELPHI(uni2h_dim=1536, hidden_dim=384, num_genes=785, gh=12, gw=12, knn_k=8, n_swin_blocks=4)
44
- state = torch.load("delphi_her2st_loocv_A_s42.pt", map_location="cpu")
45
- model.load_state_dict(state)
46
  model.eval()
47
 
48
- # Run inference (x: [N, 1536] UNI2-h features, pos: [N, 2] pixel coordinates)
49
  with torch.no_grad():
50
  mu, log_phi, pi, sigma_al, sigma_ep = model(x, pos)
51
  ```
52
 
53
  ## Architecture
54
 
55
- - **Backbone**: Frozen UNI2-h ViT-G encoder (1.5B params, 1536-dim features)
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
  ```