wasserth / TotalSegmentator
Tool for robust segmentation of >100 important anatomical structures in CT and MR images
AI Architecture Analysis
This repository is indexed by RepoMind. By analyzing wasserth/TotalSegmentator in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.
Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.
Repository Overview (README excerpt)
Crawler viewTotalSegmentator 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, Evans index, and aorta diameter.** Main classes for CT and MR: 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: • Python >= 3.9 • PyTorch >= 2.0.0 Optionally: • if you use the option you have to install xvfb ( ) and fury ( ) Install Totalsegmentator Usage For CT images: For MR images: > 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 or 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 Next to the default task ( ) there are more subtasks with more classes. If the taskname ends with 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) [so far only available in MASTER branch] • **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 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 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 paper01499-7/fulltex…