添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
还单身的上铺  ·  MONAILabel cannot ...·  2 小时前    · 
大力的围巾  ·  Error: Variable is ...·  5 小时前    · 
眼睛小的青蛙  ·  Maven 101 - Basics·  19 小时前    · 
酒量小的水煮鱼  ·  Need Help On Complete ...·  19 小时前    · 
任性的数据线  ·  Maven for sharing Jar ...·  19 小时前    · 
重感情的手术刀  ·  养不起 累不起 ...·  3 周前    · 
私奔的山楂  ·  Bar Graphs in Stata·  1 月前    · 
风流的板凳  ·  Docker server not ...·  2 月前    · 

Hello,
I have tried running the MONAILabel module but keep getting a connection refused error.

At first, I suspected the firewall to be the reason and allowed the slicer.exe app through the window firewall on the control panel.

However, it still did not work.

So next thing I checked was the port number.

I found out that the default server was serving at http://127.0.0.1:8000/ .

When I checked my computer with the command below, port number 8000 did not exist.

netstat -an|findstr 8000

So I am wondering not having the port can be the reason for this error and how to solve it.

Thank you always for your help.

When I start MONAILabel server I see something like this:

root@perklabseg:/opt/monai# monailabel start_server --app /opt/monai/MONAILabel/apps/radiology --studies /opt/monai/MONAILabel/datasets/Task09_Spleen/imagesTr --conf models deepedit --port 9005 --host 127.0.0.1
Using PYTHONPATH=/opt:
[2022-06-24 12:29:09,732] [387] [MainThread] [INFO] (__main__:292) - USING:: app = /opt/monai/MONAILabel/apps/radiology
[2022-06-24 12:29:09,732] [387] [MainThread] [INFO] (__main__:292) - USING:: studies = /opt/monai/MONAILabel/datasets/Task09_Spleen/imagesTr
[2022-06-24 12:29:09,732] [387] [MainThread] [INFO] (__main__:292) - USING:: verbose = INFO
[2022-06-24 12:29:09,732] [387] [MainThread] [INFO] (__main__:292) - USING:: conf = [['models', 'deepedit']]
[2022-06-24 12:29:09,732] [387] [MainThread] [INFO] (__main__:292) - USING:: host = 127.0.0.1
[2022-06-24 12:29:09,732] [387] [MainThread] [INFO] (__main__:292) - USING:: port = 9005
[2022-06-24 12:29:09,732] [387] [MainThread] [INFO] (__main__:292) - USING:: uvicorn_app = monailabel.app:app
[2022-06-24 12:29:10,649] [387] [MainThread] [INFO] (uvicorn.error:59) - Application startup complete.
[2022-06-24 12:29:10,649] [387] [MainThread] [INFO] (uvicorn.error:206) - Uvicorn running on http://127.0.0.1:9005 (Press CTRL+C to quit)

After this, if I open the server URL in a web browser, I see this:

image2099×1276 229 KB

Do you see something similar on your computer?

Thank you, Lassoan, for your response!
Sadly, I do not see any message on my python interactor after loading the MONAILabel module.

Confirming the server URL for the TOMAAT also gives an error message as below, and I wonder if this is due to the same reason.

USING HOST IN DIRECT CONNECTION PANE
Execute GET by global HTTPS CERT system
Starting new HTTPS connection (1): localhost
Execute GET UNSAFE
Starting new HTTPS connection (1): localhost
Host is not reachable! (https://localhost:9000/interface)

hourglassnam:

Sadly, I do not see any message on my python interactor after loading the MONAILabel module.

Installing MONAILabel module is not sufficient. You also need to configure and start a MONAILabel server (outside Slicer).

Thank you Lassoan for your reply!
After your feedback, I went to GitHub link and tried to install the monailabel on my computer using window cmd.
I was able to install the monailabel-weekly outside the slicer. However, an error message pops up when I try to move to the next step.
Following is the script I tried to run and the error message I get.
Sorry for bothering you again, but could you please give me some advice?
Thank you always for your help.

monailabel --help
monailabel apps --download --name radiology --output apps
monailabel datasets --download --name Task09_Spleen --output datasets

#returned error message
‘monailabel’ is not recognized as an internal or external command, operable program or batch file

hourglassnam:

‘monailabel’ is not recognized as an internal or external command, operable program or batch file

This means monailabel has not been installed (or at least not correctly installed and executable is not on the path).

Did you follow the instructions to install MonaiLabel? Which method did you use?

Hello, @muratmaga!

Thank you for your reply.

Yes, I have followed the instruction you linked.

Here are my steps:

  • opened Window cmd
  • Install the following Python libraries
  • used command “pip install monailabel-weekly”
  • checked if the installed package “pip list”
  • monai and monailabel-weekly(0.4.dev2226) were on the list
  • I uninstalled the package and tried it again on the Anaconda Powershell Powershell Prompt (Anaconda3) but it gives me following message.

    (base) PS C:\Windows\system32> monailabel --help

    Using PYTHONPATH=C:\ProgramData;

    OMP: Error #15: Initializing libiomp5md.dll, but found libiomp5md.dll already initialized.

    OMP: Hint This means that multiple copies of the OpenMP runtime have been linked into the program. That is dangerous, since it can degrade performance or cause incorrect results. The best thing to do is to ensure that only a single OpenMP runtime is linked into the process, e.g. by avoiding static linking of the OpenMP runtime in any library. As an unsafe, unsupported, undocumented workaround you can set the environment variable KMP_DUPLICATE_LIB_OK=TRUE to allow the program to continue to execute, but that may cause crashes or silently produce incorrect results. For more information, please see http://www.intel.com/software/products/support/.

    I don’t have experience running MonaiLabel through the python environment, I only used it through docker which simplified things quite a bit.

    Perhaps you can take a look at @rbumm explanations here:

    Thank you guys for all the help!!

    @rbumm, I was able to make the monailabel work with the Google doc you provided! I can’t even express how grateful I am for your help!
    I think the problem was that I was at my system32 directory, not the user directory.

    Also, I tried running the monailabel with docker, which was much more straightforward, just like @muratmaga have mentioned! Thank you!

    @muratmaga could you maybe add a few points about how you installed MONAI Label through docker exactly? Thank you.
    ping @diazandr3s

    This is a good point.

    I’ve mostly used Docker on Linux, but it should also work on Windows.

    The first step is to make sure nvidia docker is installed on the computer. Then, by running this command you should be able to start the docker container with MONAI Label installed:

    docker run --gpus all --rm -ti --ipc=host --net=host projectmonai/monailabel:latest bash

    Here I show the ways of installing MONAI Label: MONAI Label Installation - PyPi, Docker, and GitHub - YouTube

    rbumm:

    @muratmaga could you maybe add a few points about how you installed MONAI Label through docker exactly? Thank you.

    Happy to, but can I edit that link?

    @lassoan could you maybe enable @muratmaga for editing the 37th Project Week MONAIL Label installation GitHub document? Thank you
    @muratmaga feel free to add your name at the top :slight_smile: