Could you please check if you can find more specific error messages in the textbox below the Apply button after clicking OK on the popup?
You can also look for more details in the application log that you can get in menu: Help / Report a bug.
TotalSegmentator.py:452) - FileNotFoundError: [Errno 2] No such file or directory: ‘C:\Users\computer\.totalsegmentator\nnunet\results\nnUNet\3d_fullres\Task253_TotalSegmentator_part3_cardiac_1139subj\nnUNetTrainerV2_ep4000_nomirror__nnUNetPlansv2.1\plans.pkl’
TotalSegmentator.py:452) - Exception ignored in: <totalsegmentator.libs.DummyFile object at 0x0000024A418D96A0>
TotalSegmentator.py:452) - AttributeError: ‘DummyFile’ object has no attribute ‘flush’
This is very useful information. It means that the first time you have run TotalSegmentator the model download was incomplete (either network transient network problem or you were not patient enough and interrupted).
You can fix this by deleting the C:\Users\computer\.totalsegmentator folder and restart. Normally model download completes within a couple of minutes, but just in case, give it an hour.
File uploads should be kept at minimum to keep hosting costs under control. You can upload any files anywhere (your dropbox, onedrive, google drive, etc.) and just post the link here.
I think, the problem was GPU issue.
When I uses this for first time, my computer GPU status was running on other works(deep learning stuff).
And for following your adivce, I cleaned whole GPU cash, and delete TotalSegmentator and restart → finally It worked.
Here is log message popped up by TotalSegmentator:
Processing started
Writing input file to C:/Users/username/AppData/Local/Temp/Slicer/__SlicerTemp__2023-10-17_17+57+36.230/total-segmentator-input.nii
Creating segmentations with TotalSegmentator AI…
Total Segmentator arguments: [‘-i’, ‘C:/Users/username/AppData/Local/Temp/Slicer/__SlicerTemp__2023-10-17_17+57+36.230/total-segmentator-input.nii’, ‘-o’, ‘C:/Users/username/AppData/Local/Temp/Slicer/__SlicerTemp__2023-10-17_17+57+36.230/segmentation’, ‘–ml’, ‘–task’, ‘total’, ‘–fast’]
C:\Users\username\AppData\Local\slicer.org\Slicer 5.4.0\lib\Python\Scripts\TotalSegmentator:5: DeprecationWarning: pkg_resources is deprecated as an API. See Package Discovery and Resource Access using pkg_resources - setuptools 69.0.2.post20231121 documentation
from pkg_resources import require
Using ‘fast’ option: resampling to lower resolution (3mm)
Downloading pretrained weights for Task 256 (~230MB) …
Traceback (most recent call last):
File “C:\Users\username\AppData\Local\slicer.org\Slicer 5.4.0\lib\Python\Scripts\TotalSegmentator”, line 93, in
main()
File “C:\Users\username\AppData\Local\slicer.org\Slicer 5.4.0\lib\Python\Scripts\TotalSegmentator”, line 86, in main
totalsegmentator(args.input, args.output, args.ml, args.nr_thr_resamp, args.nr_thr_saving,
File “C:\Users\username\AppData\Local\slicer.org\Slicer 5.4.0\lib\Python\Lib\site-packages\totalsegmentator\python_api.py”, line 157, in totalsegmentator
download_pretrained_weights(task_id)
File “C:\Users\username\AppData\Local\slicer.org\Slicer 5.4.0\lib\Python\Lib\site-packages\totalsegmentator\libs.py”, line 183, in download_pretrained_weights
download_url_and_unpack(WEIGHTS_URL, config_dir)
File “C:\Users\username\AppData\Local\slicer.org\Slicer 5.4.0\lib\Python\Lib\site-packages\totalsegmentator\libs.py”, line 69, in download_url_and_unpack
raise e
File “C:\Users\username\AppData\Local\slicer.org\Slicer 5.4.0\lib\Python\Lib\site-packages\totalsegmentator\libs.py”, line 56, in download_url_and_unpack
r.raise_for_status()
File “C:\Users\username\AppData\Local\slicer.org\Slicer 5.4.0\lib\Python\Lib\site-packages\requests\models.py”, line 1021, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://zenodo.org/record/6802052/files/Task256_TotalSegmentator_3mm_1139subj.zip?download=1
We are having problems with the Zenodo servers currently so users run into problems when they want to use TotalSegmentator from the extension. We will push an update and switch to TS version 1.5.7 where weights get loaded from GitHub.You would need to install the update when available and force install TotalSegmentator once.
We have fixed TotalSegmentator extension (using 1.5.7). Install latest Slicer Stable Release and update or reinstall TotalSegmentator extension. Or inatall latest Slicer Preview Release and install TotalSegmentator extension.
We will release a new version of TotalSegmentator Slicer extension next week that works with TotalSegmentator 2.0.5, which brings imepoved accuracy and new segments.