MarvinLer / tcga_segmentation

Whole Slide Image segmentation with weakly supervised multiple instance learning on TCGA | MICCAI2020 https://arxiv.org/abs/2004.05024
GNU Affero General Public License v3.0
114 stars 35 forks source link
computational-pathology data-efficient histopathology image-segmentation medical-imaging miccai multiple-instance-learning pathology segmentation slide-image-segmentation tcga tcga-data tumor-segmentation weakly-supervised-learning whole-slide-imaging wsi

This repository is a software system containing an end-to-end Whole Slide Imaging pre-processing pipeline from The Cancer Genome Atlas download documents, as well as a complete implementation of deep learning tumor segmentation from WSI binary labels as detailed in "Weakly supervised multiple instance learning histopathological tumor segmentation".

Download 6461 tumor maps from The Cancer Genome Atlas

Example of WSI segmentations

Example of Whole Slide Image tumor segmentation (black background; blue: normal tissue; pink: neoplastic tissue).

Major features

This software is entirely written in Python3 and contains two major parts:

Installation

Use python3 and install mandatory libraries:

virtualenv -p python3 --system-site-packages venv
source venv/bin/activate
pip install -r requirements.txt 

Quick Start

Downloading TCGA cohorts + WSI pre-processing

  1. Download the GDC Data Transfer Tool executable (not included here for license issues)
  2. Constitute any cohort on the TCGA GDC Data Portal, then download the associated manifest file, and place it in a source_folder
  3. Launch the download and pre-processing pipeline with:
    python -m code.data_processing.main --gdc gdc_executable_path source_folder
    

This script first downloads all files in the manifest file, then tiles WSI, extracts tiles of a given magnification, removes background tiles, and finally seeks to extract per-slide binary labels from their name. More information here (in construction).

Training WSI segmentation models

After data download and pre-processing has been performed, launch the training pipeline using:

python -m code.training --source-slides-folder ./data/preprocessed --alpha 0.1 --beta 0. --max-bag-size 100 --no-download

Many parameters are tunable, see python -m code.training --help

More informations about the training pipeline, including available imaging models here (in construction).

License

This software is released under the GNU Affero General Public License v3.0 license.

Citation

If you use this repo or find it useful, please consider citing:

@inproceedings{lerousseau2020weakly,
  title={Weakly supervised multiple instance learning histopathological tumor segmentation},
  author={Lerousseau, Marvin and Vakalopoulou, Maria and Classe, Marion and Adam, Julien and Battistella, Enzo and Carr{\'e}, Alexandre and Estienne, Th{\'e}o and Henry, Th{\'e}ophraste and Deutsch, Eric and Paragios, Nikos},
  booktitle={International Conference on Medical Image Computing and Computer-Assisted Intervention},
  pages={470--479},
  year={2020},
  organization={Springer}
}

or

Lerousseau M, Vakalopoulou M, Classe M, Adam J, Battistella E, Carré A, Estienne T, Henry T, Deutsch E, Paragios N. Weakly supervised multiple instance learning histopathological tumor segmentation. InInternational Conference on Medical Image Computing and Computer-Assisted Intervention 2020 Oct 4 (pp. 470-479). Springer, Cham.