Skip to content
advancedscience

PANDA Gleason Pattern Regions and Grade Group on Biopsies

Outline benign tissue and Gleason patterns 3, 4 and 5 on a prostate biopsy in the deep-zoom viewer and choose the ISUP grade. The sample slide is illustrative.

Get This Design

View on GitHub(opens in a new tab)

Clone or download from the repository

Quick start:

bash
git clone https://github.com/davidjurgens/potato-showcase.git
cd potato-showcase/science/pathology/panda-prostate-gleason
potato start config.yaml

About this dataset

PANDA (Prostate cANcer graDe Assessment) is a challenge and dataset from Bulten et al. (2022). The development set holds 10,616 digitized hematoxylin and eosin stained prostate biopsies from 2,113 patients at Radboud University Medical Center and Karolinska Institutet. The challenge drew 1,290 developers. Each biopsy carries an ISUP grade group, which pathologists derive from the distribution of Gleason growth patterns. The data are released under Creative Commons BY-SA-NC 4.0.

The paper reports that many of the submitted solutions trained end to end on the grade group of the whole slide alone, without detailed pixel-level annotations. The design adds the pixel level. Annotators outline regions with the polygon tool in Potato's deep-zoom viewer and label each as benign or Gleason pattern 3, 4, or 5, the classes used for the region labels in the earlier Radboud study (Bulten et al. 2020), where the region labels were made semi-automatically. That study also used a hard-negative class, which is left out here. A radio scheme records the grade group, with a non-tumor option. The mask encoding of the PANDA release was not verifiable from a readable source and is not reproduced. All ten sample items use CMU-1-Small-Region.svs, a CC0 slide region from the OpenSlide test data. The slide region is not from PANDA, is not stated to be prostate tissue, and is a 2220 by 2967 pixel single-level file, much smaller than a real scan, so the items are illustrative.

The model_training block shows the training loop. On the admin training page, the torchvision-segment trainer fine-tunes a Mask R-CNN on the annotators' outlines and labels. The tiling settings cut each slide into 1024-pixel tiles with 128 pixels of overlap, so the model sees tissue detail instead of a thumbnail. Predictions come back as editable polygon pre-labels in whole-slide coordinates. The loop does not learn the grade group, does not serve or deploy a model, and makes no diagnosis.

Development-set biopsies
10,616
Patients (development set)
2,113
Developers in the challenge
1,290
Biopsies collected from 6 sites
12,625
Grade groups
5 (plus non-tumor)
Scanner vendors
3

Configuration File

This Potato config reproduces the annotation task. Save it as config.yaml and run potato start config.yaml to try it.

yaml
# PANDA - Prostate cANcer graDe Assessment: Gleason pattern regions and ISUP grade group
#
# Paper: Bulten, W., Kartasalo, K., Chen, P.-H. C., Strom, P., Pinckaers, H., et al.
#   and the PANDA challenge consortium (2022). Artificial intelligence for diagnosis
#   and Gleason grading of prostate cancer: the PANDA challenge. Nature Medicine, 28(1), 154-163.
#   @article{Bulten_2022,
#     title={Artificial intelligence for diagnosis and Gleason grading of prostate cancer: the PANDA challenge},
#     volume={28}, ISSN={1546-170X}, url={http://dx.doi.org/10.1038/s41591-021-01620-2},
#     DOI={10.1038/s41591-021-01620-2}, number={1}, journal={Nature Medicine},
#     publisher={Springer Science and Business Media LLC},
#     author={Bulten, Wouter and Kartasalo, Kimmo and Chen, Po-Hsuan Cameron and others},
#     year={2022}, month=Jan, pages={154--163} }
#   (the author list is shortened here; the full list is in metadata.json)
# DOI: 10.1038/s41591-021-01620-2
# Dataset: https://www.kaggle.com/c/prostate-cancer-grade-assessment/data
#   (also linked from https://panda.grand-challenge.org/data/). Licence: Creative Commons
#   BY-SA-NC 4.0, per the paper's data availability statement. No PANDA image is bundled.
#
# The development set holds 10,616 digitized hematoxylin and eosin stained prostate
# biopsies from 2,113 patients, from Radboud University Medical Center and Karolinska
# Institutet. Each biopsy has an ISUP grade group, the five groups that pathologists
# derive from the distribution of Gleason growth patterns. The paper notes that "Many of
# the solutions demonstrated the feasibility of end-to-end training using case-level
# information only" ("Such weakly supervised approaches do not require detailed
# pixel-level annotations").
#
# Label glossary:
#   ISUP grade group: five groups, 1 to 5, plus non-tumor biopsies (the paper's Table 1
#   lists "Nontumor" and "GG 1" through "GG 5").
#   Region labels: benign, Gleason pattern 3, 4 and 5. These four classes come from
#   the earlier Radboud study (Bulten et al. 2020, Lancet Oncology, DOI
#   10.1016/S1470-2045(19)30739-9, arXiv 1907.07980): "each gland was assigned to a
#   single class: benign, Gleason 3, Gleason 4, Gleason 5, or hard-negative". Those
#   region labels were made semi-automatically, "removing the need for manual annotations
#   by pathologists". The pixel-level mask encoding of the PANDA release itself is not
#   documented in a source this design could read, so it is not reproduced.
#
# THE SAMPLE DATA IS ILLUSTRATIVE. PANDA images cannot be redistributed, so the ten items
# all point at CMU-1-Small-Region.svs, a CC0 Aperio slide region from the OpenSlide test
# data. It is not a PANDA slide, it is not stated to be prostate tissue, and it is a
# single-level 2220 x 2967 pixel file, far smaller than a real gigapixel biopsy scan.
# See media/LICENSE-media.txt.
#
# Adaptations:
#   - PANDA's training labels are one grade group per slide plus semi-automatic region
#     masks. Here annotators draw polygons by hand, a manual workflow the PANDA release
#     does not describe.
#   - The slide-level grade group is a radio scheme with six options (non-tumor, 1 to 5).
#   - The pattern labels are benign and Gleason patterns 3, 4 and 5 only. The 2020
#     study also used a hard-negative class, which is left out here.
#   - A grade group is derived by pathologists from the pattern distribution. Here it is
#     a separate answer, and nothing checks the two against each other.
#
# Install and run (openslide is needed to read .svs files):
#   pip install "potato-annotation[wsi]"
#   potato start config.yaml -p 8000
#
# Training (what it does and does not do): open /admin/training with the admin key below,
# pick torchvision-segment (pip install "potato-annotation[train-vision]") and the
# gleason_regions scheme, and click Train now. The trainer fine-tunes a torchvision
# Mask R-CNN on the annotators' outlines and labels, cutting the slide into tiles
# (model_training.tiling) so a whole slide is never resized to a thumbnail. Predictions
# come back as editable polygon prelabels in whole-slide coordinates. It does not serve
# or deploy the model, it does not learn the grade group, and it makes no diagnosis.
# A diagnostic claim needs a clinical study, not this demo.

port: 8000
annotation_task_name: "PANDA prostate biopsy Gleason patterns"
task_dir: "."

data_files:
  - sample-data.json

item_properties:
  id_key: id
  text_key: note

media_directory: media

output_annotation_dir: "annotation_output/"
export_annotation_format: jsonl

require_password: false
admin_api_key: "demo-admin-key"

user_config:
  allow_all_users: true
  users: []

annotation_instructions: |
  Open the biopsy and zoom in. Outline each region with the polygon tool and give it
  one label, benign or Gleason pattern 3, 4 or 5. Then choose the ISUP grade group for
  the whole biopsy, or non-tumor.
  The slide here is a CC0 sample that is not from PANDA, so regions are for practice.

annotation_schemes:
  - annotation_type: image_annotation
    name: gleason_regions
    description: "Outline each region on the biopsy and assign benign or a Gleason pattern."
    source_field: image
    # Required for slides: the default viewer sends the image as one file.
    viewer: deepzoom
    tiles:
      tile_size: 254
      overlap: 1
      navigator: true
    tools: [polygon]
    labels:
      - name: Benign
        color: "#2e9e5b"
      - name: Gleason pattern 3
        color: "#e3c341"
      - name: Gleason pattern 4
        color: "#e0602f"
      - name: Gleason pattern 5
        color: "#6a2c91"

  - annotation_type: radio
    name: isup_grade_group
    description: "ISUP grade group of the whole biopsy, or non-tumor."
    labels:
      - Non-tumor
      - ISUP grade group 1
      - ISUP grade group 2
      - ISUP grade group 3
      - ISUP grade group 4
      - ISUP grade group 5

model_training:
  enabled: true
  writeback:
    schemas: ["gleason_regions"]
    include_unlabeled: true
    min_confidence: 0.5
  # Keys verified in potato/training/tiling.py. Regions are drawn on part of each slide,
  # so no empty background tiles are sampled.
  tiling:
    enabled: auto
    tile_size: 1024
    overlap: 128
    downsample: 1
    background: 0

Sample Data

json
[
  {
    "id": "panda_001",
    "image": "CMU-1-Small-Region.svs",
    "note": "Illustrative biopsy. Outline the region you would call benign and give it the benign label."
  },
  {
    "id": "panda_002",
    "image": "CMU-1-Small-Region.svs",
    "note": "Illustrative biopsy. Outline one region per Gleason pattern you can justify, then choose the grade group."
  }
]

// ... and 8 more items

Dataset & paper

Bulten et al., Nature Medicine 2022

Paper DOI
10.1038/s41591-021-01620-2

Citation (BibTeX)

bibtex
@article{Bulten_2022,
 
  title = {Artificial intelligence for diagnosis and Gleason grading of prostate cancer: the PANDA challenge},
  volume = {28},
  ISSN = {1546-170X},
  url = {http://dx.doi.org/10.1038/s41591-021-01620-2},
  DOI = {10.1038/s41591-021-01620-2},
  number = {1},
  journal = {Nature Medicine},
  publisher = {Springer Science and Business Media LLC},
  author = {Bulten, Wouter and Kartasalo, Kimmo and Chen, Po-Hsuan Cameron and Ström, Peter and Pinckaers, Hans and Nagpal, Kunal and Cai, Yuannan and Steiner, David F. and van Boven, Hester and Vink, Robert and Hulsbergen-van de Kaa, Christina and van der Laak, Jeroen and Amin, Mahul B. and Evans, Andrew J. and van der Kwast, Theodorus and Allan, Robert and Humphrey, Peter A. and Grönberg, Henrik and Samaratunga, Hemamali and Delahunt, Brett and Tsuzuki, Toyonori and Häkkinen, Tomi and Egevad, Lars and Demkin, Maggie and Dane, Sohier and Tan, Fraser and Valkonen, Masi and Corrado, Greg S. and Peng, Lily and Mermel, Craig H. and Ruusuvuori, Pekka and Litjens, Geert and Eklund, Martin and Brilhante, Américo and Çakır, Aslı and Farré, Xavier and Geronatsiou, Katerina and Molinié, Vincent and Pereira, Guilherme and Roy, Paromita and Saile, Günter and Salles, Paulo G. O. and Schaafsma, Ewout and Tschui, Joëlle and Billoch-Lima, Jorge and Pereira, Emíio M. and Zhou, Ming and He, Shujun and Song, Sejun and Sun, Qing and Yoshihara, Hiroshi and Yamaguchi, Taiki and Ono, Kosaku and Shen, Tao and Ji, Jianyi and Roussel, Arnaud and Zhou, Kairong and Chai, Tianrui and Weng, Nina and Grechka, Dmitry and Shugaev, Maxim V. and Kiminya, Raphael and Kovalev, Vassili and Voynov, Dmitry and Malyshev, Valery and Lapo, Elizabeth and Campos, Manuel and Ota, Noriaki and Yamaoka, Shinsuke and Fujimoto, Yusuke and Yoshioka, Kentaro and Juvonen, Joni and Tukiainen, Mikko and Karlsson, Antti and Guo, Rui and Hsieh, Chia-Lun and Zubarev, Igor and Bukhar, Habib S. T. and Li, Wenyuan and Li, Jiayun and Speier, William and Arnold, Corey and Kim, Kyungdoc and Bae, Byeonguk and Kim, Yeong Won and Lee, Hong-Seok and Park, Jeonghyuk},
  year = {2022}, month=jan,
  pages = {154--163} }

Details

Annotation Types

image_annotationradio

Domain

PathologyMedical ImagingOncology

Use Cases

Gigapixel Image AnnotationWhole-Slide Region LabelingHistopathology Annotation

Tags

pandaprostate cancergleason gradingisup grade grouphistopathologywhole-slide imagegigapixeldeepzoomopenslidetilingmask r-cnnpathology

Found an issue or want to improve this design?

Open an Issue(opens in a new tab)