H&E-to-MPX Virtual Staining#
Virtual staining assesses a model’s understanding of marker co-localization at the
subcellular level. The pipeline run_he_virtual_staining_tasks predicts
multiplex marker maps from H&E alone. It requires no benchmarks_config.
This pipeline evaluates models that translate H&E directly into multiplex marker maps, with no multiplex input at all (for example ROSIE, HistoPlexer, and GigaTIME). Each model is scored on the markers it shares with the dataset (dataset ∩ model), independently of what any other model in the same run supports.
Running the Benchmark#
model_config accepts a single path, a wildcard, or a list of model configs.
Multiple models are instantiated in the same run only so that their predictions
over the dataset’s tiles can be computed together (for example, so that ROSIE’s
cross-tile batching still applies); this has no effect on which markers are scored
for an individual model.
python -m spora_bench.benchmarks.run_he_virtual_staining_tasks \
model_config=<path-or-list-of-model-configs> \
datasets_config=<path-to-datasets-config>
For example, ROSIE, HistoPlexer, and GigaTIME on lin2023high:
python -m spora_bench.benchmarks.run_he_virtual_staining_tasks \
model_config=[configs/models/rosie.yaml,configs/models/histoplexer.yaml,configs/models/gigatime.yaml] \
datasets_config=configs/datasets/he_staining/lin2023high.yaml
n_crops, the number of randomly sampled tiles per dataset (default 1000), can be
overridden on the command line, for example n_crops=200.
Outputs#
Per-crop Pearson correlation, MSE, and SSIM, and their mean and standard deviation
across crops, are saved per model to output_dir/<model_name>/results/.
The datasets and configs used in the paper are listed in the Task Zoo.