JWonderLand commited on
Commit
5f50ff3
·
verified ·
1 Parent(s): b43f3c2

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +58 -7
README.md CHANGED
@@ -1,10 +1,61 @@
1
  ---
2
- tags:
3
- - image-classification
4
- - timm
5
- - transformers
6
- pipeline_tag: image-classification
7
  library_name: timm
8
- license: apache-2.0
9
  ---
10
- # Model card for StainNet-Base
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ license: cc-by-nc-nd-4.0
3
+ language:
4
+ - en
5
+ pipeline_tag: image-feature-extraction
 
6
  library_name: timm
 
7
  ---
8
+ # Model Card for StainNet-Base
9
+
10
+ <!-- Provide a quick summary of what the model is/does. -->
11
+
12
+ `StainNet-Base` is a foundation model for histology images from **immunohistochemistry** and **special stains**. Arxiv preprint paper: [https://arxiv.org/abs/2512.10326]
13
+
14
+ The model is a **Vision Transformer Base/16** with DINO [1] self-supervised pre-training on 1,418,938 patch images from 20,231 special staining whole slide images (WSIs) in HISTAI [2].
15
+
16
+ ## Using StainNet-Base to extract features from immunohistochemistry and special staining pathology images
17
+
18
+ ```python
19
+ import timm
20
+ import torch
21
+ import torchvision.transforms as transforms
22
+
23
+
24
+ model = timm.create_model('hf_hub:JWonderLand/StainNet-Base', pretrained=True)
25
+
26
+ preprocess = transforms.Compose([
27
+ transforms.Resize(224, interpolation=transforms.InterpolationMode.BICUBIC),
28
+ transforms.ToTensor(),
29
+ transforms.Normalize(mean=(0.5, 0.5, 0.5), std=(0.5, 0.5, 0.5)),
30
+ ])
31
+
32
+ model = model.to('cuda')
33
+ model.eval()
34
+
35
+ input = torch.randn([1, 3, 224, 224]).cuda()
36
+
37
+ with torch.no_grad():
38
+ output = model(input) # [1, 768]
39
+ ```
40
+
41
+ ## Citation
42
+
43
+ If `StainNet-Base` is helpful to you, please cite our work.
44
+
45
+ ```
46
+ @misc{li2025stainnet,
47
+ title={StainNet: A Special Staining Self-Supervised Vision Transformer for Computational Pathology},
48
+ author={Jiawen Li and Jiali Hu and Xitong Ling and Yongqiang Lv and Yuxuan Chen and Yizhi Wang and Tian Guan and Yifei Liu and Yonghong He},
49
+ year={2025},
50
+ eprint={2512.10326},
51
+ archivePrefix={arXiv},
52
+ primaryClass={cs.CV},
53
+ url={https://arxiv.org/abs/2512.10326},
54
+ }
55
+ ```
56
+
57
+ ## References
58
+
59
+ [1] Caron, M., Touvron, H., Misra, I., Jégou, H., Mairal, J., Bojanowski, P., & Joulin, A. (2021). Emerging properties in self-supervised vision transformers. In Proceedings of the IEEE/CVF international conference on computer vision (pp. 9650-9660).
60
+
61
+ [2] Nechaev, D., Pchelnikov, A., & Ivanova, E. (2025). HISTAI: An Open-Source, Large-Scale Whole Slide Image Dataset for Computational Pathology. arXiv preprint arXiv:2505.12120.