Skip to main content

Fast and lightweight TotalSegmentator CLI powered by the KonfAI framework.

Project description

License PyPI version Python CI Paper

TotalSegmentator-KonfAI

Fast and lightweight CLI for whole-body CT or MRI segmentation using TotalSegmentator models within the KonfAI framework.


🧩 Overview

TotalSegmentator-KonfAI is a lightweight command-line interface (CLI) for running
TotalSegmentator models for multi-organ medical image segmentation,
through the KonfAI deep learning framework.

It provides fast and efficient inference for segmentation tasks, including on low-resource hardware.
Pretrained models are automatically downloaded from
Hugging Face Hub.


🚀 Installation

From PyPI:

python -m pip install totalsegmentator-konfai

From source:

git clone https://github.com/vboussot/KonfAI.git
python -m pip install -e apps/totalsegmentator

⚙️ Usage

Perform segmentation on an input volume:

totalsegmentator-konfai total -i path/to/image.nii.gz -o ./Output/

Optional arguments

Flag Description Default
TASK Input modality / model name on Hugging Face total, total_mr, total_3mm, total_mr_3mm
-i, --input Path to the input medical image required
-o, --output Path to save the segmentation ./Output/
--gt Path to reference segmentation (ground truth), if available (enables evaluation workflows) unset
--mask Path to region-of-interest mask used for evaluation and uncertainty analysis unset
--gpu GPU list (e.g. 0 or 0,1) CPU if unset
--cpu Number of CPU cores (if no GPU) 1
-q, --quiet Suppress console output False

Example

totalsegmentator-konfai total -i path/to/input.nii.gz -o ./Output/ --gt path/to/reference.nii.gz --mask path/to/mask.nii.gz --gpu 0 -uncertainty

🧠 Features

  • Fast inference powered by KonfAI
  • 🤗 Automatic model download from Hugging Face
  • 🧠 Supports evaluation workflows with reference data
  • 🧾 Multi-format compatibility: supports all major medical image formats handled by ITK

📖 Reference

If you use TotalSegmentator-KonfAI in your work, please cite the original TotalSegmentator work in addition to this CLI tool.

  • Wasserthal, J. et al. (2023).
    TotalSegmentator: Robust Segmentation of 104 Anatomic Structures in CT Images.
    Radiology: Artificial Intelligence, 5(5). https://doi.org/10.1148/ryai.230024

  • Akinci D’Antonoli, T. et al. (2025).
    TotalSegmentator MRI: Robust Sequence-independent Segmentation of Multiple Anatomic Structures in MRI.
    Radiology, 314(2). https://doi.org/10.1148/radiol.241613

  • Boussot, V., & Dillenseger, J.-L. (2025).
    KonfAI: A Modular and Fully Configurable Framework for Deep Learning in Medical Imaging.
    arXiv preprint arXiv:2508.09823


🔗 Links


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

totalsegmentator_konfai-1.5.2.tar.gz (12.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

totalsegmentator_konfai-1.5.2-py3-none-any.whl (12.6 kB view details)

Uploaded Python 3

File details

Details for the file totalsegmentator_konfai-1.5.2.tar.gz.

File metadata

  • Download URL: totalsegmentator_konfai-1.5.2.tar.gz
  • Upload date:
  • Size: 12.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for totalsegmentator_konfai-1.5.2.tar.gz
Algorithm Hash digest
SHA256 55fada4f74d42e034306521f7e0bfc99af29548d7a99e2f707027f5e704c8a53
MD5 53b8b5994ec0d9adf31b75b6d3575147
BLAKE2b-256 f4b0e8eef179059a856a6af625bdf2bf0fd4a42117c1cf9ec219f69c97f49b85

See more details on using hashes here.

Provenance

The following attestation bundles were made for totalsegmentator_konfai-1.5.2.tar.gz:

Publisher: publish.yml on vboussot/KonfAI

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file totalsegmentator_konfai-1.5.2-py3-none-any.whl.

File metadata

File hashes

Hashes for totalsegmentator_konfai-1.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2b5e4ef4b7852a1e4a3bbe496cb33425f9ec153c615db6d4eeb441234e770795
MD5 f6c5c5bbcfe7f4756580ae478fb320da
BLAKE2b-256 d0742fbe533a2eed54d039afb9bc8199882573e5e7fe3146097d6a6e2e034c5f

See more details on using hashes here.

Provenance

The following attestation bundles were made for totalsegmentator_konfai-1.5.2-py3-none-any.whl:

Publisher: publish.yml on vboussot/KonfAI

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page