Skip to content

Latest commit

 

History

History
85 lines (54 loc) · 3.24 KB

README.md

File metadata and controls

85 lines (54 loc) · 3.24 KB

Pancreas cancer (PAAD) detection pipeline

This software implements the pipeline for the Pancreas cancer detection project. The repo contains codes to perform the prediction to detect Pancreatic cancer in Whole Slide Images. The paper was published in MICCAI 2019 "Pancreatic Cancer Detection in Whole Slide Images Using Noisy Label Annotations"

TCGA Data:

  • Output heatmaps: *.png files, pixel's value is the predicted probability of the patch to contain cancerous cells. Download output heatmaps here.

Dependencies

List of folders and functionalities are below:

  • scripts/: contains scripts that connect several sub-functionalities together for complete functionalities such as generating camicroscope heatmaps given svs images.

  • conf/: contains configuration.

  • data/: a place where should contain all logs, input/output images, trained CNN models, and large files.

  • download_heatmap/: downloads grayscale lymphocyte or tumor heatmaps

  • heatmap_gen/: generate json files that represents heatmaps for camicroscope, using the lymphocyte and necrosis CNNs' raw output txt files.

  • patch_extraction_tumor_40X/: extracts all patches from svs images. Mainly used in the test phase.

  • prediction/: CNN prediction code.

  • training_codes/: CNN training code.

Setup conf/variables.sh

  • Change the BASE_DIR to the path of your folder after you clone the git repo

Training

  • Go to folder "training_codes", run python paad_baseline_preact-res34_AUC_exclude_valSlides.py

WSIs prediction

  • Go to folder "scripts", run bash svs_2_heatmap.sh

Docker Instructions

Build the docker image by:

docker build -t paad_detection . (Note the dot at the end).

Step 1:

Create folder named "data" and subfolders below on the host machine:

  • data/svs: to contains *.svs files
  • data/patches: to contain output from patch extraction
  • data/log: to contain log files
  • data/heatmap_txt: to contain prediction output
  • data/heatmap_jsons: to contain prediction output as json files

Step 2:

  • Run the docker container as follows:
nvidia-docker run --name paad-detection -itd -v <path-to-data>:/data -e CUDA_VISIBLE_DEVICES='<cuda device id>' paad_detection  svs_2_heatmap.sh 

CUDA_VISIBLE_DEVICES -- set to select the GPU to use

The following example runs the cancer detection pipeline. It will process images in /home/user/data/svs and output the results to /home/user/data.

nvidia-docker run --name paad-detection -itd -v /home/user/data:/data -e CUDA_VISIBLE_DEVICES='0' paad_detection  svs_2_heatmap.sh

Citation:

@inproceedings{le2019paad,
  title={Pancreatic Cancer Detection in Whole Slide Images Using Noisy Label Annotations},
  author={Han, Le and Dimitris, Samaras and Tahsin, Kurc and Rajarsi, Gupta and Kenneth, Shroyer and Joel, Saltz },
  booktitle={International Conference on Medical Image Computing and Computer-Assisted Intervention},
  year={2019},
  organization={Springer}
}