DiffVS
virtual staining of histological images
2 min readupdated
The DiffVS model solves the task of predicting 16-marker multiplex immunofluorescence (mIF) from standard hematoxylin and eosin (H&E) stained histological tiles (image fragments). Researchers receive a set of biomarker distribution images (such as CD31, CD4, Ki67, and others) without performing physical staining. The architecture is based on a marker-wise conditioned diffusion model leveraging Stable Diffusion 2 weights as its foundation. Created by researchers from leading universities and presented at the AAAI 2026 conference, it is useful for pathologists and cancer researchers for digital micro-specimen analysis.
Key features
- Two-stage architecture: includes a pairwise latent diffusion stage (Marigold style) and an accelerated Diffusion-FT stage for single-step inference.
- 16 markers: supports simultaneous prediction of 16 different biological markers (including CD4, CD8a, FOXP3, PD-L1).
- SD2 compatibility: integration with Stable Diffusion 2 base components for text and latent space encoding.
- Ready checkpoints: official weights for both training stages from the ORION-CRC dataset work.
What you can do
- Run inference (Stage 2): perform fast single-step marker prediction for histological tiles using the repository script.
- Deep analysis (Stage 1): run the 50-step DDIM method to obtain more accurate latent representations.
- Select a subset of markers: use the command-line argument to generate only desired markers (for example, CD3e and Pan-CK).
- Explore the tumor microenvironment: apply the model to colorectal cancer datasets (ORION-CRC) for research purposes.
Example
# Запуск одношагового инференса Stage 2 для модели DiffVS
PYTHONPATH=src python -m diffvs.infer_diffusion_ft \
--dataset orion --dataset-root /path/to/ORIONCRC_dataset_tile_20x \
--checkpoint-dir hf://Hyun-Jic/DiffVS/orion/stage2 \
--pretrained-model Manojb/stable-diffusion-2-base \
--output-dir ./outputs/orion_stage2 --max-rows 8Read more
DetailsMetrics on the ORION test split: macro-AUPRC 0.372, ROC AUC 0.806, balanced accuracy 0.736.
Limitations: trained exclusively on colorectal cancer data (ORION-CRC); quality is not guaranteed for other organs and scanners.
Intended use: for research purposes only, not for clinical diagnosis.
License: CC BY-NC 4.0 (non-commercial use).










Comments