Models · 3D volume segmentation
TotalSegmentator
TotalSegmentator (University Hospital Basel): nnU-Net v2 networks that label 117 anatomical structures (organs, bones, muscles, vessels) in CT volumes, at 1.5 mm (five networks) or 3 mm (one, faster). Commercially usable (Apache-2.0 code and weights).
experimental Fork of wasserth/TotalSegmentator@184fa47 · backends: portable, kernels
- Paper TotalSegmentator: Robust Segmentation of 104 Anatomic Structures in CT Images Radiology: Artificial Intelligence 2023 · first released 5 Jul 2023
- Paper nnU-Net: a self-configuring method for deep learning-based biomedical image segmentation Nature Methods 2021 · first released 7 Dec 2020
Paper 2023 Added in 0.2.0 Evaluated with 0.3.0
Use it
pip install fastforks Lean install with only what this model needs: pip install fastforks-core
from fastforks import volume
model = volume.load("totalsegmentator-total") # fastest backend that runs here
ct, meta = volume.read_nifti("ct.nii.gz") # CT in Hounsfield units and its voxel spacing
result = model(ct, meta=meta)
# result fields: labels
labels = result.labels # a torch tensor
arrays = result.numpy() # the tensor fields as NumPy arrays: arrays["labels"]
result.backend # what ran: mode, device, dtype
Other ways to run it
- Backend:
volume.load("totalsegmentator-total", mode="kernels") # or "portable", "auto" (default) - Precision:
volume.load("totalsegmentator-total", dtype="float32") # full precision: slower, portable only - Options:
volume.load("totalsegmentator-total", options={"stream": False})
fastforks bench totalsegmentator-total Times the model on this machine. load(…, mode="portable") or mode="kernels" picks a backend; usage guide.
Speed and memory
Every backend on one GPU (RTX 5060 Ti 16 GB) and the same input, the authors’ code included. Kernels runs fp16. Portable runs fp16 on CUDA.
Input: synthetic, 200x200 (the task’s standard size)
| Backend | dtype | Time per call (ms) | vs original fp16 | Peak memory allocated / reserved | Load (s) | First call (s) |
|---|---|---|---|---|---|---|
| Original fp32Persistent upstream predictor on a synthetic 200 × 200 × 200 CT at 1.5 mm. CPU NIfTI input and labels out. FP32 network with the original accumulator. | fp32 | 4888 | 0.53× | 2,873 MiB/3,624 MiB | 0.0 | 9.57 |
| Original fp16Persistent upstream predictor on a synthetic 200 × 200 × 200 CT at 1.5 mm. CPU NIfTI input and labels out. Native CUDA autocast. | fp16 | 2614 | – | 1,902 MiB/2,312 MiB | 0.3 | 8.54 |
| Portable fp32 | fp32 | not measured | – | – | – | – |
| PortableFull volume API with CPU input and CPU labels on the same synthetic 200³ CT at 1.5 mm as the persistent original. | fp16 | 2050 | 1.3× | 1,851 MiB/2,650 MiB | 1.7 | 2.27 |
| KernelsFull volume API with CPU input and CPU labels on the same synthetic 200³ CT at 1.5 mm as the persistent original. | fp16 | 1437 | 1.8× | 1,194 MiB/1,606 MiB | 0.9 | 1.56 |
| Portable + torch.compilecompiled patch network inside the full sliding-window call only | 1504 | 1.7× | 1,712 MiB/2,004 MiB | 29 (build) | – | |
| TensorRT fp16five nnU-Net patch networks with eager volume processing only | fp16 | 1582 | 1.7× | 5,490 MiBenginenot comparable | 152 (build) | – |
Measured on RTX 5060 Ti 16 GB, torch 2.14.1+cu130, 2026-11-25. Separate process for each mode. Synchronized first call and median of the last 5 warm calls.. Ratios divide two
times of this table (same GPU, same input). Original fp16 is the authors’ own precision option, else torch.autocast. torch.compile and TensorRT: build time instead of load time. TensorRT memory (engine, not comparable) is the GPU memory the engine took, read from the driver because TensorRT allocates outside PyTorch, so it can't be compared with the PyTorch peaks of the other rows.
Streaming
The same checkpoint with the card’s stream option off and on, same input and workload. Memory is
torch’s peak reserved on the GPU. No CPU memory is recorded for these runs.
| Backend | Input | stream off | stream on | Peak GPU memory, off / on |
|---|---|---|---|---|
| Portable | 128x128 | 276 ms | 344 ms | 1,408 MiB / 1,014 MiB |
Both settings are the same build, input and protocol on the reference GPU; memory is torch’s peak reserved, the same as the speed table. “Not measured” = only one setting was run for that input and backend.
Other devices
| Device | Backend | dtype | ms / call | Peak memory | Load / first call (s) | Output vs reference | Input |
|---|---|---|---|---|---|---|---|
| NVIDIA runs on Linux and Windows | |||||||
| NVIDIA L4 CUDA, torch 2.14.1+cu130, 2026-11-29 | Portable | fp16 | 2458 | 1,825 MiB/1,982 MiB | 7.3 / 2.6 | matches | 200x200 |
| Kernels | fp16 | 1904 | 1,206 MiB/1,244 MiB | 2.5 / 2.0 | matches | 200x200 | |
| NVIDIA L40S CUDA, torch 2.14.1+cu130, 2026-11-30 | Portable | fp16 | 791 | 1,868 MiB/1,962 MiB | 7.1 / 0.9 | matches | 200x200 |
| Kernels | fp16 | 616 | 1,206 MiB/1,324 MiB | 1.4 / 0.7 | matches | 200x200 | |
| NVIDIA A10 CUDA, torch 2.14.1+cu130, 2026-11-30 | Portable | fp16 | 1600 | 1,825 MiB/1,984 MiB | 4.3 / 1.7 | matches | 200x200 |
| Kernels | fp16 | 1300 | 1,206 MiB/1,324 MiB | 1.4 / 1.4 | matches | 200x200 | |
| Apple silicon runs on macOS | |||||||
| Apple M1 Pro 16 GB MPS, torch 2.14.1, 2026-11-15 | Original | fp32 | cannot run here | – | – | 200x200 | |
| Portable | fp16 | 23070 | 6,058 MiB process | 1.7 / 23.5 | matches | 200x200 | |
| Portable | fp32 | 27804 | 10,180 MiB process | 1.7 / 25.5 | matches | 200x200 | |
| Kernels | fp16 | not implemented | – | – | 200x200 | ||
| Apple M1 Pro 16 GB (MLX, fp16) MLX, torch 2.14.1, 2026-11-25 | Portable | fp16 | 19980 | 5,853 MiB process | 2.0 / 20.1 | matches | 200x200 |
| Portable | fp32 | 25905 | 5,257 MiB process | 0.2 / 27.4 | matches | 200x200 | |
CUDA memory is torch’s peak allocated / reserved; Apple has no such counter, so the Mac rows show the process footprint (weights, Python and torch included). “Output vs reference” compares the device’s output with the stored golden output under the card’s tolerance; – = not checked on that device. Kernels “not implemented” = no kernels for this model on that backend yet: it runs portable there.
Licence and weights
Commercial use allowed
Our reading of the licences, not legal advice.
Weights
Dataset291_TotalSegmentator_part1_organs_1559subj/nnUNetTrainerNoMirroring__nnUNetPlans__3d_fullres/plans.json 11.2 KB· inside a 234 MB archive· hosted on GitHubDataset291_TotalSegmentator_part1_organs_1559subj/nnUNetTrainerNoMirroring__nnUNetPlans__3d_fullres/dataset.json 1.0 KB· inside a 234 MB archive· hosted on GitHubDataset291_TotalSegmentator_part1_organs_1559subj/nnUNetTrainerNoMirroring__nnUNetPlans__3d_fullres/fold_0/checkpoint_final.pth 252 MB· inside a 234 MB archive· hosted on GitHubDataset292_TotalSegmentator_part2_vertebrae_1532subj/nnUNetTrainerNoMirroring__nnUNetPlans__3d_fullres/plans.json 11.2 KB· inside a 234 MB archive· hosted on GitHubDataset292_TotalSegmentator_part2_vertebrae_1532subj/nnUNetTrainerNoMirroring__nnUNetPlans__3d_fullres/dataset.json 1.1 KB· inside a 234 MB archive· hosted on GitHubDataset292_TotalSegmentator_part2_vertebrae_1532subj/nnUNetTrainerNoMirroring__nnUNetPlans__3d_fullres/fold_0/checkpoint_final.pth 252 MB· inside a 234 MB archive· hosted on GitHubDataset293_TotalSegmentator_part3_cardiac_1559subj/nnUNetTrainerNoMirroring__nnUNetPlans__3d_fullres/plans.json 11.2 KB· inside a 234 MB archive· hosted on GitHubDataset293_TotalSegmentator_part3_cardiac_1559subj/nnUNetTrainerNoMirroring__nnUNetPlans__3d_fullres/dataset.json 974 B· inside a 234 MB archive· hosted on GitHubDataset293_TotalSegmentator_part3_cardiac_1559subj/nnUNetTrainerNoMirroring__nnUNetPlans__3d_fullres/fold_0/checkpoint_final.pth 251 MB· inside a 234 MB archive· hosted on GitHubDataset294_TotalSegmentator_part4_muscles_1559subj/nnUNetTrainerNoMirroring__nnUNetPlans__3d_fullres/plans.json 11.2 KB· inside a 234 MB archive· hosted on GitHubDataset294_TotalSegmentator_part4_muscles_1559subj/nnUNetTrainerNoMirroring__nnUNetPlans__3d_fullres/dataset.json 1.0 KB· inside a 234 MB archive· hosted on GitHubDataset294_TotalSegmentator_part4_muscles_1559subj/nnUNetTrainerNoMirroring__nnUNetPlans__3d_fullres/fold_0/checkpoint_final.pth 252 MB· inside a 234 MB archive· hosted on GitHubDataset295_TotalSegmentator_part5_ribs_1559subj/nnUNetTrainerNoMirroring__nnUNetPlans__3d_fullres/plans.json 11.2 KB· inside a 234 MB archive· hosted on GitHubDataset295_TotalSegmentator_part5_ribs_1559subj/nnUNetTrainerNoMirroring__nnUNetPlans__3d_fullres/dataset.json 1.0 KB· inside a 234 MB archive· hosted on GitHubDataset295_TotalSegmentator_part5_ribs_1559subj/nnUNetTrainerNoMirroring__nnUNetPlans__3d_fullres/fold_0/checkpoint_final.pth 252 MB· inside a 234 MB archive· hosted on GitHubfastforks downloads and checks these files on first use (fastforks download totalsegmentator-total).
Accuracy
The test set through the authors’ code and through ours: same checkpoint, same protocol. The distance between the original’s fp32 and fp16 runs is what half precision alone costs; our runs should stay within it.
TotalSegmentator test subset (7 CT cases)
1.5 mm, mean Dice
| Run | dtype | dice ↑ | Δ dice vs fp32 original | cases | ms / case |
|---|---|---|---|---|---|
| Original fp32 | fp32 | 0.9365 | reference | 7 | – |
| Original fp16 | fp16 | 0.9365 | +0.0000 | 7 | – |
| Portable fp32 | fp32 | 0.9365 | +0.0000 | 7 | – |
| Portable | fp16 | 0.9365 | +0.0000 | 7 | – |
| Kernels | fp16 | 0.9365 | +0.0000 | 7 | – |
A small subset of real CT cases of the TotalSegmentator dataset (not the full test split), each run at its card's spacing (1.5 or 3 mm) in the same pipeline; mean over the cases of the Dice (0 to 1) averaged over the classes present, against the ground-truth segmentations (vertebrae_L6 of the subset has no counterpart and is skipped). Original = TotalSegmentator 2.18.0, default fp16 autocast. Original = the authors’ code, same checkpoint and protocol. Measured on original fp32: RTX 5060 Ti, torch 2.10.0+cu130, 2026-11-18; original fp16: RTX 5060 Ti, torch 2.14.1+cu130, 2026-11-14; portable fp32: RTX 5060 Ti, torch 2.14.1+cu130, fastforks 3bf0bac7, 2026-11-18; portable, kernels: RTX 5060 Ti, torch 2.14.1+cu130, fastforks 2d71f180, 2026-11-14.
TotalSegmentator CT s0013
mean Dice over present classes
| Run | dtype | dice ↑ | cases | ms / case |
|---|---|---|---|---|
| Original fp32 | not measured | |||
| Original fp16 | not measured | |||
| Portable fp32 | not measured | |||
| Portable | fp16 | 0.8943 | 1 | – |
| Kernels | not measured | |||
The original code was not run on this dataset, so the table cannot show the distance to it.
A small subset of real CT cases of the TotalSegmentator dataset (not the full test split), each run at its card's spacing (1.5 or 3 mm) in the same pipeline; mean over the cases of the Dice (0 to 1) averaged over the classes present, against the ground-truth segmentations (vertebrae_L6 of the subset has no counterpart and is skipped). Original = TotalSegmentator 2.18.0, default fp16 autocast. A paired check on one labeled CT at the variant's spacing. The compiled or TensorRT patch network runs inside the same PyTorch sliding-window pipeline. Measured on RTX 5060 Ti, torch 2.14.1+cu130, fastforks 3bf0bac7, 2026-11-19.
Closeness to the original
Beyond the test-set scores: the raw output of ours against the original’s fp32 output on the same input, pixel by pixel. CPU, float32: max |diff| <= 0.0 vs the original. GPU, float16 (the default), portable and kernels: mean |diff| <= 0.003 and p99 <= 0.5 (absolute error of the output labels).
| Check | Tolerance | Measured |
|---|---|---|
| CPU fp32, max |diff| | ≤ 0 | not recorded |
| cpu_label_mismatch | ≤ 0.001 | not recorded |
| GPU default dtypes, mean |diff| | ≤ 0.003 | 0.00007 |
| GPU default dtypes, p99 |diff| | ≤ 0.5 | 0 |
Recorded for totalsegmentator-total on RTX 5060 Ti, torch 2.14.1+cu130, 2026-11-26, with these kernels: vol_norm
Details
TotalSegmentator (Wasserthal et al., Radiology: AI 2023): 117 anatomical structures (organs, bones, muscles, vessels) in CT, from nnU-Net v2 3D U-Nets. `total` merges five 1.5 mm part networks, `total-3mm` is the single fast 3 mm network. Also supports v2 at 6 mm, v3 at 1.5, 3 and 6 mm, small v3 at 1.5 and 3 mm, and `v3-total-single`, the single 1.5 mm network (dataset 839) that TotalSegmentator 3.1 uses by default. V3 labels L6 separately and includes S1 in the sacrum. Gives one integer label volume on the input grid plus the label names.
- Input / output
- Input: a CT volume
[D, H, W]in Hounsfield units and its voxel spacing in mm (volume.read_niftireads both from a NIfTI file). Output: a class index per voxel[D, H, W]on the input grid (0 = background).What the numbers mean, and which models need the camera focal length
Encoder models (nnFoundation) take a CT or MRI volume and give its encoder feature maps. For a trained nnU-Net v2 folder or checkpoint, see the [nnU-Net v2 loader](../api/volume.md#nnu-net-v2).
- Input size
- any H x W >= 32, padded to a multiple of 32; tested up to 512x512 (5,635 MiB allocated)
- Options
stream=false
- Outputs
labels- Checkpoint
parts=["Dataset291_TotalSegmentator_part1_organs_1559subj/nnUNetTrainerNoMirroring__nnUNetPlans__3d_fullres","Dataset292_TotalSegmentator_part2_vertebrae_1532subj/nnUNetTrainerNoMirroring__nnUNetPlans__3d_fullres","Dataset293_TotalSegmentator_part3_cardiac_1559subj/nnUNetTrainerNoMirroring__nnUNetPlans__3d_fullres","Dataset294_TotalSegmentator_part4_muscles_1559subj/nnUNetTrainerNoMirroring__nnUNetPlans__3d_fullres","Dataset295_TotalSegmentator_part5_ribs_1559subj/nnUNetTrainerNoMirroring__nnUNetPlans__3d_fullres"],spacing=1.5- CUDA kernels
vol_norminstance norm and LeakyReLU on 3D volumes
- Apple (MPS)
- fp32, fp16
Limitations
- On CUDA, stream=True keeps weights in CPU RAM and transfers each part once per volume. The five-part total model holds one part on the GPU at a time. All folds within the active part share the GPU.
- On an RTX 5060 Ti with a 96 × 128 × 128 CT, total peak allocated memory was 1,140 / 876 MiB for resident / streamed portable and 1,013 / 748 MiB for kernels. Streaming preserved every predicted label in both modes.
Full reference, generated from the repository
TotalSegmentator (University Hospital Basel): nnU-Net v2 networks that label 117 anatomical structures (organs, bones, muscles, vessels) in CT volumes, at 1.5 mm (five networks) or 3 mm (one, faster). Commercially usable (Apache-2.0 code and weights).
Commercial use: yes.
| variant | input | backend | time (ms) | peak memory (MiB, allocated / reserved) |
|---|---|---|---|---|
totalsegmentator-total | synthetic (200x200) | original (fp32) original portable kernels portable + torch.compile TensorRT fp16 | 4888 2614 2050 1437 1504 (compiled patch network inside the full sliding-window call) 1582 (five nnU-Net patch networks with eager volume processing) | 2873 / 3624 1902 / 2312 1851 / 2650 1194 / 1606 1712 / 2004 6646 / 7136 |
totalsegmentator-total-3mm | synthetic (200x200) | original (fp32) original portable kernels portable + torch.compile TensorRT fp16 | 192 149 87.4 39.6 52.7 (compiled patch network inside the full sliding-window call) 74.4 (patch network, standalone build) | 1743 / 2332 1000 / 1332 904 / 1404 900 / 1376 901 / 1030 2909 / 2970 |
totalsegmentator-total-6mm | synthetic (200x200) | original (fp32) original portable kernels portable + torch.compile TensorRT fp32 | 108 102 16.0 11.4 8.00 (compiled patch network inside the full sliding-window call) 26.3 (one fixed FP32 patch engine, eager volume processing) | 398 / 528 276 / 352 201 / 286 200 / 286 220 / 252 810.0 process |
totalsegmentator-v3-total | synthetic (200x200) | original (fp32) original portable kernels portable + torch.compile TensorRT fp16 | 5104 2673 2054 1434 1500 (compiled patch network inside the full sliding-window call) 2326 (five fixed nnU-Net patch engines with eager full-volume processing) | 2873 / 3624 1902 / 2312 1851 / 2650 1194 / 1606 1712 / 2004 3032.0 process |
totalsegmentator-v3-total-3mm | synthetic (200x200) | original (fp32) original portable kernels portable + torch.compile TensorRT fp32 | 192 150 87.2 40.1 52.3 (compiled patch network inside the full sliding-window call) 205 (one fixed nnU-Net patch engine with eager full-volume preprocessing and labels) | 1743 / 2332 1000 / 1332 904 / 1404 900 / 1376 901 / 1030 3122.0 process |
totalsegmentator-v3-total-6mm | synthetic (200x200) | original (fp32) original portable kernels portable + torch.compile TensorRT fp32 | 107 103 16.9 12.7 8.02 (compiled patch network inside the full sliding-window call) 26.3 (one fixed FP32 patch engine, eager volume processing) | 398 / 528 276 / 352 201 / 286 200 / 286 220 / 252 810.0 process |
totalsegmentator-v3-total-small | synthetic (200x200) | original (fp32) original portable kernels portable + torch.compile TensorRT fp16 | 5229 3370 3398 1634 2100 (compiled patch network inside the full sliding-window call) 4478 (five fixed nnU-Net patch engines with eager full-volume processing) | 2146 / 2482 1328 / 1508 1624 / 3174 1093 / 1872 1759 / 2144 3764.0 process |
totalsegmentator-v3-total-small-3mm | synthetic (200x200) | original (fp32) original portable kernels portable + torch.compile TensorRT fp32 | 143 127 91.4 30.2 46.0 (compiled patch network inside the full sliding-window call) 111 (one fixed FP32 patch engine, eager volume processing) | 666 / 826 424 / 490 1054 / 1218 1050 / 1218 1054 / 1130 2238.0 process |
totalsegmentator-v3-total-single | synthetic (200x200) | original portable kernels portable + torch.compile TensorRT fp16 | 2261 2351 1567 1916 fails: unsupported: the portable network is a sliding-window nnU-Ne | 4301 / 5088 6089 / 8990 3213 / 3406 6388 / 7396 – |
Weight streaming
Warm inference time and peak reserved GPU memory for the same input with both settings. Streamed weights use pinned host memory.
| Model | Mode | Input | GPU | PyTorch | Resident (stream=False) | Streamed (stream=True) |
|---|---|---|---|---|---|---|
| totalsegmentator-total | portable | 128x128 | RTX 5060 Ti | 2.14.1+cu130 | 275.85 ms / 1,408 MiB | 343.60 ms / 1,014 MiB |
Details
- Original code: https://github.com/wasserth/TotalSegmentator at
184fa4765456 - Code licence: Apache-2.0 (permissive); files:
LICENSE - Weights licence: Apache-2.0
totalsegmentator-v3-total-single: CC-BY-4.0
- Licence evidence: https://github.com/wasserth/TotalSegmentator/blob/184fa4765456492b2ab81a981cc387465906b003/LICENSE ; https://github.com/wasserth/TotalSegmentator/blob/184fa4765456492b2ab81a981cc387465906b003/README.md
- Training data: TotalSegmentator dataset v2 (1228 CT scans, 117 structures) (1559 CT scans of the TotalSegmentator dataset v2 (CC BY 4.0). Only the weights licence counts for the commercial flag.)
totalsegmentator-v3-total: TotalSegmentator CT dataset v3 (Updated CT labels and pediatric scans.)totalsegmentator-v3-total-3mm: TotalSegmentator CT dataset v3 (Updated CT labels and pediatric scans.)totalsegmentator-v3-total-6mm: TotalSegmentator CT dataset v3 (Updated CT labels and pediatric scans.)totalsegmentator-v3-total-small: TotalSegmentator CT dataset v3 (Updated CT labels and pediatric scans.)totalsegmentator-v3-total-small-3mm: TotalSegmentator CT dataset v3 (Updated CT labels and pediatric scans.)totalsegmentator-v3-total-single: TotalSegmentator CT dataset v3 (Updated CT labels and pediatric scans.)
- Options:
stream= False (speed only) - Kernel libraries:
vol_norm - Variants:
totalsegmentator-total,totalsegmentator-total-3mm,totalsegmentator-total-6mm,totalsegmentator-v3-total,totalsegmentator-v3-total-3mm,totalsegmentator-v3-total-6mm,totalsegmentator-v3-total-small,totalsegmentator-v3-total-small-3mm,totalsegmentator-v3-total-single - Outputs: labels
- Input size: any D x H x W volume and its voxel spacing (resampled to the model spacing, sliding window)
- Tested up to (portable, fp16, RTX 5060 Ti 16 GB):
totalsegmentator-total512x512x512 voxels (5.5 GiB peak allocated, 5.8 reserved);totalsegmentator-total-3mm512x512x512 voxels (4.3 GiB peak allocated, 5.1 reserved);totalsegmentator-total-6mmnot measured yet;totalsegmentator-v3-totalnot measured yet;totalsegmentator-v3-total-3mmnot measured yet;totalsegmentator-v3-total-6mmnot measured yet;totalsegmentator-v3-total-smallnot measured yet;totalsegmentator-v3-total-small-3mmnot measured yet;totalsegmentator-v3-total-single384x384x384 voxels (10.9 GiB peak allocated, 13.7 reserved) totalsegmentator-total200x200, first call: portable + torch.compile 29 s (cold Inductor cache), TensorRT fp16 152 s (ONNX + engine).totalsegmentator-total-3mm200x200, first call: portable + torch.compile 9 s (cold Inductor cache), TensorRT fp16 31 s (ONNX + engine).totalsegmentator-total-6mm200x200, first call: portable + torch.compile 8 s (cold Inductor cache), TensorRT fp32 17 s (ONNX + engine).totalsegmentator-v3-total200x200, first call: portable + torch.compile 27 s (cold Inductor cache), TensorRT fp16 90 s (ONNX + engine).totalsegmentator-v3-total-3mm200x200, first call: portable + torch.compile 9 s (cold Inductor cache), TensorRT fp32 32 s (ONNX + engine).totalsegmentator-v3-total-6mm200x200, first call: portable + torch.compile 7 s (cold Inductor cache), TensorRT fp32 16 s (ONNX + engine).totalsegmentator-v3-total-small200x200, first call: portable + torch.compile 74 s (cold Inductor cache), TensorRT fp16 165 s (ONNX + engine).totalsegmentator-v3-total-small-3mm200x200, first call: portable + torch.compile 20 s (cold Inductor cache), TensorRT fp32 34 s (ONNX + engine).totalsegmentator-v3-total-single200x200, first call: portable + torch.compile 31 s (cold Inductor cache).totalsegmentator-totaloriginal (fp32) 200x200: Persistent upstream predictor on a synthetic 200 × 200 × 200 CT at 1.5 mm. CPU NIfTI input and labels out. FP32 network with the original accumulator.totalsegmentator-totaloriginal 200x200: Persistent upstream predictor on a synthetic 200 × 200 × 200 CT at 1.5 mm. CPU NIfTI input and labels out. Native CUDA autocast.totalsegmentator-totalportable 200x200, kernels 200x200: Full volume API with CPU input and CPU labels on the same synthetic 200³ CT at 1.5 mm as the persistent original.totalsegmentator-total-3mmoriginal (fp32) 200x200: Persistent upstream predictor on a synthetic 200 × 200 × 200 CT at 1.5 mm. CPU NIfTI input and labels out. FP32 network with the original accumulator.totalsegmentator-total-3mmoriginal 200x200: Persistent upstream predictor on a synthetic 200 × 200 × 200 CT at 1.5 mm. CPU NIfTI input and labels out. Native CUDA autocast.totalsegmentator-total-3mmportable 200x200, kernels 200x200: Full volume API with CPU input and CPU labels on the same synthetic 200³ CT at 1.5 mm as the persistent original.totalsegmentator-total-6mmoriginal (fp32) 200x200: Persistent upstream predictor on a synthetic 200 × 200 × 200 CT at 1.5 mm. CPU NIfTI input and labels out. FP32 network with the original accumulator.totalsegmentator-total-6mmoriginal 200x200: Persistent upstream predictor on a synthetic 200 × 200 × 200 CT at 1.5 mm. CPU NIfTI input and labels out. Native CUDA autocast.totalsegmentator-total-6mmportable 200x200, kernels 200x200: Full volume API with CPU input and CPU labels on the same synthetic 200³ CT at 1.5 mm as the persistent original.totalsegmentator-v3-totaloriginal (fp32) 200x200: Persistent upstream predictor on a synthetic 200 × 200 × 200 CT at 1.5 mm. CPU NIfTI input and labels out. FP32 network with the original accumulator.totalsegmentator-v3-totaloriginal 200x200: Persistent upstream predictor on a synthetic 200 × 200 × 200 CT at 1.5 mm. CPU NIfTI input and labels out. Native CUDA autocast.totalsegmentator-v3-totalportable 200x200, kernels 200x200: Full volume API with CPU input and CPU labels on the same synthetic 200³ CT at 1.5 mm as the persistent original.totalsegmentator-v3-total-3mmoriginal (fp32) 200x200: Persistent upstream predictor on a synthetic 200 × 200 × 200 CT at 1.5 mm. CPU NIfTI input and labels out. FP32 network with the original accumulator.totalsegmentator-v3-total-3mmoriginal 200x200: Persistent upstream predictor on a synthetic 200 × 200 × 200 CT at 1.5 mm. CPU NIfTI input and labels out. Native CUDA autocast.totalsegmentator-v3-total-3mmportable 200x200, kernels 200x200: Full volume API with CPU input and CPU labels on the same synthetic 200³ CT at 1.5 mm as the persistent original.totalsegmentator-v3-total-6mmoriginal (fp32) 200x200: Persistent upstream predictor on a synthetic 200 × 200 × 200 CT at 1.5 mm. CPU NIfTI input and labels out. FP32 network with the original accumulator.totalsegmentator-v3-total-6mmoriginal 200x200: Persistent upstream predictor on a synthetic 200 × 200 × 200 CT at 1.5 mm. CPU NIfTI input and labels out. Native CUDA autocast.totalsegmentator-v3-total-6mmportable 200x200, kernels 200x200: Full volume API with CPU input and CPU labels on the same synthetic 200³ CT at 1.5 mm as the persistent original.totalsegmentator-v3-total-smalloriginal (fp32) 200x200: Persistent upstream predictor on a synthetic 200 × 200 × 200 CT at 1.5 mm. CPU NIfTI input and labels out. FP32 network with the original accumulator.totalsegmentator-v3-total-smalloriginal 200x200: Persistent upstream predictor on a synthetic 200 × 200 × 200 CT at 1.5 mm. CPU NIfTI input and labels out. Native CUDA autocast.totalsegmentator-v3-total-smallportable 200x200, kernels 200x200: Full volume API with CPU input and CPU labels on the same synthetic 200³ CT at 1.5 mm as the persistent original.totalsegmentator-v3-total-small-3mmoriginal (fp32) 200x200: Persistent upstream predictor on a synthetic 200 × 200 × 200 CT at 1.5 mm. CPU NIfTI input and labels out. FP32 network with the original accumulator.totalsegmentator-v3-total-small-3mmoriginal 200x200: Persistent upstream predictor on a synthetic 200 × 200 × 200 CT at 1.5 mm. CPU NIfTI input and labels out. Native CUDA autocast.totalsegmentator-v3-total-small-3mmportable 200x200, kernels 200x200: Full volume API with CPU input and CPU labels on the same synthetic 200³ CT at 1.5 mm as the persistent original.totalsegmentator-v3-total-singleoriginal 200x200: Persistent upstream 3.1.0 predictor (task total) on a synthetic 200 x 200 x 200 CT at 1.5 mm. CPU NIfTI input and labels out. Native CUDA autocast.totalsegmentator-v3-total-singleportable 200x200, kernels 200x200: Full volume API with a synthetic 200 x 200 x 200 CT at 1.5 mm isotropic spacing. GPU-resident input and output.totalsegmentator-totalload / first call: original 0.2723 s / 8.5418 s, portable 0.77 s / 2.103 s, kernels 0.77 s / 1.879 stotalsegmentator-total-3mmload / first call: original 0.0479 s / 2.6365 s, portable 1.18 s / 0.259 s, kernels 1.19 s / 0.209 stotalsegmentator-total-6mmload / first call: original 0.2932 s / 3.5302 s, portable 1.3522 s / 0.2457 s, kernels 1.2047 s / 0.1379 stotalsegmentator-v3-totalload / first call: original 0.0721 s / 8.5855 s, portable 1.3485 s / 2.2892 s, kernels 0.9767 s / 1.5509 stotalsegmentator-v3-total-3mmload / first call: original 0.0466 s / 2.513 s, portable 1.33 s / 0.3217 s, kernels 1.1878 s / 0.1813 stotalsegmentator-v3-total-6mmload / first call: original 0.0462 s / 2.99 s, portable 1.3922 s / 0.2535 s, kernels 1.1907 s / 0.1584 stotalsegmentator-v3-total-smallload / first call: original 0.0526 s / 7.7623 s, portable 1.1706 s / 3.5478 s, kernels 0.9574 s / 1.726 stotalsegmentator-v3-total-small-3mmload / first call: original 0.046 s / 2.7979 s, portable 1.2817 s / 0.3416 s, kernels 1.2589 s / 0.1829 stotalsegmentator-v3-total-singleload / first call: original 0.3488 s / 7.107 s, portable 0.406 s / 2.671 s, kernels 0.515 s / 1.7523 s- Protocol,
totalsegmentator-total,totalsegmentator-total-3mm: first call, 3 warm-up, peak reset, median of 3 rounds x median of 5 - Protocol,
totalsegmentator-total-6mm,totalsegmentator-v3-total,totalsegmentator-v3-total-3mm,totalsegmentator-v3-total-6mm,totalsegmentator-v3-total-small,totalsegmentator-v3-total-small-3mm,totalsegmentator-v3-total-single: Separate process for each mode. Synchronized first call and median of the last 3 warm calls.
Measured
A small subset of real CT cases of the TotalSegmentator dataset (not the full test split), each run at its card's spacing (1.5 or 3 mm) in the same pipeline; mean over the cases of the Dice (0 to 1) averaged over the classes present, against the ground-truth segmentations (vertebrae_L6 of the subset has no counterpart and is skipped). Original = TotalSegmentator 2.18.0, default fp16 autocast. A paired check on one labeled CT at the variant's spacing. The compiled or TensorRT patch network runs inside the same PyTorch sliding-window pipeline. Original = the original code named under Details, same checkpoint and protocol.
| variant | dataset | original fp32 | original fp16 | portable | portable fp32 | kernels | portable + torch.compile | TensorRT | note |
|---|---|---|---|---|---|---|---|---|---|
totalsegmentator-total | TotalSegmentator test subset (7 CT cases), 1.5 mm, mean Dice | 0.9365 | 0.9365 | 0.9365 | 0.9365 | 0.9365 | |||
totalsegmentator-total | TotalSegmentator CT s0013, mean Dice over present classes | 0.8943 | 0.8943 | ||||||
totalsegmentator-total-3mm | TotalSegmentator test subset (8 CT cases), 3 mm, mean Dice | 0.8285 | 0.8285 | 0.8285 | 0.8285 | 0.8285 | |||
totalsegmentator-total-3mm | TotalSegmentator CT s0013, mean Dice over present classes | 0.7980 | 0.7980 | 0.7980 | |||||
totalsegmentator-total-6mm | TotalSegmentator test subset (8 CT cases), 6 mm, mean Dice | 0.7100 | 0.7100 | ||||||
totalsegmentator-v3-total | TotalSegmentator test subset (8 CT cases), 1.5 mm, mean Dice | 0.9430 | 0.9430 | ||||||
totalsegmentator-v3-total-3mm | TotalSegmentator test subset (8 CT cases), 3 mm, mean Dice | 0.8767 | 0.8767 | ||||||
totalsegmentator-v3-total-6mm | TotalSegmentator test subset (8 CT cases), 6 mm, mean Dice | 0.6925 | 0.6925 | ||||||
totalsegmentator-v3-total-small | TotalSegmentator test subset (8 CT cases), 1.5 mm, mean Dice | 0.9302 | 0.9302 | ||||||
totalsegmentator-v3-total-small-3mm | TotalSegmentator test subset (8 CT cases), 3 mm, mean Dice | 0.8326 | 0.8326 | ||||||
totalsegmentator-v3-total-single | TotalSegmentator test subset (8 CT cases), 1.5 mm, mean Dice | 0.9542 | 0.9542 |
Measured on portable: NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks 2d71f180 / 35baed9de / 3bf0bac7 / 550adc40, 2026-11-14 to 2026-11-30; portable32: NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks 3bf0bac7, 2026-11-18; kernels: NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks 2d71f180 / 35baed9de, 2026-11-14 to 2026-11-30; compile: NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks 550adc40, 2026-11-18; tensorrt: NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks 3bf0bac7, 2026-11-18 to 2026-11-19.
Parity
CPU, float32: max |diff| <= 0.0 vs the original. GPU, float16 (the default), portable and kernels: mean |diff| <= 0.003 and p99 <= 0.5 (absolute error of the output labels).
| variant | kernels error vs original, mean / p99 | GPU, torch | kernels used |
|---|---|---|---|
totalsegmentator-total | 7e-05 / 0.0 | RTX 5060 Ti, torch 2.14.1+cu130 | vol_norm@a4dcb5f2cf0e:sm_120 |
totalsegmentator-total-3mm | 0.00056 / 0.0 | RTX 5060 Ti, torch 2.14.1+cu130 | vol_norm@a4dcb5f2cf0e:sm_120 |
totalsegmentator-total-6mm | 0.00045 / 0.0 | RTX 5060 Ti, torch 2.14.1+cu130 | vol_norm@a4dcb5f2cf0e:sm_120 |
totalsegmentator-v3-total | 0.00014 / 0.0 | RTX 5060 Ti, torch 2.14.1+cu130 | vol_norm@a4dcb5f2cf0e:sm_120 |
totalsegmentator-v3-total-3mm | 0.0004 / 0.0 | RTX 5060 Ti, torch 2.14.1+cu130 | vol_norm@a4dcb5f2cf0e:sm_120 |
totalsegmentator-v3-total-6mm | 0.00059 / 0.0 | RTX 5060 Ti, torch 2.14.1+cu130 | vol_norm@a4dcb5f2cf0e:sm_120 |
totalsegmentator-v3-total-small | 0.0005 / 0.0 | RTX 5060 Ti, torch 2.14.1+cu130 | vol_norm@a4dcb5f2cf0e:sm_120 |
totalsegmentator-v3-total-small-3mm | 0.00117 / 0.0 | RTX 5060 Ti, torch 2.14.1+cu130 | vol_norm@a4dcb5f2cf0e:sm_120 |
totalsegmentator-v3-total-single | 0.00026 / 0.0 | RTX 5060 Ti, torch 2.14.1+cu130 | vol_norm@a4dcb5f2cf0e:sm_120 |
Limitations
- On CUDA, stream=True keeps weights in CPU RAM and transfers each part once per volume. The five-part total model holds one part on the GPU at a time. All folds within the active part share the GPU.
- On an RTX 5060 Ti with a 96 × 128 × 128 CT, total peak allocated memory was 1,140 / 876 MiB for resident / streamed portable and 1,013 / 748 MiB for kernels. Streaming preserved every predicted label in both modes.
Example output
No example rendered for this checkpoint yet.