Skip to content
intermediatescience

MSD Spleen Segmentation on Portal-Venous CT

Paint the spleen on CT volumes in three linked views with window presets, with a 3D U-Net pre-labeler. The sample volumes are synthetic, illustrative phantoms.

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/medical-volumes/msd-spleen-ct-segmentation
potato start config.yaml

About this dataset

The Medical Segmentation Decathlon (MSD) is a collection of ten segmentation data sets from Antonelli et al. (2022), built for a challenge that tested whether one algorithm generalizes across tasks. The Spleen task holds 61 portal-venous phase CT scans from patients undergoing chemotherapy treatment for liver metastases, acquired at Memorial Sloan Kettering Cancer Center. The target region is the spleen, and the paper says the task was selected for the large variation in field of view. The data are released as NIfTI under CC BY-SA 4.0.

For each task the paper states that a pixel-level label annotation was provided according to that task's definition. The Discussion notes that annotations came from a single human rater, and the Methods note that inter-rater reliability estimates are not available. The design reproduces the one-label voxel mask in Potato's volume_annotation scheme, with axial, coronal, and sagittal views, a brush, an eraser, a polygon tool, interpolation between painted slices, and soft tissue window presets. A radio question named spleen_in_view, on whether the whole spleen is inside the scan, is added. The question is an addition and is not part of the MSD protocol. CC BY-SA 4.0 is a share-alike license, so no MSD image is bundled. The ten volumes are small synthetic abdominal phantoms generated with numpy, and the items are illustrative.

The model_training block uses the volume-unet trainer. On the admin training page the trainer fits a 3D U-Net on the painted masks, one volume per example, and paints masks on the volumes nobody has labeled. The masks arrive as editable pre-labels. The trainer needs at least three annotated volumes and a GPU in practice. Potato does not serve or deploy a model, and a model trained on the phantoms says nothing about real CT.

CT scans in the Spleen task
61
Training and test split
41 and 20
Target region
Spleen
Contrast phase
Portal-venous
Data sets in the Decathlon
10
Licence
CC BY-SA 4.0

Configuration File

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

yaml
# MSD Spleen: spleen segmentation on portal-venous phase CT (Medical Segmentation Decathlon)
#
# THE SAMPLE DATA IS ILLUSTRATIVE AND THE VOLUMES ARE SYNTHETIC. The Medical
# Segmentation Decathlon (MSD) images are released under CC BY-SA 4.0, a
# share-alike licence, so none of them is bundled. Each of the ten volumes in
# media/ is a small abdominal phantom generated with numpy and nibabel (fixed
# random seeds 101 to 110), written as NIfTI in the same RAS
# orientation the MSD uses. They are not patient data and not MSD images. The
# anatomy is ellipsoids, so a mask painted here teaches nothing about real
# spleens. See media/LICENSE-media.txt.
#
# Paper: Antonelli, M., Reinke, A., Bakas, S., et al. (2022). The Medical
#   Segmentation Decathlon. Nature Communications 13. (59 authors)
#   @article{Antonelli_2022,
#     title = {The Medical Segmentation Decathlon},
#     volume = {13}, ISSN = {2041-1723},
#     url = {http://dx.doi.org/10.1038/s41467-022-30695-9},
#     DOI = {10.1038/s41467-022-30695-9}, number = {1},
#     journal = {Nature Communications},
#     publisher = {Springer Science and Business Media LLC},
#     author = {Antonelli, Michela and Reinke, Annika and Bakas, Spyridon and others},
#     year = {2022}, month = jul }
#   (Author list shortened here; the full Crossref BibTeX is in metadata.json.)
# DOI: 10.1038/s41467-022-30695-9
# Dataset: http://medicaldecathlon.com/ (also https://registry.opendata.aws/msd/)
# Licence of the MSD data: CC BY-SA 4.0. The paper's Methods say all data sets
#   "have been released with a permissive copyright-license (CC-BY-SA 4.0),
#   thus allowing for data sharing, redistribution, and commercial usage".
#
# Spleen task definition, quoted from the paper's "Challenge data sets" section:
#   "Spleen: The data set consists of 61 portal-venous phase CT scans from
#   patients undergoing chemotherapy treatment for liver metastases. The
#   corresponding target ROI was the spleen. This data set was selected due to
#   the large variations in the field-of-view. The data was acquired in the
#   Memorial Sloan Kettering Cancer Center, New York, US."
# Annotation description, same section: "For each segmentation task, a
#   pixel-level label annotation was provided depending on the definition of
#   each specific task." The paper's Discussion lists as a limitation
#   "limiting the annotations to a single human rater", and the Methods note that
#   "inter-rater reliability estimates are not available for the MSD tasks due to
#   the complexity of double-labeling the data". The paper points to its
#   reference 35 for how each data set was annotated; that document was not read
#   for this design, so no per-annotator procedure for the spleen is claimed.
#
# Label glossary: Spleen, the only target region of the task.
#
# Adaptations:
#   - Synthetic phantoms replace the MSD cases (licence above).
#   - One brush label, Spleen, as in the task. Potato stores the mask per axial
#     slice and exports it as a NIfTI label volume.
#   - A radio scheme, spleen_in_view, is added. The paper says the task was chosen
#     for its large variation in field of view; the question records whether the
#     whole organ is inside the scan. It is not part of the MSD protocol.
#   - Window presets are common CT soft tissue settings chosen for this design
#     (center 40 and width 400, and a narrower width 250). The paper gives none.
#
# Install and run (volumes need the volumes extra):
#   pip install "potato-annotation[volumes]"
#   potato start config.yaml -p 8000
#
# Training (what it does and does not do): open /admin/training with the admin
# key below, pick volume-unet (pip install "potato-annotation[train-vision,volumes]")
# and the spleen_mask scheme, and click Train now. The trainer fits a plain-torch
# 3D U-Net on the painted masks, one volume per example, and paints masks on the
# volumes nobody has labeled. Those masks arrive as editable prelabels. It needs
# at least min_instances (3 by default) annotated volumes and a GPU in practice.
# It does not serve or deploy the model, and a model trained on these phantoms
# says nothing about real CT.

port: 8000
annotation_task_name: "MSD Spleen CT segmentation (synthetic volumes)"
task_dir: "."

data_files:
  - sample-data.json

item_properties:
  id_key: id
  text_key: text

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: |
  Scroll through the axial, coronal, and sagittal views and paint the spleen on
  every slice where it appears, using the Spleen brush. Use Interpolate to fill
  the slices between two painted slices, then check the result in the other two
  views. Then say whether the whole spleen is inside the scan.
  These volumes are synthetic phantoms, so the practice is the tooling and not
  the anatomy.

annotation_schemes:
  - annotation_type: volume_annotation
    name: spleen_mask
    description: "Paint the spleen on every slice where it appears."
    source_field: volume
    labels:
      - name: Spleen
        color: "#e6553a"
        key_value: "1"
    tools: [navigate, brush, eraser, polygon]
    default_window: Soft tissue
    # The NIfTI files carry no modality header, so the presets are set here.
    window_presets:
      - {name: Soft tissue, center: 40, width: 400}
      - {name: Narrow soft tissue, center: 40, width: 250}

  - annotation_type: radio
    name: spleen_in_view
    description: "Is the whole spleen inside the scan?"
    labels:
      - "yes"
      - "no, it is cut off"

model_training:
  enabled: true
  writeback:
    schemas: ["spleen_mask"]
    include_unlabeled: true
    min_confidence: 0.5
  # Keys verified in potato/training/trainers/volume_unet.py. Small patches fit
  # the small phantoms.
  trainer_params:
    volume-unet:
      patch: 32
      epochs: 30
      patches_per_epoch: 60

Sample Data

json
[
  {
    "id": "msd_001",
    "volume": "case_001.nii.gz",
    "text": "Synthetic abdominal CT phantom (not an MSD case). Illustrative case. Paint the spleen, then check it in the coronal view."
  },
  {
    "id": "msd_002",
    "volume": "case_002.nii.gz",
    "text": "Synthetic abdominal CT phantom (not an MSD case). Illustrative case. A thick-slice scan, so fewer slices carry the spleen."
  }
]

// ... and 8 more items

Dataset & paper

Antonelli et al., Nature Communications 2022

Paper DOI
10.1038/s41467-022-30695-9

Citation (BibTeX)

bibtex
@article{Antonelli_2022,
  title = {The Medical Segmentation Decathlon},
  volume = {13},
  ISSN = {2041-1723},
  url = {http://dx.doi.org/10.1038/s41467-022-30695-9},
  DOI = {10.1038/s41467-022-30695-9},
  number = {1},
  journal = {Nature Communications},
  publisher = {Springer Science and Business Media LLC},
  author = {Antonelli, Michela and Reinke, Annika and Bakas, Spyridon and Farahani, Keyvan and Kopp-Schneider, Annette and Landman, Bennett A. and Litjens, Geert and Menze, Bjoern and Ronneberger, Olaf and Summers, Ronald M. and van Ginneken, Bram and Bilello, Michel and Bilic, Patrick and Christ, Patrick F. and Do, Richard K. G. and Gollub, Marc J. and Heckers, Stephan H. and Huisman, Henkjan and Jarnagin, William R. and McHugo, Maureen K. and Napel, Sandy and Pernicka, Jennifer S. Golia and Rhode, Kawal and Tobon-Gomez, Catalina and Vorontsov, Eugene and Meakin, James A. and Ourselin, Sebastien and Wiesenfarth, Manuel and Arbeláez, Pablo and Bae, Byeonguk and Chen, Sihong and Daza, Laura and Feng, Jianjiang and He, Baochun and Isensee, Fabian and Ji, Yuanfeng and Jia, Fucang and Kim, Ildoo and Maier-Hein, Klaus and Merhof, Dorit and Pai, Akshay and Park, Beomhee and Perslev, Mathias and Rezaiifar, Ramin and Rippel, Oliver and Sarasua, Ignacio and Shen, Wei and Son, Jaemin and Wachinger, Christian and Wang, Liansheng and Wang, Yan and Xia, Yingda and Xu, Daguang and Xu, Zhanwei and Zheng, Yefeng and Simpson, Amber L. and Maier-Hein, Lena and Cardoso, M. Jorge},
  year = {2022},
  month = July
}

Details

Annotation Types

volume_annotationradio

Domain

Medical ImagingRadiologyAbdominal CT

Use Cases

3D Volume SegmentationOrgan SegmentationCT Annotation

Tags

medical segmentation decathlonmsdspleenctniftivolume segmentation3d u-netsynthetic data

Found an issue or want to improve this design?

Open an Issue(opens in a new tab)