This is the official repository for our CVPR 2023 paper.
Check packages in requirements.txt. Despite torch and numpy for training, openslid-python
and nvidia-dali-cuda110
are quite important.
Mostly folked from CLAM, with minor modification. So just follow the docs to perform baseline, or with following steps:
- Preparing grid patches of WSI without overlap.
bash create_patches.sh
- Preparing pretrained patch features fow WSI head training.
bash create_feature.sh
- Training baseline WSI model.
bash train.sh
bash vib_train.sh
- Collecting top-k patches of WSI by inference vib model, save in pt form.
bash extract_topk_rois.sh
- Perform end-to-end training.
bash e2e_train.sh
Now you can use finetuned patch bakcbone in stage-2 to generate patch features, then run stage-1 again with the new features.
If you find this repository useful, please consider giving a star ⭐ and citation 🦖:
@InProceedings{Li_2023_CVPR,
author = {Li, Honglin and Zhu, Chenglu and Zhang, Yunlong and Sun, Yuxuan and Shui, Zhongyi and Kuang, Wenwei and Zheng, Sunyi and Yang, Lin},
title = {Task-Specific Fine-Tuning via Variational Information Bottleneck for Weakly-Supervised Pathology Whole Slide Image Classification},
booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
month = {June},
year = {2023},
pages = {7454-7463}
}