Thanks to visit codestin.com
Credit goes to GitHub.com

Skip to content

End-to-end pipeline for paired H&E–IHC whole-slide images: registration, interactive Dash-based review, and Pix2Pix-based virtual stain translation.

Notifications You must be signed in to change notification settings

mmmddd98/bioinfo_GAN

Repository files navigation

bioinfo_GAN

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.

Project overview slides

  • Full walkthrough is in presi/presi.pdf (project context + visuals).

Repo Layout

  • data_prep/: WSIWorker pipeline for segmentation, manual selection, and VALIS registration (+ helper scripts in run_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.

WandB config

  • Copy conf/wandb/wandb.yaml.example to conf/wandb/wandb.yaml.
  • Fill in your WandB entity/project (or disable via wandb.enabled=false in Hydra).

Python requirements

  • 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/DeeperHistReg are not bundled in requirements.txt; install them yourself from the checked-out submodules, e.g.:
      • git submodule update --init data_prep/trident_sinclair data_prep/mapping_frameworks/valis
      • pip install -e data_prep/trident_sinclair
      • pip 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
  • Dash server: will ship with a Dockerfile in dash-plotly-wsi-viewer/ to build/run the viewer in isolation; use that instead of the core dash-plotly-wsi-viewer/requirements.txt.

Workflow (end-to-end)

  1. Prep WSIs in data_prep/
    • Segment tissue (WSIWorker.segment_*), pick relevant regions, and register IHC→H&E with VALIS via the batch scripts in data_prep/run_code/ (SimpleElastix + OpticalFlow outputs).
  2. 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.
  3. Train Pix2Pix in src/
    • Point Hydra paths to the processed dataset, then run python src/train.py (optionally wandb.enabled=false). Use src/inference.py for checkpoints.

See the dedicated READMEs in each folder for details.

About

End-to-end pipeline for paired H&E–IHC whole-slide images: registration, interactive Dash-based review, and Pix2Pix-based virtual stain translation.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages