Skip to main content
autoDS-PET logo

autoDS-PET

Automatic and semi-automatic Deauville Score computation from PET/CT images

Published in European Journal of Nuclear Medicine and Molecular Imaging (2026) · doi:10.1007/s00259-026-08103-x

PyPI Python 3.11+ License: MIT CI Coverage Docs


Animated overview of autoDS-PET on a synthetic PET/CT phantom: DICOM to NIfTI, SUV normalization, PET to CT registration, TotalSegmentator segmentation, ROI refinement and Deauville Scores

autoDS-PET extracts reference uptake values from anatomical ROIs (bone marrow, mediastinal blood pool, liver, long bones, brain, focal lesions) on SUV-normalized PET and assigns Deauville Scores by comparing target uptake against standard thresholds.

Pipeline

The animation above runs the whole pipeline on a synthetic PET/CT phantom: raw DICOM is converted to NIfTI, the PET is normalized to SUVbw and registered onto the CT, TotalSegmentator segments the CT, six ROIs (lumbar vertebral bodies, aorta MBP, liver, long bones, brain, focal lesion) are refined and measured, and each target receives its Deauville Score.

Features

  • SUV normalization - Converts raw PET (Bq/mL) to SUVbw with automatic decay correction
  • Rigid registration - Aligns PET onto the CT grid via SimpleElastix
  • Anatomical segmentation - Whole-body CT segmentation with TotalSegmentator
  • ROI extraction - Automated refinement of 6 anatomical ROIs with configurable erosion, morphology, and statistics
  • Deauville scoring - Assigns DS 1-5 per target by comparing uptake against MBP and liver references
  • Batch processing - Process entire patient cohorts with progress tracking and CSV/XLSX export

Installation

# Core install
pip install autods-pet

# With DICOM SEG support (adds highdicom)
pip install "autods-pet[dicom-seg]"

# With development tools (pytest, pytest-cov, hypothesis, mypy, ruff, pre-commit)
pip install "autods-pet[dev]"

# Everything
pip install "autods-pet[all]"

The DICOM SEG extra installs highdicom, which enables reading .dcm segmentation objects produced by tools like 3D Slicer, OHIF Viewer, dcmqi, Kaapana, and MONAILabel. Without this extra, NIfTI (.nii, .nii.gz) and NRRD (.nrrd) masks are still fully supported.

TotalSegmentator (CT segmentation) and SimpleITK-SimpleElastix (PET-to-CT registration) are core dependencies and arrive with pip install autods-pet, so there is nothing to install separately.

With TotalSegmentator 2.17 or newer no licence is needed. On 2.5-2.16 the vertebrae_body task behind BM_DS needs one: upgrade TotalSegmentator, or store a key with totalseg_set_license or in the license key of the [totalsegmentator] config section. Model weights are downloaded on first use.

Quick Start

CLI

# Check the installation
autods-pet preflight

# Generate a config template
autods-pet create-config --output my_config.ini

# Full pipeline - single patient
autods-pet run -c my_config.ini -p PATIENT_001

# Full pipeline - batch with Excel output
autods-pet run -c my_config.ini --format xlsx

# Force re-run (ignore cached results)
autods-pet run -c my_config.ini --force

# Individual steps (each supports --force)
autods-pet convert   -c my_config.ini
autods-pet normalize -c my_config.ini
autods-pet register  -c my_config.ini
autods-pet segment   -c my_config.ini
autods-pet extract   -c my_config.ini
autods-pet score     -c my_config.ini -p PATIENT_001,PATIENT_002

Python API

from autods_pet import DeauvillePipeline, load_config

cfg = load_config("my_config.ini")
pipeline = DeauvillePipeline(cfg)

# Single patient
result = pipeline.run("PATIENT_001")
print(result.scores)  # {"BM_DS": 3, "LB_DS": 2, "FL_DS": 4, ...}

# Force re-run (ignore cached results)
pipeline = DeauvillePipeline(cfg, force=True)
result = pipeline.run("PATIENT_001")

The main classes and functions can be imported from the top-level autods_pet package; everything else lives in submodules:

from autods_pet.imaging.normalization import compute_suvbw
from autods_pet.deauville import assign_ds
from autods_pet.roi.liver import LiverROI
Input data layout

Source data lives under basepath, one sub-folder per patient:

basepath/
  PATIENT_001/
    *.dcm                           # DICOM files (flat or nested)
    focal_lesion.nii.gz             # (optional) Focal lesion mask
    PM_lesion.nii.gz                # (optional) Paramedullary mask
    EM_lesion.nii.gz                # (optional) Extramedullary mask
  PATIENT_002/
    CT.nii.gz                       # Pre-converted NIfTI also supported
    PET.nii.gz
Supported segmentation mask formats

Target masks (focal lesion, paramedullary, extramedullary, custom) can be provided in any of these formats:

Format Extensions
NIfTI .nii.gz, .nii
NRRD .nrrd
DICOM SEG .dcm (requires pip install autods-pet[dicom-seg])

Mask discovery is recursive: drop the file (or DICOM SEG export) anywhere under the patient input directory, including nested study/series sub-folders exported by a DICOM viewer. Each target section may set:

  • mask_filename - stem(s) for .nii.gz / .nii / .nrrd files (single stem or comma list).
  • segment_label - SegmentLabel(s) inside a DICOM SEG (single value or comma list, case-insensitive). The SEG file is identified by matching its ReferencedSeriesSequence to the patient's PET SeriesInstanceUID, so filename and folder location are irrelevant. A single multi-segment SEG file can supply several targets at once.
# Mixed example: NIfTI fallback + DICOM SEG label match.
[focal_lesion]
mask_filename = focal_lesion       ; matches focal_lesion.nii.gz/.nii/.nrrd
segment_label = Focal lesion, FL   ; matches segments labeled "Focal lesion" or "FL"
stats = max, p90

[paramedullary]
segment_label = PM, Paramedullary  ; DICOM SEG only
stats = max, p90

When both formats resolve the same target for the same patient, DICOM SEG wins and a note is logged. A configured target whose mask cannot be found anywhere produces a loud warning naming the patient and the locations searched - it is never silently dropped.

Use --explain-masks on extract / score / run (or autods-pet validate-config <cfg> --patients <ids>) to print a discovery preview before running.

List the segments inside a DICOM SEG with:

autods-pet list-segments path/to/segmentation.dcm

See docs/supported_formats.md for details on format comparison, producing tools, and conversion tips.

Output structure

All outputs go to output_dir, organized per patient:

output_dir/
  PATIENT_001_results/
    images/
      CT.nii.gz                     # Converted CT
      PET.nii.gz                    # Converted PET
      PET_SUV.nii.gz                # SUV body-weight normalized
      PET_SUV_reg.nii.gz            # Registered to CT grid
      PET_SUV_reg_fov.nii.gz        # PET field of view on the CT grid
    segmentations/
      TotSeg_multilabel.nii.gz      # TotalSegmentator multilabel
      vertebral_body.nii.gz         # Vertebral body
      refined/                      # Post-processed ROI masks
        aorta_mbp.nii.gz
        grey_matter.nii.gz
        liver.nii.gz
        long_bones.nii.gz
        lumbar_vb.nii.gz
    metadata/
      PET_metadata.json             # DICOM tags
      elastix_transform.txt         # Registration parameters
    DeauvilleScores/
      deauville_scores.csv          # Per-patient DS
    SUV/
      SUV_values.csv                # Per-patient SUV stats
    QC/
      qc_flags.csv                  # Per-patient QC flags
  batch_results_DS.csv              # All patients DS summary
  batch_results_SUV.csv             # All patients SUV summary
  batch_qc.csv                      # QC flags per patient
  batch_errors.csv                  # Errors (only if any)
  manifests/                        # One manifest per extract, score, run
  manifest.json                     # Latest manifest

Completed stages are automatically skipped on re-run. Use --force to re-run everything.

Deauville Score naming
Score Full name Reference ROI
BM_DS Bone Marrow DS Lumbar vertebral bodies (L3-L5)
LB_DS Long Bones DS Femur + humerus diaphysis
FL_DS Focal Lesion DS User-provided lesion mask
PM_DS Paramedullary DS User-provided mask
EM_DS Extramedullary DS User-provided mask
BLR Brain-to-Liver Ratio Brain cortical grey matter / liver (not a Deauville Score)
<target>_liver_ratio Target-to-liver ratio Scoring statistic of FL, PM, EM or a custom target / liver median (not a Deauville Score)
<target>_MBP_ratio Target-to-MBP ratio Scoring statistic of FL, PM, EM or a custom target / MBP median (not a Deauville Score)

Documentation

Full documentation is available at autods-pet.readthedocs.io:

Notes

Citation

If you use autoDS-PET in your research, please cite:

Peluso S, Polizzi S, Pagnini L, Tarozzi M, Rocchi E, Dragonetti V, Solli V, Dall'Olio D, Talarico M, Terragna C, Sala C, Zamagni E, Fanti S, Nanni C, Castellani G. Automated Deauville Score computation from baseline [18F]FDG PET/CT predicts progression-free survival in multiple myeloma: a radiogenomic framework. European Journal of Nuclear Medicine and Molecular Imaging. 2026. doi:10.1007/s00259-026-08103-x

@article{peluso2026autodspet,
  title   = {Automated Deauville Score computation from baseline [18F]FDG PET/CT predicts progression-free survival in multiple myeloma: a radiogenomic framework},
  author  = {Peluso, Sara and Polizzi, Stefano and Pagnini, Lisa and Tarozzi, Martina and Rocchi, Ettore and Dragonetti, Valentino and Solli, Vincenza and Dall'Olio, Daniele and Talarico, Marco and Terragna, Carolina and Sala, Claudia and Zamagni, Elena and Fanti, Stefano and Nanni, Cristina and Castellani, Gastone},
  journal = {European Journal of Nuclear Medicine and Molecular Imaging},
  year    = {2026},
  doi     = {10.1007/s00259-026-08103-x}
}

Changelog

See the full history of changes in the CHANGELOG.md file.

Acknowledgments

TotalSegmentator

autoDS-PET relies on TotalSegmentator for whole-body CT segmentation. The vertebral body segmentation behind BM_DS is openly available from TotalSegmentator 2.17; versions 2.5-2.16 require a free non-commercial license obtainable from the TotalSegmentator project.

If you use autoDS-PET in your research, please also cite TotalSegmentator:

Wasserthal J, Breit HC, Meyer MT, et al. TotalSegmentator: Robust Segmentation of 104 Anatomic Structures in CT Images. Radiology: Artificial Intelligence. 2023;5(5):e230024.

TotalSegmentator is distributed under the Apache License 2.0.

License

MIT - Sara Peluso

Third-party dependencies are subject to their own licenses. In particular, TotalSegmentator is licensed under the Apache License 2.0.

Metadata

Release files for autods-pet 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for autods-pet 0.3.0
File Size Uploaded Provenance Actions
autods_pet-0.3.0.tar.gz 112.1 kB Without provenance Details for autods_pet-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for autods-pet 0.3.0
File Interpreter ABI Platform Actions
autods_pet-0.3.0-py3-none-any.whl Python 3 none any Details for autods_pet-0.3.0-py3-none-any.whl

Total release size: 233.1 kB

Release files / autods_pet-0.3.0.tar.gz

Download URL autods_pet-0.3.0.tar.gz
Size 112.1 kB
Tags Source
SHA-256 checksum
How to use checksums
6956e44803d2b56e197efba41989d3121b0cfb55f03677251c218577ef6d64d3
BLAKE2b-256 checksum
How to use checksums
f86c8c754a881175b1e23c10b2e13a283bdebdf1c927c21352ac77224c31aa31
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Release files / autods_pet-0.3.0-py3-none-any.whl

Download URL autods_pet-0.3.0-py3-none-any.whl
Size 121.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
515a2c84dbf614b4af16bad07b97196ee1d7b55a4a1b41d12d2bda302df2b2af
BLAKE2b-256 checksum
How to use checksums
dc9e532195ac879af012593414595070962d971d443f0c3389ab01485fee92dd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Security for autods-pet 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page