When I run totalsegmentator on 3D slicer using the CTA Abdomen (panoramix) sample data it comes with the following error. I have tried uninstalling 3D slicer/PyTorch/totalsegmentator numerous times with no luck.
Operating system: macOS Monterey 12.5.1 (Apple M1 chip)
Slicer version: 5.2.2
Expected behavior: totalsegmentator
Actual behavior: ERROR when running apply
"Processing started
Writing input file to /private/var/folders/n4/_8hf03v543x_q3b0k017wbfm0000gp/T/Slicer-mosc7cj2/__SlicerTemp__2023-05-23_10+25+00.631/total-segmentator-input.nii
Creating segmentations with TotalSegmentator AI…
Total Segmentator arguments: [‘-i’, ‘/private/var/folders/n4/_8hf03v543x_q3b0k017wbfm0000gp/T/Slicer-mosc7cj2/__SlicerTemp__2023-05-23_10+25+00.631/total-segmentator-input.nii’, ‘-o’, ‘/private/var/folders/n4/_8hf03v543x_q3b0k017wbfm0000gp/T/Slicer-mosc7cj2/__SlicerTemp__2023-05-23_10+25+00.631/segmentation’, ‘–ml’, ‘–task’, ‘total’, ‘–fast’]
/Applications/Slicer.app/Contents/lib/Python/lib/python3.9/site-packages/torch/cuda/amp/grad_scaler.py:116: UserWarning: torch.cuda.amp.GradScaler is enabled, but CUDA is not available. Disabling.
warnings.warn(“torch.cuda.amp.GradScaler is enabled, but CUDA is not available. Disabling.”)
/Applications/Slicer.app/Contents/lib/Python/lib/python3.9/site-packages/torch/cuda/amp/autocast_mode.py:118: UserWarning: torch.cuda.amp.autocast only affects CUDA ops, but CUDA is not available. Disabling.
warnings.warn(“torch.cuda.amp.autocast only affects CUDA ops, but CUDA is not available. Disabling.”)
Traceback (most recent call last):
File “/Applications/Slicer.app/Contents/lib/Python/bin/TotalSegmentator”, line 93, in
main()
File “/Applications/Slicer.app/Contents/lib/Python/bin/TotalSegmentator”, line 86, in main
totalsegmentator(args.input, args.output, args.ml, args.nr_thr_resamp, args.nr_thr_saving,
File “/Applications/Slicer.app/Contents/lib/Python/lib/python3.9/site-packages/totalsegmentator/python_api.py”, line 173, in totalsegmentator
seg = nnUNet_predict_image(input, output, task_id, model=model, folds=folds,
File “/Applications/Slicer.app/Contents/lib/Python/lib/python3.9/site-packages/totalsegmentator/nnunet.py”, line 255, in nnUNet_predict_image
nnUNet_predict(tmp_dir, tmp_dir, task_id, model, folds, trainer, tta)
File “/Applications/Slicer.app/Contents/lib/Python/lib/python3.9/site-packages/totalsegmentator/nnunet.py”, line 106, in nnUNet_predict
predict_from_folder(model_folder_name, dir_in, dir_out, folds, save_npz, num_threads_preprocessing,
File “/Applications/Slicer.app/Contents/lib/Python/lib/python3.9/site-packages/nnunet/inference/predict.py”, line 668, in predict_from_folder
return predict_cases_fastest(model, list_of_lists[part_id::num_parts], output_files[part_id::num_parts], folds,
File “/Applications/Slicer.app/Contents/lib/Python/lib/python3.9/site-packages/nnunet/inference/predict.py”, line 493, in predict_cases_fastest
res = trainer.predict_preprocessed_data_return_seg_and_softmax(d, do_mirroring=do_tta,
File “/Applications/Slicer.app/Contents/lib/Python/lib/python3.9/site-packages/nnunet/training/network_training/nnUNetTrainerV2.py”, line 211, in predict_preprocessed_data_return_seg_and_softmax
ret = super().predict_preprocessed_data_return_seg_and_softmax(data,
File “/Applications/Slicer.app/Contents/lib/Python/lib/python3.9/site-packages/nnunet/training/network_training/nnUNetTrainer.py”, line 516, in predict_preprocessed_data_return_seg_and_softmax
ret = self.network.predict_3D(data, do_mirroring=do_mirroring, mirror_axes=mirror_axes,
File “/Applications/Slicer.app/Contents/lib/Python/lib/python3.9/site-packages/nnunet/network_architecture/neural_network.py”, line 147, in predict_3D
res = self._internal_predict_3D_3Dconv_tiled(x, step_size, do_mirroring, mirror_axes, patch_size,
File “/Applications/Slicer.app/Contents/lib/Python/lib/python3.9/site-packages/nnunet/network_architecture/neural_network.py”, line 348, in _internal_predict_3D_3Dconv_tiled
gaussian_importance_map[gaussian_importance_map == 0] = gaussian_importance_map[
RuntimeError: “min_all” not implemented for ‘Half’
Exception ignored in: <totalsegmentator.libs.DummyFile object at 0x1b765f5b0>
AttributeError: ‘DummyFile’ object has no attribute ‘flush’
If you use this tool please cite: https://doi.org/10.48550/arXiv.2208.05868
No GPU detected. Running on CPU. This can be very slow. The ‘–fast’ option can help to some extend.
Using ‘fast’ option: resampling to lower resolution (3mm)
Resampling…
Resampled in 4.13s
Predicting…"