Cross-Stain Contrastive Learning for Paired Immunohistochemistry and Histopathology Slide Representation ( CSCL)
We provide bash script for training and inference on Our dataset Before running the code, ensure you have downloaded these dataset and preprocess following CONCH You can download our dataset from
The list of useful parameters is as follows:
local_dir: this is the path where you put your '.pt' files for patch features.model_dir: the location of CS or CL model weights.slide_embedding_pkl: the way to slide embedding.label_path: the way to test dataset label CSV file.
cd CL
cd ./bin
bash ../scripts/train_adapter.shbash extract_Adapter_embedding.shcd CS
cd ./bin
bash ../scripts/launch_pretrain_withStainEncodings.shcd ./bin
python extract_slide_embeddings.py
python run_linear_probing.py