Total Segmentator
Documentstotal-segmentatorTotal Segmentator is an Agent Skill for documents published in the mkurman/zorai repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Tool for robust segmentation of 104+ anatomical structures in CT images. Uses nnUNet-based models for whole-body, organ, and bone segmentation. One-line CLI for comprehensive body-part segmentation.
QUICK START
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/mkurman/zorai/blob/HEAD/skills/scientific-skills/total-segmentator/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/total-segmentator, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
Overview
TotalSegmentator segments 104+ anatomical structures in CT images using nnUNet-based models. Run full-body, organ, or bone segmentation with a single CLI command.
Installation
uv pip install TotalSegmentator
CLI Usage
# Full body segmentation (all 104 structures)
TotalSegmentator -i input_ct.nii.gz -o output_seg.nii.gz
# Organ-only segmentation (liver, kidneys, spleen, etc.)
TotalSegmentator -i input_ct.nii.gz -o organ_seg.nii.gz -ta organ
# Appendicular bones
TotalSegmentator -i input_ct.nii.gz -o bone_seg.nii.gz -ta appendicular_bones
Python API
from totalsegmentator.python_api import totalsegmentator
segmentation = totalsegmentator("input_ct.nii.gz", "output_seg.nii.gz")
Workflow
- Obtain CT scan in NIfTI format
- Run
TotalSegmentator -i input.nii.gz -o output.nii.gz - Task types:
total(104 structures),organ,vertebra,ribs,appendicular_bones - Output is a multi-label segmentation mask
- Extract volumes per label for quantitative analysis