SkillAgentSearch skills...

TotalSegmentator

Tool for robust segmentation of >100 important anatomical structures in CT and MR images

Install / Use

/learn @wasserth/TotalSegmentator
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

TotalSegmentator

Tool for segmentation of most major anatomical structures in any CT or MR image. It was trained on a wide range of different CT and MR images (different scanners, institutions, protocols,...) and therefore works well on most images. A large part of the training dataset can be downloaded here: CT dataset (1228 subjects) and MR dataset (616 subjects). You can also try the tool online at totalsegmentator.com or as 3D Slicer extension.

ANNOUNCEMENT: We created a platform where anyone can help annotate more data to further improve TotalSegmentator: TotalSegmentator Annotation Platform.

ANNOUNCEMENT: We created web applications for abdominal organ volume, aorta diameter, pulmonary artery diameter, contrast phase detection and Evans index.

Main classes for CT and MR: Alt text

TotalSegmentator supports a lot more structures. See subtasks or here for more details.

Created by the department of Research and Analysis at University Hospital Basel. If you use it please cite our Radiology AI paper (free preprint). If you use it for MR images please cite the TotalSegmentator MRI Radiology paper (free preprint). Please also cite nnUNet since TotalSegmentator is heavily based on it.

Installation

TotalSegmentator works on Ubuntu, Mac, and Windows and on CPU and GPU.

Install dependencies:

Optionally:

  • if you use the option --preview you have to install xvfb (apt-get install xvfb) and fury (pip install fury)

Install Totalsegmentator

pip install TotalSegmentator

Usage

For CT images:

TotalSegmentator -i ct.nii.gz -o segmentations

For MR images:

TotalSegmentator -i mri.nii.gz -o segmentations --task total_mr

Note: A Nifti file or a folder (or zip file) with all DICOM slices of one patient is allowed as input.

Note: If you run on CPU use the option --fast or --roi_subset to greatly improve runtime.

Note: This is not a medical device and is not intended for clinical usage. However, it is part of several FDA-approved products, where it has been certified as a component of the overall system.

Subtasks

Alt text

Next to the default task (total) there are more subtasks with more classes. If the taskname ends with _mr it works for MR images, otherwise for CT images.

Openly available for any usage (Apache-2.0 license):

  • total: default task containing 117 main classes (see here for a list of classes)
  • total_mr: default task containing 50 main classes on MR images (see here for a list of classes)
  • lung_vessels: lung_arteries, lung_veins, lung_airways, lung_airways_wall (partly based on paper, also cite paper)
  • lung_vessels_LEGACY: lung_vessels, lung_trachea_bronchia (cite paper)
  • body: body, body_trunc, body_extremities, skin
  • body_mr: body_trunc, body_extremities (for MR images)
  • vertebrae_mr: sacrum, vertebrae_L5, vertebrae_L4, vertebrae_L3, vertebrae_L2, vertebrae_L1, vertebrae_T12, vertebrae_T11, vertebrae_T10, vertebrae_T9, vertebrae_T8, vertebrae_T7, vertebrae_T6, vertebrae_T5, vertebrae_T4, vertebrae_T3, vertebrae_T2, vertebrae_T1, vertebrae_C7, vertebrae_C6, vertebrae_C5, vertebrae_C4, vertebrae_C3, vertebrae_C2, vertebrae_C1 (for CT this is part of the total task)
  • cerebral_bleed: intracerebral_hemorrhage (cite paper)*
  • hip_implant: hip_implant*
  • pleural_pericard_effusion: pleural_effusion (cite paper), pericardial_effusion (cite paper)*
  • head_glands_cavities: eye_left, eye_right, eye_lens_left, eye_lens_right, optic_nerve_left, optic_nerve_right, parotid_gland_left, parotid_gland_right, submandibular_gland_right, submandibular_gland_left, nasopharynx, oropharynx, hypopharynx, nasal_cavity_right, nasal_cavity_left, auditory_canal_right, auditory_canal_left, soft_palate, hard_palate (cite paper)
  • head_muscles: masseter_right, masseter_left, temporalis_right, temporalis_left, lateral_pterygoid_right, lateral_pterygoid_left, medial_pterygoid_right, medial_pterygoid_left, tongue, digastric_right, digastric_left
  • headneck_bones_vessels: larynx_air, thyroid_cartilage, hyoid, cricoid_cartilage, zygomatic_arch_right, zygomatic_arch_left, styloid_process_right, styloid_process_left, internal_carotid_artery_right, internal_carotid_artery_left, internal_jugular_vein_right, internal_jugular_vein_left (cite paper)
  • headneck_muscles: sternocleidomastoid_right, sternocleidomastoid_left, superior_pharyngeal_constrictor, middle_pharyngeal_constrictor, inferior_pharyngeal_constrictor, trapezius_right, trapezius_left, platysma_right, platysma_left, levator_scapulae_right, levator_scapulae_left, anterior_scalene_right, anterior_scalene_left, middle_scalene_right, middle_scalene_left, posterior_scalene_right, posterior_scalene_left, sterno_thyroid_right, sterno_thyroid_left, thyrohyoid_right, thyrohyoid_left, prevertebral_right, prevertebral_left (cite paper)
  • liver_vessels: liver_vessels, liver_tumor (cite paper)*
  • oculomotor_muscles: skull, eyeball_right, lateral_rectus_muscle_right, superior_oblique_muscle_right, levator_palpebrae_superioris_right, superior_rectus_muscle_right, medial_rectus_muscle_left, inferior_oblique_muscle_right, inferior_rectus_muscle_right, optic_nerve_left, eyeball_left, lateral_rectus_muscle_left, superior_oblique_muscle_left, levator_palpebrae_superioris_left, superior_rectus_muscle_left, medial_rectus_muscle_right, inferior_oblique_muscle_left, inferior_rectus_muscle_left, optic_nerve_right*
  • lung_nodules: lung, lung_nodules (provided by BLUEMIND AI: Fitzjalen R., Aladin M., Nanyan G.) (trained on 1353 subjects, partly from LIDC-IDRI)
  • kidney_cysts: kidney_cyst_left, kidney_cyst_right (strongly improved accuracy compared to kidney_cysts inside of total task)
  • breasts: breast
  • liver_segments: liver_segment_1, liver_segment_2, liver_segment_3, liver_segment_4, liver_segment_5, liver_segment_6, liver_segment_7, liver_segment_8 (Couinaud segments) (cite paper)*
  • liver_segments_mr: liver_segment_1, liver_segment_2, liver_segment_3, liver_segment_4, liver_segment_5, liver_segment_6, liver_segment_7, liver_segment_8 (for MR images) (Couinaud segments)*
  • craniofacial_structures: mandible, teeth_lower, skull, head, sinus_maxillary, sinus_frontal, teeth_upper (cite paper)
  • abdominal_muscles: pectoralis_major_right, pectoralis_major_left, rectus_abdominis_right, rectus_abdominis_left, serratus_anterior_right, serratus_anterior_left, latissimus_dorsi_right, latissimus_dorsi_left, trapezius_right, trapezius_left, external_oblique_right, external_oblique_left, internal_oblique_right, internal_oblique_left, erector_spinae_right, erector_spinae_left, transversospinalis_right, transversospinalis_left, psoas_major_right, psoas_major_left, quadratus_lumborum_right, quadratus_lumborum_left (cite paper) (only segments within T4-L4)*
  • teeth: "lower_jawbone", "upper_jawbone", "left_inferior_alveolar_canal", "right_inferior_alveolar_canal", "left_maxillary_sinus", "right_maxillary_sinus", "pharynx", "bridge", "crown", "implant", "upper_right_central_incisor_fdi11", "upper_right_lateral_incisor_fdi12", "upper_right_canine_fdi13", "upper_right_first_premolar_fdi14", "upper_right_second_premolar_fdi15", "upper_right_first_molar_fdi16", "upper_right_second_molar_fdi17", "upper_right_third_molar_fdi18", "upper_left_central_incisor_fdi21", "upper_left_lateral_incisor_fdi22", "upper_left_canine_fdi23", "upper_left_first_premolar_fdi24", "upper_left_second_premolar_fdi25", "upper_left_first_molar_fdi26", "upper_left_second_molar_fdi27", "upper_left_third_molar_fdi28", "lower_left_central_incisor_fdi31", "lower_left_lateral_incisor_fdi32", "lower_left_canine_fdi33", "lower_left_first_premolar_fdi34", "lower_left_second_premolar_fdi35", "lower_left_first_molar_fdi36", "lower_left_second_molar_fdi37", "lower_left_third_molar_fdi38", "lower_right_central_incisor_fdi41", "lower_right_lateral_incisor_fdi42", "lower_right_canine_fdi43", "lower_right_first_premolar_fdi44", "lower_right_second_premolar_fdi45", "lower_right_first_molar_fdi46", "lower_right_second_molar_fdi47", "lower_right_third_molar_fdi48", "left_mandibular_incisive_canal_fdi103", "right_mandibular_in
View on GitHub
GitHub Stars2.6k
CategoryDevelopment
Updated2h ago
Forks422

Languages

Python

Security Score

95/100

Audited on Apr 4, 2026

No findings