Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TotalSegmentator installation error #70

Closed
zbrusher opened this issue Feb 9, 2023 · 6 comments
Closed

TotalSegmentator installation error #70

zbrusher opened this issue Feb 9, 2023 · 6 comments

Comments

@zbrusher
Copy link

zbrusher commented Feb 9, 2023

I have some problems installing TotalSegmentator. Let me try to describe it clearly. I hope to get your help.
My device:DELL windows 10 NVIDIA GeForceRTX3060 ,Display Memory: 28386 MB

pyTorch :version 1.13+cu117
NVidia driver: version 512.77

=========
Processing started

Writing input file to C:/Users/Administrator/AppData/Local/Temp/Slicer/__SlicerTemp__2023-02-08_16+16+43.146/total-segmentator-input.nii

Creating segmentations with TotalSegmentator AI…

Total Segmentator arguments: [‘-i’, ‘C:/Users/Administrator/AppData/Local/Temp/Slicer/__SlicerTemp__2023-02-08_16+16+43.146/total-segmentator-input.nii’, ‘-o’, ‘C:/Users/Administrator/AppData/Local/Temp/Slicer/__SlicerTemp__2023-02-08_16+16+43.146/segmentation’, ‘–ml’, ‘–task’, ‘total’]

If you use this tool please cite: [2208.05868] TotalSegmentator: robust segmentation of 104 anatomical structures in CT images

Downloading pretrained weights for Task 251 (~230MB) …

Traceback (most recent call last):

File “C:\ProgramData\NA-MIC\Slicer 5.2.1\lib\Python\Lib\site-packages\urllib3\connection.py”, line 174, in _new_conn

conn = connection.create_connection(

File “C:\ProgramData\NA-MIC\Slicer 5.2.1\lib\Python\Lib\site-packages\urllib3\util\connection.py”, line 72, in create_connection

for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):

File “C:\ProgramData\NA-MIC\Slicer 5.2.1\lib\Python\Lib\socket.py”, line 954, in getaddrinfo

for res in _socket.getaddrinfo(host, port, family, type, proto, flags):

socket.gaierror: [Errno 11004] getaddrinfo failed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File “C:\ProgramData\NA-MIC\Slicer 5.2.1\lib\Python\Lib\site-packages\urllib3\connectionpool.py”, line 703, in urlopen

httplib_response = self._make_request(

File “C:\ProgramData\NA-MIC\Slicer 5.2.1\lib\Python\Lib\site-packages\urllib3\connectionpool.py”, line 386, in _make_request

self._validate_conn(conn)

File “C:\ProgramData\NA-MIC\Slicer 5.2.1\lib\Python\Lib\site-packages\urllib3\connectionpool.py”, line 1042, in _validate_conn

conn.connect()

File “C:\ProgramData\NA-MIC\Slicer 5.2.1\lib\Python\Lib\site-packages\urllib3\connection.py”, line 358, in connect

self.sock = conn = self._new_conn()

File “C:\ProgramData\NA-MIC\Slicer 5.2.1\lib\Python\Lib\site-packages\urllib3\connection.py”, line 186, in _new_conn

raise NewConnectionError(

urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x0000023943A0D700>: Failed to establish a new connection: [Errno 11004] getaddrinfo failed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File “C:\ProgramData\NA-MIC\Slicer 5.2.1\lib\Python\Lib\site-packages\requests\adapters.py”, line 489, in send

resp = conn.urlopen(

File “C:\ProgramData\NA-MIC\Slicer 5.2.1\lib\Python\Lib\site-packages\urllib3\connectionpool.py”, line 787, in urlopen

retries = retries.increment(

File “C:\ProgramData\NA-MIC\Slicer 5.2.1\lib\Python\Lib\site-packages\urllib3\util\retry.py”, line 592, in increment

raise MaxRetryError(_pool, url, error or ResponseError(cause))

urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host=‘zenodo.org’, port=443): Max retries exceeded with url: /record/6802342/files/Task251_TotalSegmentator_part1_organs_1139subj.zip?download=1 (Caused by NewConnectionError(‘<urllib3.connection.HTTPSConnection object at 0x0000023943A0D700>: Failed to establish a new connection: [Errno 11004] getaddrinfo failed’))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File “C:\ProgramData\NA-MIC\Slicer 5.2.1\lib\Python\Scripts\TotalSegmentator”, line 241, in

main()

File “C:\ProgramData\NA-MIC\Slicer 5.2.1\lib\Python\Scripts\TotalSegmentator”, line 200, in main

download_pretrained_weights(tid)

File “C:\ProgramData\NA-MIC\Slicer 5.2.1\lib\Python\Lib\site-packages\totalsegmentator\libs.py”, line 175, in download_pretrained_weights

download_url_and_unpack(WEIGHTS_URL, config_dir)

File “C:\ProgramData\NA-MIC\Slicer 5.2.1\lib\Python\Lib\site-packages\totalsegmentator\libs.py”, line 69, in download_url_and_unpack

raise e

File “C:\ProgramData\NA-MIC\Slicer 5.2.1\lib\Python\Lib\site-packages\totalsegmentator\libs.py”, line 55, in download_url_and_unpack

with requests.get(url, stream=True) as r:

File “C:\ProgramData\NA-MIC\Slicer 5.2.1\lib\Python\Lib\site-packages\requests\api.py”, line 73, in get

return request(“get”, url, params=params, **kwargs)

File “C:\ProgramData\NA-MIC\Slicer 5.2.1\lib\Python\Lib\site-packages\requests\api.py”, line 59, in request

return session.request(method=method, url=url, **kwargs)

File “C:\ProgramData\NA-MIC\Slicer 5.2.1\lib\Python\Lib\site-packages\requests\sessions.py”, line 587, in request

resp = self.send(prep, **send_kwargs)

File “C:\ProgramData\NA-MIC\Slicer 5.2.1\lib\Python\Lib\site-packages\requests\sessions.py”, line 701, in send

r = adapter.send(request, **kwargs)

File “C:\ProgramData\NA-MIC\Slicer 5.2.1\lib\Python\Lib\site-packages\requests\adapters.py”, line 565, in send

raise ConnectionError(e, request=request)

requests.exceptions.ConnectionError: HTTPSConnectionPool(host=‘zenodo.org’, port=443): Max retries exceeded with url: /record/6802342/files/Task251_TotalSegmentator_part1_organs_1139subj.zip?download=1 (Caused by NewConnectionError(‘<urllib3.connection.HTTPSConnection object at 0x0000023943A0D700>: Failed to establish a new connection: [Errno 11004] getaddrinfo failed’))

@wasserth
Copy link
Owner

wasserth commented Feb 9, 2023

It seems that it can not download the weights from the internet. Can you try it with a different internet connection (different WLAN network, no VPN, ...)

@zbrusher zbrusher closed this as completed Feb 9, 2023
@zbrusher
Copy link
Author

zbrusher commented Feb 9, 2023

It seems that it can not download the weights from the internet. Can you try it with a different internet connection (different WLAN network, no VPN, ...)

Yes, I have tried different WiFi and not use vpn. But I can manually download Task 251 weights file from zenodo.org

@zbrusher zbrusher reopened this Feb 10, 2023
@lassoan
Copy link
Contributor

lassoan commented Feb 17, 2023

Time to time users report problems with downloading from Zenodo. Apparently it is quite common then Zenodo gets overloaded and causes download failures. It is nice that Zenodo keeps track of download counts and it is for free, but if the problems persist then it could make sense to find other hosting solutions. Github releases can contain arbitrarily large assets, so you can store the files there. It is also possible to request Google to host these files for free, as they can be considered a high-demand public data set.

@wasserth
Copy link
Owner

Yes, download from Zenodo is a bit of a trouble sometimes, but I did not have a better alternative so far. Thanks for pointing to github releases. I will have a look at this.

@xiaoli26
Copy link

The solution is download all the weight file from the zenodo manually and paste the unzip files to the 3d_fullres folder "C:\Users\XXXX.totalsegmentator\nnunet\results\nnUNet\3d_fullres"

@wasserth
Copy link
Owner

The weights are now hosted on a faster server. (this is part of the latest master branch)

@wasserth wasserth closed this as completed Oct 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants