--- id: totalsegmentator version: "2.18.0" license: Apache 2.0 license_treatment: permissive maintenance: active --- # TotalSegmentator — Robust segmentation of 117 classes in CT images. License: permissive · Maintenance: active · Downloads: 87.3K/mo ## 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 above — verify before relying. Automated segmentation of anatomical structures in CT and MR medical images, identifying and labeling 117 classes in CT or 50 classes in MR scans using deep learning. 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 pip install totalsegmentator uv add totalsegmentator poetry add totalsegmentator ## Installing TotalSegmentator 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. 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' ) 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. 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_current - Install friction: low - Maintenance: active - Downloads: 87.3K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags medical image segmentation, CT MR anatomical segmentation, organ segmentation tool, deep learning medical imaging, automated anatomy detection, DICOM segmentation, neural network medical imaging, medical-imaging, deep-learning, segmentation [View on SkillFed](https://skillfed.io/packages/totalsegmentator) · [View on PyPI](https://pypi.org/project/totalsegmentator/)