Last Updated: 08/06/2026
Journal Link: https://www.nature.com/articles/s41467-026-71038-2
The official implementation of DGR, a generative AI model for virtual staining in histopathology workflows.
DGR is a novel framework designed for virtual staining of histopathology images with enhanced resistance to misalignment. Our method enables:
- High-fidelity stain transformation between different histopathology modalities
- Robust performance despite common tissue section misalignments
- Significant acceleration of histopathology workflows
- 🚀 High-quality transformations
- 🔄 Misalignment-resistant
- ⏱️ Fast inference
- 📊 Multi-dataset support
- 🧠 Modular architecture
- Clone this repository:
git clone https://github.com/birkhoffkiki/DTR.git
cd DTR
conda create --name DTR python=3.9
conda activate DTR
pip install -r requirements.txt- Aperio-Hamamatsu dataset: https://github.com/khtao/StainNet
- HEMIT dataset: https://github.com/BianChang/HEMIT-DATASET
# For Aperio-Hamamatsu dataset
bash train_aperio.sh
# For HEMIT dataset
bash train_hemit.sh| Model Name | Download Link |
|---|---|
| AF2HE Weight | Download |
| HE2PAS Weight | Download |
| HEMIT Weight | Download |
| Aperio Weight | Download |
Example notebook: play_with_the_pretrained_model.ipynb
if you have any questions, please feel free to contact me:
- JIABO MA, [email protected]
@article{ma2026generative,
title={Generative ai for misalignment-resistant virtual staining to accelerate histopathology workflows},
author={Ma, Jiabo and Li, Wenqiang and Li, Jinbang and Liu, Ziyi and Wu, Linshan and Zhou, Fengtao and Liang, Li and Chan, Ronald Cheong Kin and Wong, Terence TW and Chen, Hao},
journal={Nature Communications},
year={2026},
publisher={Nature Publishing Group UK London}
}
