AutoIHC
Automated Analysis of Breast Cancer Histology Slides
2 min readupdated
A set of pretrained weights for the AutoIHC framework from the OncoAI-ULBHUB research group, accompanying their 2026 paper in Technology in Cancer Research & Treatment. The model handles automated quantitative staining assessment on whole-slide immunohistochemistry (IHC) images for breast cancer. It separates tumor from stroma, segments cell nuclei, and calculates the H-score (a measure of staining intensity and the proportion of stained cells). Bioinformaticians and digital pathology researchers can use this tool to reproduce the paper's results or fine-tune it on their own data.
Key features
- Modular architecture: weights are split across three analysis stages — TSM (tumor and stroma segmentation), NSM (nuclei segmentation), and HEM (H-score evaluation).
- 5-fold cross-validation: five top checkpoints (from
fold_0tofold_4) are available for each method, making it easy to combine them into ensembles. - PyTorch support: models ship as standard
.pthweight files and load easily viahuggingface_hub.
What you can do
- Reproduce the study: run the pipeline from the official GitHub repository on your own IHC slides to evaluate H-scores.
- Build a model ensemble: download all five folds of a given method via
snapshot_downloadfor more stable predictions. - Fine-tune for your lab: use the checkpoints as a starting point to adapt the models to different scanners, staining protocols, or markers.
Example
from huggingface_hub import hf_hub_download
import torch
path = hf_hub_download(
repo_id="OncoAI-ULBHUB/AutoIHC",
filename="H-score model weights///best_model_fold_0.pth",
)
state_dict = torch.load(path, map_location="cpu")
Read more
DetailsTrained on a private in-house dataset of breast cancer IHC images (the dataset itself is not public).
Strictly for research purposes — this is not a medical device and is not suitable for clinical diagnosis.
Accuracy may drop on slides from different scanners or with other staining protocols and markers; the authors recommend validation and fine-tuning.










Comments