File size: 3,946 Bytes
2e8adc6 ea418da 7c75864 2e8adc6 ddac2ef ea418da ddac2ef c4bcaf4 ddac2ef c4bcaf4 ddac2ef | 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 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | ---
license: cc-by-nc-sa-4.0
tags:
- pytorch
- computational-pathology
- immunohistochemistry
- IHC
- whole-slide-image
- breast-cancer
- H-score
- stain-quantification
pipeline_tag: image-segmentation
---
# AutoIHC: Pretrained Weights
This repository provides the pretrained model weights used in our paper:
> **Fully Automated Stain Quantification Framework for IHC Whole Slide Images in Breast Cancer**
> Tuo Yin, Frédéric Lifrange, Zoë Denis, Alex de Caluwé, Laurence Buisseret, Xavier Catteau, Clara Legros, Nick Reynaert, Jennifer Dhont
> *Technology in Cancer Research & Treatment*, 25, 2026
> [Paper](https://journals.sagepub.com/doi/full/10.1177/15330338251407734) · [Code](https://github.com/YinTuo/AutoIHC)
The weights were trained on our **internal dataset** of immunohistochemistry (IHC) whole slide images of breast cancer, as described in the paper. They are released so that others can reproduce our results and apply the framework to their own data.
## Repository structure
The weights are organized by framework module and method. For each method, we provide five models from 5-fold cross-validation (`fold_0` to `fold_4`), each being the best checkpoint on its validation fold.
```
H-score model weights/
├── TSM/ # module 1: tumor–stroma segmentation
│ ├── <method_A>/
│ │ ├── best_model_fold_0.pth
│ │ ├── best_model_fold_1.pth
│ │ ├── best_model_fold_2.pth
│ │ ├── best_model_fold_3.pth
│ │ └── best_model_fold_4.pth
│ └── <method_B>/
│ └── ...
├── NSM/ # module 2: nuclei segmentation
│ └── ...
└── HEM/ # module 3: H-score estimation
└── ...
```
## Training data
All models were trained on an internal, non-public dataset of breast cancer IHC whole slide images. The dataset itself is **not** included in this repository.
## Usage
Install the dependencies:
```bash
pip install torch huggingface_hub
```
Download a single checkpoint:
```python
from huggingface_hub import hf_hub_download
import torch
path = hf_hub_download(
repo_id="OncoAI-ULBHUB/AutoIHC",
filename="checkpoint/TSM/MoCo-SM/best_model_fold_0.pth",
local_dir="C:/Users/yint/Downloads", # replace with your own download folder (change as needed)
)
state_dict = torch.load(path, map_location="cpu")
```
Download all five folds of one method (e.g. for ensembling):
```python
from huggingface_hub import snapshot_download
local_dir = snapshot_download(
repo_id="OncoAI-ULBHUB/AutoIHC",
allow_patterns=["checkpoint/<module>/<method>/*"], # e.g. "checkpoint/TSM/MoCo-SM/*" (change as needed)
local_dir="C:/Users/yint/Downloads", # replace with your own download folder (change as needed)
)
```
Download everything:
```bash
hf download OncoAI-ULBHUB/AutoIHC --local-dir ./AutoIHC
```
## Intended use and limitations
These weights are intended for **research use only**. They are not a medical device and must not be used for clinical diagnosis or treatment decisions.
Because the models were trained on a single internal dataset, performance may drop on slides from other institutions, scanners, staining protocols or IHC markers. We recommend validating on your own data, and fine-tuning if needed, before drawing conclusions.
## Citation
If you use these weights, please cite our paper:
```bibtex
@article{yin2026fully,
title={Fully Automated Stain Quantification Framework for IHC Whole Slide Images in Breast Cancer},
author={Yin, Tuo and Lifrange, Fr{\'e}d{\'e}ric and Denis, Zo{\"e} and de Caluw{\'e}, Alex and Buisseret, Laurence and Catteau, Xavier and Legros, Clara and Reynaert, Nick and Dhont, Jennifer},
journal={Technology in Cancer Research \& Treatment},
volume={25},
pages={15330338251407734},
year={2026},
publisher={SAGE Publications Sage CA: Los Angeles, CA}
}
``` |