gaudot / SlicerDentalSegmentator

3D Slicer extension for fully-automatic segmentation of CT and CBCT dental volumes.
Apache License 2.0
56 stars 6 forks source link

[Python] Something went wrong during the nnUNet processing. #18

Open aeoorto opened 3 days ago

aeoorto commented 3 days ago

I am having touble shoot problems in windows 10, could you help me

[Python] Failed to load the segmentation. [Python] Something went wrong during the nnUNet processing. [Python] Please check the logs for potential errors and contact the library maintainers.

Manufacturer: ASUSTeK Computer Inc. Processor: Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz, 2.59 GHz Installed Memory (RAM): 32.0 GB (31.9 GB usable) System Type: 64-bit Operating System, x64-based processor Pen and Touch Input: Touch Input Available (handwriting compatible) Additionally:

Windows Edition: Windows 10 Home Single Language Activation Status: Windows is activated

aeoorto commented 3 days ago

2024/09/28 14:12:15.834 :: nnUNet is already installed (2.5.1) and compatible with requested version (nnunetv2). 2024/09/28 14:12:15.839 :: Downloading model weights... 2024/09/28 14:15:36.931 :: Transferring volume to nnUNet in C:/Users/aeoor/AppData/Local/Temp/Slicer-QtlqIb 2024/09/28 14:16:04.093 :: Starting nnUNet with the following parameters: 2024/09/28 14:16:04.093 :: 2024/09/28 14:16:04.093 :: C:\Users\aeoor\AppData\Local\slicer.org\Slicer 5.7.0-2024-09-26\lib\Python\Scripts\nnUNetv2_predict.exe -i C:/Users/aeoor/AppData/Local/Temp/Slicer-QtlqIb/input -o C:/Users/aeoor/AppData/Local/Temp/Slicer-QtlqIb/output -d Dataset111_453CT -tr nnUNetTrainer -p nnUNetPlans -c 3d_fullres -f 0 -npp 1 -nps 1 -step_size 0.5 -device cuda -chk checkpoint_final.pth --disable_tta 2024/09/28 14:16:04.093 :: 2024/09/28 14:16:04.093 :: JSON parameters : 2024/09/28 14:16:04.093 :: { 2024/09/28 14:16:04.093 :: "folds": "0", 2024/09/28 14:16:04.093 :: "device": "cuda", 2024/09/28 14:16:04.093 :: "stepSize": 0.5, 2024/09/28 14:16:04.093 :: "disableTta": true, 2024/09/28 14:16:04.093 :: "nProcessPreprocessing": 1, 2024/09/28 14:16:04.093 :: "nProcessSegmentationExport": 1, 2024/09/28 14:16:04.093 :: "checkPointName": "", 2024/09/28 14:16:04.093 :: "modelPath": { 2024/09/28 14:16:04.093 :: "_path": "C:\Users\aeoor\AppData\Local\slicer.org\Slicer 5.7.0-2024-09-26\slicer.org\Extensions-33036\DentalSegmentator\lib\Slicer-5.7\qt-scripted-modules\Resources\ML" 2024/09/28 14:16:04.093 :: } 2024/09/28 14:16:04.093 :: } 2024/09/28 14:16:04.129 :: nnUNet preprocessing... 2024/09/28 14:16:10.977 :: Traceback (most recent call last): 2024/09/28 14:16:10.977 :: File "C:\Users\aeoor\AppData\Local\slicer.org\Slicer 5.7.0-2024-09-26\lib\Python\Lib\runpy.py", line 197, in _run_module_as_main 2024/09/28 14:16:10.979 :: return _run_code(code, main_globals, None, 2024/09/28 14:16:10.979 :: File "C:\Users\aeoor\AppData\Local\slicer.org\Slicer 5.7.0-2024-09-26\lib\Python\Lib\runpy.py", line 87, in _run_code 2024/09/28 14:16:10.979 :: exec(code, run_globals) 2024/09/28 14:16:10.979 :: File "C:\Users\aeoor\AppData\Local\slicer.org\Slicer 5.7.0-2024-09-26\lib\Python\Scripts\nnUNetv2_predict.exe__main__.py", line 4, in 2024/09/28 14:16:10.979 :: File "C:\Users\aeoor\AppData\Local\slicer.org\Slicer 5.7.0-2024-09-26\lib\Python\Lib\site-packages\nnunetv2\inference\predict_from_raw_data.py", line 12, in 2024/09/28 14:16:10.979 :: from batchgenerators.dataloading.multi_threaded_augmenter import MultiThreadedAugmenter 2024/09/28 14:16:10.979 :: File "C:\Users\aeoor\AppData\Local\slicer.org\Slicer 5.7.0-2024-09-26\lib\Python\Lib\site-packages\batchgenerators\dataloading\multi_threaded_augmenter.py", line 26, in 2024/09/28 14:16:10.996 :: from threadpoolctl import threadpool_limits 2024/09/28 14:16:10.996 :: ModuleNotFoundError: No module named 'threadpoolctl' 2024/09/28 14:16:11.225 :: Loading inference results... 2024/09/28 14:16:28.665 :: Error loading results : 2024/09/28 14:16:28.665 :: Failed to load the segmentation. 2024/09/28 14:16:28.665 :: Something went wrong during the nnUNet processing. 2024/09/28 14:16:28.665 :: Please check the logs for potential errors and contact the library maintainers.

Thibault-Pelletier commented 1 day ago

Hi @aeoorto, Your problem seems to indicate an install error :

ModuleNotFoundError: No module named 'threadpoolctl'

You may want to try to :

For the threadpoolctl, you can trigger the install manually from the console using the slicer.util.pip_install method

slicer.util.pip_install("threadpoolctl")

You may be interested in this related thread on the Slicer discourse : https://discourse.slicer.org/t/totalsegmentor-showing-missing-threadpoolctl-module/38452