TotalSegmentator
Robust segmentation of 117 classes in CT images.
Decision gist · record as of 2026-08-14
Yes, with conditions. Install if you need automated medical image segmentation for research or clinical support and have PyTorch and GPU resources available. The active maintenance, permissive license, zero known vulnerabilities, and broad anatomical coverage make it a solid choice. Avoid if you require FDA-cleared medical device certification or cannot accommodate the large dependency footprint and model download. CPU-only use is feasible but slow without the --fast flag.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires PyTorch >= 2.0.0 and Python >= 3.9.
- First run downloads trained model weights.
- GPU strongly recommended; CPU mode requires --fast or --roi_subset flags for reasonable runtime.
License · maintenance · safety
Apache 2.0 (permissive) — Apache 2.0 permissive license allows commercial and private use, modification, and redistribution with minimal restrictions. Suitable for both research and production deployment.
last release 2026-08-12 (2 days) · last repo commit 2026-08-13 · 2,932 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 87,292 downloads/mo, #13,805 on PyPI
Alternatives
Verify before relying
pip install TotalSegmentator
from totalsegmentator.python_api import totalsegmentator_python_api
totalsegmentator_python_api(
input_path='ct.nii.gz',
output_path='segmentations',
task='total'
)- Exact model weight download size and storage footprint after installation
- Whether the package includes pre-trained weights or downloads them on first use
- Performance benchmarks (runtime, memory) on typical CPU vs GPU hardware
- Validation accuracy metrics on external test datasets beyond the cited papers
What it is and what it does
TotalSegmentator is a command-line and Python API tool that automatically identifies and labels anatomical structures in medical CT and MR images using neural networks trained on diverse scanner protocols and institutions. It outputs segmentation masks for 117 anatomical classes in CT scans or 50 in MR scans, plus specialized subtasks for organs, vessels, vertebrae, and pathologies. The package wraps nnUNetv2 and depends on PyTorch, SimpleITK, nibabel, and scikit-image for image I/O, processing, and visualization.
It is designed for research and clinical decision support (though not FDA-cleared as a standalone device). The tool runs on CPU or GPU across Ubuntu, Mac, and Windows. Input accepts Nifti files or DICOM folders; output is segmentation masks in standard medical image formats. The package is actively maintained, has no known vulnerabilities, and is permissively licensed.
Use it for
- Automated organ volume measurement for abdominal imaging reports and follow-up studies
- Rapid vertebrae identification and labeling in spine imaging for surgical planning
- Vessel segmentation (aorta, pulmonary artery) for diameter measurement and aneurysm screening
- Research preprocessing: batch segmentation of large CT/MR cohorts for statistical analysis
- Integration into clinical workflows via 3D Slicer extension or web API for real-time reporting
- Body composition analysis: extracting muscle, fat, and bone measurements from imaging
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, with conditions.
Install if you need automated medical image segmentation for research or clinical support and have PyTorch and GPU resources available. The active maintenance, permissive license, zero known vulnerabilities, and broad anatomical coverage make it a solid choice. Avoid if you require FDA-cleared medical device certification or cannot accommodate the large dependency footprint and model download. CPU-only use is feasible but slow without the --fast flag.
Install
totalsegmentator on PyPI
Before you install
Low friction install with a pure Python wheel. Active maintenance—last commit 2026-08-13, released 2026-08-12. Requires PyTorch >= 2.0.0 and Python >= 3.9; the large dependency tree (23 runtime packages including torch, nnunetv2, SimpleITK) means first install may take time, but no compiled barriers.
Requires PyTorch >= 2.0.0 and Python >= 3.9. First run downloads trained model weights. GPU strongly recommended; CPU mode requires --fast or --roi_subset flags for reasonable runtime.
License in practice
Apache 2.0 permissive license allows commercial and private use, modification, and redistribution with minimal restrictions. Suitable for both research and production deployment.
Quickstart
pip install TotalSegmentator
from totalsegmentator.python_api import totalsegmentator_python_api
totalsegmentator_python_api(
input_path='ct.nii.gz',
output_path='segmentations',
task='total'
)
Verify before relying
- Exact model weight download size and storage footprint after installation
- Whether the package includes pre-trained weights or downloads them on first use
- Performance benchmarks (runtime, memory) on typical CPU vs GPU hardware
- Validation accuracy metrics on external test datasets beyond the cited papers
Package facts
| License | Apache 2.0 permissive |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 23 packagestorchnumpySimpleITKnibabeltqdmxvfbwrappernnunetv2requestsdicom2niftipyarrowxmltodictbloscimgkitjinja2Pillowscikit-imagescipymatplotlibnetworkxpandasscikit-learnfurydipy |
| Maintenance | Actively maintained 2 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 87,292 / month, #13,805 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Intended Audience :: Science/ResearchOperating System :: MacOSOperating System :: UnixProgramming Language :: PythonTopic :: Scientific/Engineering |
Evidence: totalsegmentator-2.18.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “CT MR anatomical segmentation”
- TotalSegmentatorAutomated segmentation of anatomical structures in CT and MR medical…
- dicom2niftiConverts DICOM medical imaging files to NIfTI format, supporting…
- itk-segmentationProvides Python bindings for ITK's segmentation algorithms, enabling…
Give your agent the search over MCP, or paste the wish link into any chat.
More Scientific/Engineering packages
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
pandas provides fast, flexible data structures (Series and DataFrame) for loading, cleaning, transforming, and analyzing labeled or relational data in Python.
scipy provides numerical algorithms for mathematics, science, and engineering—including optimization, integration, linear algebra, Fourier transforms, signal and image processing, and ODE solvers—built on numpy arrays.
scikit-learn provides a comprehensive Python library for supervised and unsupervised machine learning, including classification, regression, clustering, dimensionality reduction, and model evaluation tools built on NumPy and SciPy.
Install it if you need to train, evaluate, or deploy supervised or unsupervised learning models.
dill extends Python's pickle module to serialize and deserialize a much wider range of Python objects, including functions, lambdas, classes, and interpreter sessions, to byte streams for storage or network transmission.
Multiprocess is an enhanced fork of Python's standard multiprocessing library that uses dill for better serialization, allowing you to spawn processes with a threading-like API and share complex objects between them.
Install it if you use multiprocessing and encounter pickle serialization limits with lambdas or complex objects.
See also batchgenerators · cellpose · nnunetv2 · itk-segmentation · batchgeneratorsv2 · highdicom · itk · dicom2nifti · segmentation-models-pytorch · torchio