TotalSegmentator problem - Macbook M1 Max

Hi there,

I have been trying to use the Totalsegmentator extension in a MacBook M1 Max. The extension gets installed properly but when trying to run a segmentation for the first time, it starts installing some python packages. During the installation it gives the following error and stops “Failed to compute results. “git” is required to install TotalSegmentator”.

Any idea how to solve this problem?

The message is correct, if you don’t have git on your computer already then you need to install it.

You can either install Github desktop or follow these instructions.

1 Like

Thank you. Problem solved. Any idea if it is using the M1 Max gpu or cpu?

TotalSegmentator will automatically use a CUDA-compatible GPU if available, otherwise CPU.

As far as I see, the ARM-based M1 Max can not enable CUDA.

For orientation: The “total” process (–fast option) takes 47.43 seconds on an RTX 1060 Windows laptop with CUDA enabled and in GPU mode (CTChest demo dataset).

Yes, macOS does not support either NVIDIA’s CUDA or the vendor-independent OpenCL interface. Apple has made its own proprietary metal performance shader (MPS) API available but it arrived very late to the party and it takes a while for frameworks and tools to adopt it.

Apple MPS is already supported at the level of AI frameworks, such as in pytorch. However, it is not supported (yet) in medical image computing frameworks (nnunet, MONAI, etc.). It is probably not a huge work for adding supporting for Apple MPS at higher levels, so it will eventually happen. I’ve submitted an issue to track the status of this in TotalSegmentator:

1 Like