Skip to content

birkhoffkiki/DTR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

header
Arxiv Page GitHub last commit X (formerly Twitter) Follow Python Version PyTorch


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.

main_figure

Overview

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

Key Features

  • 🚀 High-quality transformations
  • 🔄 Misalignment-resistant
  • ⏱️ Fast inference
  • 📊 Multi-dataset support
  • 🧠 Modular architecture

Installation

Setup

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

Data preparation

Training

# For Aperio-Hamamatsu dataset
bash train_aperio.sh

# For HEMIT dataset
bash train_hemit.sh

Pretrained Models

Model Name Download Link
AF2HE Weight Download
HE2PAS Weight Download
HEMIT Weight Download
Aperio Weight Download

Inference

Example notebook: play_with_the_pretrained_model.ipynb

contact

if you have any questions, please feel free to contact me:

Citation

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

Packages

 
 
 

Contributors