Whole Slide Imaging with RAPIDS
Prerequisites: See on ngc.nvidia.com/catalog/containers/nvidia:rapidsai:rapidsai for details
- WDI_Dask_Notebook.ipynb - the first notebook to run which generates features from the patient_100_node_0.tif
- WSI_cugraph.ipynb - the second notebook, which uses the wsi_dfx file generated by the previous notebook
- docker_build - folder containing a docker container build script
- Dockerfile - file used to build a local Docker container that has all the dependencies needed
Steps to run the pipeline:
Launch a terminal in the root of the repo folder
Copy the following files into this directory
- M2_WEIGHTS.PT - model weights for the VAE. Provided so that training it is optional https://drive.google.com/file/d/1OJzBs5nCnMtvtnFp9EAt345dF8DfTl7L/view?usp=sharing
- patient_100_node_0.tif - WSI from the Camelyon 16 dataset https://drive.google.com/file/d/10IUHPUPlU4FcKLU9pUO9UEdTG30zigk0/view?usp=sharing
- wsi_dfx - a dataframe containing tile features. https://drive.google.com/file/d/1ILpogNHhWjraYAZMalAx11MXy5D8h7W7/view?usp=sharing
cd docker_build
docker build -t wsi_demo:v1 .
You can then run the container that this builds after returning to the root folder:
cd ..
docker run –gpus all –rm -it –ipc=host -p 8808:8888 -v [absolute path to current folder]:notebooks wsi_demo:v1
The host folder should appear as 'notebooks' in the container, which means you can load and save things easily from the container. create a symlink:
ln -s /notebooks notebooks
This should make the folder appear in Jupyter
Once this is done, you should be able to simply browse to the jupyter lab using localhost:8808/lab
Load WSI_Dask_Notebook.ipynb to threshold the WSI and feature-encode it Load WSI_cugraph.ipynb to analyse the features with RAPIDS