Presented at the iMIMIC Workshop at MICCAI 2022
We show that interpretable modeling with attention-based deep learning can be used as a means to uncover highly non-trivial patterns which are otherwise imperceptible to the human eye. In this application to colorectal cancer histology, interpretability reveals connections between the microscopic appearance of cancer tissue and its gene expression profiling. We estimate the expression values of a well-known subset of genes that is indicative of cancer molecular subtype, survival, and treatment response in colorectal cancer. Our approach successfully identifies meaningful information from the image slides, highlighting hotspots of high gene expression. Explore the docs »
View Demo
To get a local copy up and running follow these simple steps.
The list of libraries and packages required to run the code can be found in prerequisites.txt Note that to train the models, you will need at least one GPU supporting PyTorch 1.12.1
To install the repo in your virtual environment, run the following:
- Clone the repo
git clone https://github.com/maragraziani/interpretableWSItoRNAseq.git
- Install NPM packages
python3 -m pip install -r prerequisites.txt
The code is based on the model in Unleashing the potential of digital pathology data by training computer-aided diagnosis models without human annotations. For the full set of functionalities that this model offers, please see the main repo
To run our version of the attention-based gene expression regression, you can run the command below with our extended version of the original source code. The description of the configurable options is given below.
python train.py -c [MODEL_TYPE] -b [BATCH_SIZE] -p att -g [GENE_NAME] -e [N_EPOCHS] -t geneExp -f True -i [PATH_TO_INPUT_FILE_LIST] -o [SAVE_FOLDER] -w [PATH_TO_INPUT_IMAGES]
Note that in our experiments:
To preprocess the input Whole Slide Images, please see the MultiScale_Tools library. For instance, you can run the following from the preprocessing library of the toolbox
python Patch_Extractor_Dense_Grid.py -m 10 -w 1.25 -p 10 -r True -s 224 -x 0.7 -y 0 -i /PATH/CSV/IMAGES/TO/EXTRACT.csv -t /PATH/TISSUE/MASKS/TO/USE/ -o /FOLDER/WHERE/TO/STORE/THE/PATCHES/
Distributed under the MIT License. See LICENSE
for more information.
Mara Graziani - @mormontre - mgr@zurich.ibm.com // mara.graziani@hevs.ch
Project Link: https://github.com/maragraziani/interpretableWSItoRNAseq