Multi-Scale Heterogeneity-Aware Hypergraph Representation for Histopathology Whole Slide Images(ICME 2024)
Pytorch implementation for the Heterogeneous Hypergraph Representation learning in the paper Multi-Scale Heterogeneity-Aware Hypergraph Representation for Histopathology Whole Slide Images.
a. Create a conda virtual environment and activate it.
conda create -n H2GT python=3.9 -y
conda activate H2GT
b. Install PyTorch and torchvision following the official instructions, e.g.,
conda install pytorch torchvision -c pytorch
c. Install other libraries.
-
Install OpenSlide and openslide-python.
Tutorial 1 and Tutorial 2 (Windows). -
Install dgl
pip install dgl -f https://data.dgl.ai/wheels/cu118/repo.html pip install dglgo -f https://data.dgl.ai/wheels-test/repo.html
Please refer to CLAM for data pre-processing.
Data pre-processing: Download the raw WSI data and Prepare the patches.
The aggregator is firstly trained with bag-level labels end to end.
python construct_hypergraph.py --config /path/to/the/config
For different methods, we pre-set their config files in folder configs.
python main.py --config /path/to/the/config