Lightweight overview of the full pipeline: prepare paired H&E/IHC WSIs, review them in a Dash viewer, and train a Pix2Pix model for stain translation.
data_prep/: WSIWorker pipeline for segmentation, manual selection, and VALIS registration (+ helper scripts inrun_code/).dash-plotly-wsi-viewer/: Dash app to browse tiled WSIs, pair IHC↔H&E segments, and collect alignment ratings.src/: Training and inference (PyTorch Lightning + Hydra) for Pix2Pix on paired patches.conf/: Hydra configs for paths, model, training, augmentations, and WandB.presi/: Slides for the project (PowerPoint + PDF) once uploaded.
- Copy
conf/wandb/wandb.yaml.exampletoconf/wandb/wandb.yaml. - Fill in your WandB entity/project (or disable via
wandb.enabled=falsein Hydra).
- Core pipeline (no Dash server): use the root-level
requirements.txt.- Submodules
data_prep/trident_sinclair,data_prep/mapping_frameworks/valis, and (optional)data_prep/mapping_frameworks/DeeperHistRegare not bundled inrequirements.txt; install them yourself from the checked-out submodules, e.g.:git submodule update --init data_prep/trident_sinclair data_prep/mapping_frameworks/valispip install -e data_prep/trident_sinclairpip install -e data_prep/mapping_frameworks/valis- (optional)
git submodule update --init data_prep/mapping_frameworks/DeeperHistReg && pip install -e data_prep/mapping_frameworks/DeeperHistReg
- Submodules
- Dash server: will ship with a
Dockerfileindash-plotly-wsi-viewer/to build/run the viewer in isolation; use that instead of the coredash-plotly-wsi-viewer/requirements.txt.
- Prep WSIs in
data_prep/- Segment tissue (
WSIWorker.segment_*), pick relevant regions, and register IHC→H&E with VALIS via the batch scripts indata_prep/run_code/(SimpleElastix + OpticalFlow outputs).
- Segment tissue (
- Serve & review in
dash-plotly-wsi-viewer/- Tile registered TIFFs, create
on_server.csv/pairs.json, and run the Dash server to rate alignments and mark approved pairs.
- Tile registered TIFFs, create
- Train Pix2Pix in
src/- Point Hydra paths to the processed dataset, then run
python src/train.py(optionallywandb.enabled=false). Usesrc/inference.pyfor checkpoints.
- Point Hydra paths to the processed dataset, then run
See the dedicated READMEs in each folder for details.