Saltar al contenido
ModelPublicadoExterno
Descargar

StainNet Base

StainNet-Base is a foundation model for histology images from immunohistochemistry and special stains. Arxiv preprint paper: [

TipoOtherVersiónRevision 9cc4f67Bcalidad

Fuente del modelo

Tipo
Other
Tamaño del archivo
327 MB
Versión
vRevision 9cc4f67
Actualizado
14 sept 2026
Descargas
151
Fuente
Hugging Face

Descripción de la fuente

Model Card for StainNet-Base

StainNet-Base is a foundation model for histology images from immunohistochemistry and special stains. Arxiv preprint paper: [https://arxiv.org/abs/2512.10326]

The model is a Vision Transformer Base/16 with DINO [1] self-supervised pre-training on 1,418,938 patch images from 20,231 immunohistochemistry and special stain whole slide images (WSIs) in HISTAI [2].

Using StainNet-Base to extract features from immunohistochemistry and special staining pathology images

import timm
import torch
import torchvision.transforms as transforms


model = timm.create_model('hf_hub:JWonderLand/StainNet-Base', pretrained=True)

preprocess = transforms.Compose([
            transforms.Resize(224, interpolation=transforms.InterpolationMode.BICUBIC),
            transforms.ToTensor(),
            transforms.Normalize(mean=(0.5, 0.5, 0.5), std=(0.5, 0.5, 0.5)),
        ])

model = model.to('cuda')
model.eval()

input = torch.randn([1, 3, 224, 224]).cuda()

with torch.no_grad():
    output = model(input) # [1, 768]

Citation

If StainNet-Base is helpful to you, please cite our work.

@misc{li2025stainnet,
      title={StainNet: A Special Staining Self-Supervised Vision Transformer for Computational Pathology}, 
      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},
      year={2025},
      eprint={2512.10326},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2512.10326}, 
}

References

[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).

[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.

Fuentes

1 fuente
Hugging FacePrincipalVersión 9cc4f679253e80017be95d7d623ac605ef09be23
huggingface.co/JWonderLand/StainNet-Base/tree/9cc4f679253e80017be95d7d623ac605ef09be23

Verificado 19 ago

Artefactos del modelo

2 artefactos

model.safetensors

safetensors · 327 MB · SHA-256 796d9d58abc2…f4ef · Hugging Face

Descargar

pytorch_model.bin

bin · 327 MB · SHA-256 429f4272c964…e40d · Hugging Face

Descargar

Extractos de fuentes

2 extractos

--- license: cc-by-nc-nd-4.0 language: - en pipeline_tag: image-feature-extraction library_name: timm --- # Model Card for StainNet-Base <!-- Provide a quick summary of what the model is/does. --> `StainNet-Base` is a foundation model for histology images from **immunohistochemistry** and **special stains**. Arxiv preprint paper: [https://arxiv.org/abs/2512.10326] The model is a **Vision Transformer Base/16** with DINO [1] self-supervised pre-training on 1,418,938 patch images from 20,231 immunohistochemistry and special stain whole slide images (WSIs) in HISTAI [2]. ## Using StainNet-Base to extract features from immunohistochemistry and special staining pathology images ```python import timm import torch import torchvision.transforms as transforms model = timm.create_model('hf_hub:JWonderLand/StainNet-Base', pretrained=True) preprocess = transforms.Compose([ transforms.Resize(224, interpolation=transforms.InterpolationMode.BICUBIC), transforms.ToTensor(), transforms.Normalize(mean=(0.5, 0.5, 0.5), std=(0.5, 0.5, 0.5)), ]) model = model.to('cuda') model.eval() input = torch.randn([1, 3, 224, 224]).cuda() with torch.no_grad(): output = model(input) # [1, 768] ``` ## Citation If `StainNet-Base` is helpful to you, please cite our work. ``` @misc{li2025stainnet, title={StainNet: A Special Staining Self-Supervised Vision Transformer for Computational Pathology}, 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}, year={2025}, eprint={2512.10326}, archivePrefix={arXiv}, primaryClass={cs.CV}, url={https://arxiv.org/abs/2512.10326}, } ``` ## References [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). [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.

Source context: 151 downloads · 3 likes · Pipeline image-feature-extraction · Library timm · Repo JWonderLand/StainNet-Base