AutoIHC / README.md
tuoyin's picture
Update README.md
c4bcaf4 verified
|
Raw History Blame Contribute Delete
3.95 kB
metadata
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 · Code

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:

pip install torch huggingface_hub

Download a single checkpoint:

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):

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:

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:

@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}
}