Gangsu Kim, and Won-Ki Jeong†, HVCL@KU
† Corresponding Author
LaGuadia (Language-Guided Adaptive DistillAtion), a framework that develops a compact pathology image encoder by dynamically integrating expertise from multiple PFMs under clinical linguistic guidance
We use CLAM, integrated within TRIDENT, for tissue segmentation and patching.
git clone https://github.com/mahmoodlab/trident.git && cd trident
pip install -e .
git clone https://github.com/hvcl/LaGuadia.git && cd LaGuadia
pip install -r requirements.txt
Note
For efficient training, pre-extracting teacher features before training is highly recommended.
Before training, keyword extraction from pathology reports must be performed.
Keyword extraction can be done via preparing/generate_keywords.py.
Tip
For the TCGA-{BRCA, STAD, THCA} cohorts, you can skip this step by using the provided CSV files in data
python ./preparing/generate_keywords.py
2a. Prepare data
The root_dir containing extracted features should follow the structure below:
root_dir/
├── uni/
├── gigapath/
├── virchow2/
└── medgemma/
2b. Train Stage-2
python train_stage2.py --config-name train-stage-2-configs
python train_stage3.py --config-name train-stage-3-configs
Will be available soon
This implementation builds on ideas and components from several excellent open-source projects. We thank the authors of:
Please cite the corresponding papers when using their models, code, or training recipes.