###Code for whole slide image prediction using our model MCSpatNet (Multi-Class Cell Detection Using Spatial Context Representation, ICCV 2021)
LYM_PREDICTION_BATCH_SIZE
: The batch size to use.
BASE_DIR
=< The full path to the src_prediction
directory >
OUT_DIR
=< The full path to the output directory >
PREDICTION_INTERMEDIATE_FOLDER
=< The full path for intermediate patch results >
POSTPROCESS_DIR
=< The full path for processed patch results >
JSON_OUTPUT_FOLDER
=< The full path for final quip format patch results >
SVS_INPUT_PATH
=< The full path to the WSI files >
PATCH_PATH
=< The full path to the output from WSI patch extraction >
LYM_NECRO_CNN_MODEL_PATH
=< The full path to trained MCSpatNet model >
CSV_OUTPUT_FOLDER
=< The full path for results in csv format >
cd src_prediction/scripts
CUDA_VISIBLE_DEVICES='0' nohup bash svs_2_heatmap.sh &
Python >= 3.6
Pytorch >= 1.0
Openslide
numpy
OpenCV
conda create --name wsi-pytorch -c pytorch -c conda-forge python=3.7 pytorch torchvision torchaudio cudatoolkit=11.3 openslide openslide-python pandas scikit-learn scikit-image opencv
If you find this code helpful, please cite our paper:
@InProceedings{Abousamra_2021_ICCV,
author = {Abousamra, Shahira and Belinsky, David and Van Arnam, John and Allard, Felicia and Yee, Eric and Gupta, Rajarsi and Kurc, Tahsin and Samaras, Dimitris and Saltz, Joel and Chen, Chao},
title = {Multi-Class Cell Detection Using Spatial Context Representation},
booktitle = {Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV)},
year = {2021},
}