FlashSegmentator: High-Throughput TotalSegmentator Inference without Loss of Accuracy

Yosuke Yamagishi, Tomohiro Kikuchi, Shouhei Hanaoka, Takeharu Yoshikawa, Osamu AbearXiv 2026

TL;DR

Modern medical AI can map over a hundred organs and bones in a CT scan, turning routine checkups into treasure troves of preventive health data—except doing so takes minutes per scan, creating a massive computational bottleneck at hospital scales. FlashSegmentator overhauls the software pipeline around the popular TotalSegmentator model, speeding up CT processing by up to 58x (and MRI by 94x) without changing a single model weight or losing a shred of accuracy. It drops the cloud computing bill for 10,000 scans from nearly $1,000 to under $30.

What Problem Does This Paper Address?

Every day, hospitals acquire thousands of CT and MRI scans. Recently, an open-source deep learning tool called TotalSegmentator revolutionized radiology research by automatically outlining (segmenting) 117 different anatomical structures in 3D CT volumes. This enables "opportunistic screening"—say, checking a patient's bone density or muscle mass from a scan ordered for a stomach ache, with zero extra radiation.

The catch? Scale. The standard TotalSegmentator pipeline takes 1 to 4 minutes per scan. Analyzing a hospital archive of 100,000 scans occupies a GPU for months. Previously, if you wanted to go faster, you either ran TotalSegmentator in lower-resolution modes (which turns delicate structures like ribs into jagged, fragmented blocks) or used FastSegmentator, a GPU-accelerated rewrite that still leaves massive amounts of GPU compute sitting idle because it processes scans one patch at a time, sequentially.

Methods

Instead of training a new neural network or pruning weights, the authors treated this purely as a systems engineering puzzle. Keeping the exact same pretrained neural networks (five 3D nnU-Net models for CT; two for MRI), they built FlashSegmentator on top of FastSegmentator by introducing six inference-level optimizations:

Figure 1: Processing flow of the reference implementation (TotalSegmentator command-line interface), FastSegmentator, and FlashSegmentator for the CT total task. White boxes indicate CPU steps, green boxes GPU steps, and dashed gray boxes steps performed once per run. FlashSegmentator processes the examinations in groups of four in a three-stage pipeline, in which loading of group k + 1, inference on group k, and resampling back and writing of group k − 1 run at the same time. Circled numbers correspond to the modifications listed in Materials and Methods. MRI follows the same flow with two networks.
  1. Static-shape compilation: Compiling the networks once via PyTorch 2 (torch.compile) with fixed input shapes (zero-padding incomplete batches) to fuse GPU operations.
  2. cuDNN autotuning: Benchmarking and locking in the fastest convolution algorithms at runtime.
  3. CPU–GPU Pipelining: Processing scans in groups of four across three overlapping stages—while the GPU runs inference on group $k$, background CPU threads load/resample group $k+1$ and write outputs for group $k-1$.
  4. Batched sliding-window inference: Pooling 3D image patches across the four scans in a group and feeding them to the GPU in batches rather than one by one.
  5. Full GPU postprocessing: Converting network probabilities to labels and merging the ensemble's five 3D maps entirely on the GPU to avoid sluggish CPU-GPU memory transfers.
  6. Smarter output writing: Reusing input image headers (instead of re-reading files) and saving compact 8-bit label files.

They also tested an optional body cropping step that trims empty air around the patient before inference, cutting patch counts by ~25%.

Datasets

No models were trained in this study. Evaluation relied on four public, de-identified datasets (no new benchmarks were introduced):

  • TotalSegmentator CT (v2.0.1): 73 test scans (117 structures) for throughput and accuracy, plus 512 training scans to test multi-process scaling. (Note: 16 of the original 89 test scans were excluded from baseline comparisons because slightly non-orthonormal header matrices caused the reference tools—though not FlashSegmentator—to crash).
  • Beyond the Cranial Vault (BTCV): 30 abdominal CT scans with manual human annotations (13 structures) as an external accuracy check.
  • TotalSegmentator MRI (v2.0.0): 55 test MRI scans (50 structures; 49 used for accuracy after excluding 6 with empty reference masks).

Key Insights and Ideas

  • The GPU was starving, not slow: On an NVIDIA A100, standard TotalSegmentator uses an average of just 7% of the GPU; compiled FastSegmentator hits 48%. By overlapping I/O with batched execution, a single FlashSegmentator process achieves 93% GPU utilization.
Figure 3: GPU utilization during processing of the 512 training-split examinations on the A100 (10 minutes, starting 2 minutes after the first GPU activity), recorded with nvidia-smi at intervals of approximately 2 seconds. (A) One process; (B) multiple concurrent processes (reference implementation, 32 command-line calls; compiled FastSegmentator, four processes; FlashSegmentator, two processes). Rows show, from top, the reference implementation (command-line calls), compiled FastSegmentator,
  • Brute-force parallelization hits a wall: A common trick to fill an idle GPU is spawning dozens of parallel jobs (xargs -P). Even with 32 concurrent processes on an A100, the reference tool maxed out at 482 scans/hour before bottlenecking—still nearly 4x slower than a single FlashSegmentator process.
  • PyTorch compilation beat specialized engines: Static-shape torch.compile delivered the single biggest speedup. Surprisingly, exporting to TensorRT, ONNX Runtime, or fusing the five networks into grouped convolutions didn't beat compiled PyTorch.
  • You don't have to trade accuracy for speed: TotalSegmentator's built-in --fast and --fastest modes drop accuracy (Dice score) by 11.6% and 24.1%, severely degrading thin bones and vessels. FlashSegmentator preserves full-resolution accuracy while running 8 to 10 times faster than those degraded modes.

Key Results

Tested across data-center (NVIDIA GH200, A100) and entry-level (T4) GPUs:

  • CT Throughput: Processed 3,782 (GH200), 1,810 (A100), and 270 (T4) scans/hour—representing 57.7x, 33.9x, and 6.4x speedups over the reference tool, and 3.2x, 2.5x, and 1.22x over compiled FastSegmentator. Optional body cropping pushed GH200 throughput to 4,695 scans/hour (71.7x).
  • MRI Throughput: Achieved a 94x speedup on A100 (0.27s vs. 25.8s per scan).
  • Accuracy Equivalence: Using statistical equivalence testing (margin $\pm 0.01$ Dice), FlashSegmentator matched the reference implementation across all 117 CT structures on all GPUs (mean Dice difference $\le 1.2 \times 10^{-5}$) and all 50 MRI structures. On BTCV, examination-level scores were equivalent (12/13 structures met the strict margin; portal/splenic veins missed by 0.0005 due to minor resampling differences).
  • Cloud Cost: Processing 10,000 CT scans on an Azure A100 VM plummeted from $997** (reference) to **$29 ($22 with body cropping), and to **$20** on a budget T4 VM. Segmented at standard resolution, 100,000 scans would take ~26 hours on one GH200.

Limitations and Future Work

  • Real-world hospital bottlenecks: Timing experiments measured file-to-file execution once per condition. In actual clinical deployment, sustaining ~3,800 scans/hour will likely be bottlenecked by hospital PACS network retrieval speeds, disk storage I/O, and DICOM-to-NIfTI file conversion.
  • Memory constraints on smaller GPUs: Running concurrent processes wasn't tested on the 16GB T4 GPU due to memory limits, and minor resampling variations can occur on scans not already at 1.5-mm resolution.
  • Scope of models: Only TotalSegmentator's primary whole-body CT and MRI tasks were evaluated; extending and verifying these pipeline optimizations on organ-specific sub-tasks or other 3D segmentation architectures remains future work.

Summary updated

Abstract

Purpose: To develop, evaluate, and publicly release FlashSegmentator, an open-source inference pipeline that increases the throughput of TotalSegmentator without retraining or loss of segmentation accuracy. Materials and Methods: This retrospective study used public datasets: 73 CT examinations from the TotalSegmentator test split (median age, 65 years; 37 male, 35 female, one unknown), 30 abdominal CT examinations from the Beyond the Cranial Vault (BTCV) dataset, 512 training-split CT examinations for concurrent-process analysis, and 55 MRI examinations. FlashSegmentator adds static-shape compilation, pipelining, batched sliding-window inference, and GPU postprocessing. Throughput was compared with the reference implementation (including its lower-resolution modes) and FastSegmentator on GH200, A100, and T4 GPUs. Dice agreement was tested with two one-sided tests (margin, +/-0.01). Results: FlashSegmentator processed 3782, 1810, and 270 examinations per hour on the GH200, A100, and T4 (57.7, 33.9, and 6.4 times the reference implementation and 3.20, 2.50, and 1.22 times compiled FastSegmentator). Dice scores were equivalent for all 117 structures on every GPU (mean difference <= 1.2 x 10^-5; P < .001) and at the examination level on BTCV. In contrast, the lower-resolution modes of the reference implementation processed 181 and 213 examinations per hour on the A100 but reduced mean Dice by 0.116 and 0.241. On MRI, throughput increased 94-fold with all 50 structures equivalent. Estimated A100 cloud cost per 10,000 examinations decreased from 997 to 29 US dollars. Conclusion: FlashSegmentator increased the throughput of TotalSegmentator on data center and entry-level GPUs without loss of segmentation accuracy compared with the reference implementation.
BibTeX
@misc{yamagishi2026flashsegmentator,
  author = {Yosuke Yamagishi and Tomohiro Kikuchi and Shouhei Hanaoka and Takeharu Yoshikawa and Osamu Abe},
  title = {{FlashSegmentator: High-Throughput TotalSegmentator Inference without Loss of Accuracy}},
  year = {2026},
  eprint = {2611.32208},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.32208},
}
Figure