How to set MONAI Label extension parameters in 3D Slicer

Hello. All members of 3D-Slicer.

I have a question for setting option of MONAI Label extension.
.
I want to extract brain tumor using a DICOM(MRI) file in MONAI Label module.

When I conducted modeling in MONAI Label, The proess that extracts brain tumor using MONAI Label module in 3D-Slicer as follows.

  1. In the option of MONAI Label server, I pressed green button.
  2. In the option of Master Volume, I pressed ‘arrow’ green button.
  3. In the option of Segment Editor, I added two segment, and then I extract brain tumor using ,Paint’ and ‘Grow and Seeds’ effect,
  4. At the bottom of Strategy option, I pressed the “Submit Label” button.
  5. After selecting ‘deepedit’ model, I pressed ‘Train’ button.

But, I occur some problem after conducting above process.

When I press ‘Train’ buttion, after selecting ‘segmentation’ model, Status option run. But Accuracy option didn’t run.

What should I do for extractiong brain tumor in MONAI Label module using a DICOM(MRI) file based on 3D-Slicer.

There is a new and instructive MONAI Label Training From Scratch video available on YouTube that shows all the necessary training steps for a lung segmentation model. The workflow for brain tumors should be very similar.

Please notify us if questions remain.

1 Like

Dear. @rbumm

I tried to extract brain tumor referring for link that you had been shared.

I want to automatically extract brain tumor using MONAI Label with DICOM file of one patient. So I can’t let me train this DICOM file because I have only one DICOM dataset.

I conducted extraction process of brain tumor using MONAI Label in 3D-Slicer refering for share link as follows.

  1. I conducted MONAI Label server pressing ’green button’ next to MONAI Label server item.

  2. I also created Master Volume after pressing ’green allow button’.

  3. I extracted brain tumor using ’Paint’ effect and ‘Grow from Seeds’ effect in Segment Editor option.

  4. I pressed ’Submit Label’ button.

  5. I selected segmentation in ‘model’ part that is under ‘Submit Label’ button, and then pressed ‘train’ button.

Is that all?

Some brain tumor is hard to extract in NVIDIA AIAA module, so I want to exactly extract brain tumor using MONAI Label module.

When I conducted as process above, I thought I would rather use only Grow from Seed effect in segment editor module than use Segment editor(Grow from Seeds) option in MONAI Label module.

What I want to exactly is as follows.

  1. I want to exactly extract brain tumor that is hard to extract in NVIDIA AIAA module using Auto-Segmentation or other method(AI-Assisted Annotation) in MONAI Label.

  2. Additionally, I want to find the solution that select ‘model’ type. I don’t know how to appear ‘model’ type in ‘Auto Segmentation’ and ‘SmartEdit/Deepgrow’ option.
    image

Please, let me know how to solve the problems above.

Thank you for reading my writing.

Dear @platanus,

Please run your NVIDIA Control Panel, go → help and ->system information and post the results here.

Thank you.

1 Like

Thank you for answering @rbumm

System Information is as following.

NVIDIA System Information Report Generation Date: 07/29/2022 08:40:50
System Name: KRK

[display]
Operating System: Windows 10 Home, 64-bit
DirectX Version: 12.0
GPU Processor: NVIDIA GeForce RTX 3070 Laptop GPU
Driver Version: 471.51
Driver Type: DCH
Direct3D feature level: 12_1
CUDA Core: 5120
Resizable BAR Yes
Max-Q technology 3rd generation
Dynamic Boost 2.0 Yes
WhisperMode 2.0 Yes
Advanced Optimus No
Maximum graphics performance 100 W
Core clock: 1290 MHz
Memory data rate: 12.00 Gbps
Memory interface: 256-bit
Memory bandwidth: 384.06 GB/s
Total available graphics memory: 16079 MB
Dedicated video memory: 8192 MB GDDR6
System video memory: 0 MB
Shared system memory: 7887 MB
Video BIOS Version: 94.04.4F.00.19
IRQ: Not used
Bus: PCI Express x8 Gen3
Device Id: 10DE 249D 20141A58
Part number: 4735 0010

[Component]

nvui.dll 8.17.14.7151 NVIDIA User Experience Driver Component
nvxdplcy.dll 8.17.14.7151 NVIDIA User Experience Driver Component
nvxdbat.dll 8.17.14.7151 NVIDIA User Experience Driver Component
nvxdapix.dll 8.17.14.7151 NVIDIA User Experience Driver Component
NVCPL.DLL 8.17.14.7151 NVIDIA User Experience Driver Component
nvCplUIR.dll 8.1.940.0 NVIDIA Control Panel
nvCplUI.exe 8.1.940.0 NVIDIA Control Panel
nvWSSR.dll 30.0.14.7151 NVIDIA Workstation Server
nvWSS.dll 30.0.14.7151 NVIDIA Workstation Server
nvViTvSR.dll 30.0.14.7151 NVIDIA Video Server
nvViTvS.dll 30.0.14.7151 NVIDIA Video Server
nvLicensingS.dll 6.14.14.7151 NVIDIA Licensing Server
nvDispSR.dll 30.0.14.7151 NVIDIA Display Server
nvDispS.dll 30.0.14.7151 NVIDIA Display Server
nvDevToolSR.dll 30.0.14.7151 NVIDIA Licensing Server
nvDevToolS.dll 30.0.14.7151 NVIDIA 3D Settings Server
PhysX 09.20.0221 NVIDIA PhysX
NVCUDA64.DLL 30.0.14.7151 NVIDIA CUDA 11.4.101 driver
nvGameSR.dll 30.0.14.7151 NVIDIA 3D Settings Server
nvGameS.dll 30.0.14.7151 NVIDIA 3D Settings Server

This seems to be great hardware to use MonaiLabel.

To address some of the questions above:

Question: Why does nothing show up under “Auto Segmentation” after you connected to ML server and trained?
Answer: There was a recent issue/bug when using 3D Slicer 5.0.2 and the MonaiLabel extension.

(1) please make sure that you use 3D Slicer 5.0.3 stable for your next tests.
(2) Start 3D Slicer 5.0.3 stable and install the MonaiLabel extension again.
(3) Restart Slicer.

Please report back if that does not solve your problem.

Question:

Answer:
You will need to train a machine learning model with many labeled volumes to have acceptable results. At least 3-5 different volumes (patients) are needed, you would need to label them one by one, then start the MonaiLabel training process.
If you want to do your brain tumor segmentation on one dataset only I would recommend using 3D Slicers Segment Editor - no need to involve AI

1 Like

Thank you for answering details. @rbumm

Now, I’m using 3D-Slicer 5.1.2 preview version.

Should I install 5.0.3 stable version for using Auto Segmentation in MONAI Label?

Anyway… As you let me know above, I installed 3D-Slicer 5.0.3 stable version. After reopening 3D-Slicer, I tried to extract brain tumor using MONAI Label.

The reason that I try to run Auto Segmentation in MONAI Label is because I’d like to exactly extract brain tumor in one volume using AI-Assisted Annotation.

Brain tumor can exactly extract in one volume using Grow from Seeds effect in Segment Editor module and NVIDIA AIAA. But there is brain tumor hard to extract in one volume using Segment Editor and NVIDIA AIAA modules.

I didn’t solve problem as following yet.
#1
Although you recommended that I need to use Segment Editor of 3D-Slicer when I use only one volume, I’d like to run using Auto-Segmentation(Inference mode) or SmartEdit/Deepgrow options(Inference mode) in MONAI Label.
Please, let me know how to extract brain tumor using Auto-Segmentation and SmartEdit/Deepgrow in MONAI Label module.

#2
I installed 3D-Slicer 5.0.3 version and ran MONAI Label module after reopening 3D-Slicer, but it doesn’t show up nothing in ‘Model’ item, ‘run’ button, ‘Label’ item and ‘Update’ button of Auto-Segmentation option and SmartEdit/Deepgrow option in MONAI Label module.
And I have question regarding run of MONAI Label server for extracting brain tumor.

#3
When I run MONAI server, I input command “monailabel start_server --app apps/radiology --studies datasets/Task02_57453299_VS --conf models deepedit”.
Is it right to do this?

Thank you for always helping me.

Please understand that for using auto-segmentation there are only two options here.

(1) You will need somebody who provides a working MonaiLabel brain tumor segmentation model to you. I (probably we) can not help here yet.

or

(2) you would need to train a MonaiLabel model yourself using many brain tumor volumes (50-100 patients minimum) with a steep learning curve and unclear outcome. I would not recommend you to do this for your special problem. Use Slicers conventional segment editor for the task and wait for a MonaiLabel brain tumor segmentation model to be published in the near future.

Of course, in the meantime, you can experiment with MonaiLabel.

Did you start the server first ?

The command line looks ok, where did you get the Task02_57453299_VS parameter from, and what happens if you issue that command? Please post a screenshot of the result or the output of the command.

Yon mean that It is not easy for me to run Auto Segmentation in MONAI Label based on 3D-Slicer.

Task02_57453299_VS is a folder included one volume(DICOM file).

When I input command “monailabel start_server --app apps/radiology --studies datasets/Task02_57453299_VS --conf models deepedit”, it occurrs result as following.

MonaiLabel will not read your DICOM data directly from a folder.

Enter the following command:

monailabel datasets

and you will get something like:

Using PYTHONPATH=C:\Users\yourname\MONAILabel;
Available Datasets are:
----------------------------------------------------
  Task01_BrainTumour            : https://msd-for-monai.s3-us-west-2.amazonaws.com/Task01_BrainTumour.tar
  Task02_Heart                  : https://msd-for-monai.s3-us-west-2.amazonaws.com/Task02_Heart.tar
  Task03_Liver                  : https://msd-for-monai.s3-us-west-2.amazonaws.com/Task03_Liver.tar
  Task04_Hippocampus            : https://msd-for-monai.s3-us-west-2.amazonaws.com/Task04_Hippocampus.tar
  Task05_Prostate               : https://msd-for-monai.s3-us-west-2.amazonaws.com/Task05_Prostate.tar
  Task06_Lung                   : https://msd-for-monai.s3-us-west-2.amazonaws.com/Task06_Lung.tar
  Task07_Pancreas               : https://msd-for-monai.s3-us-west-2.amazonaws.com/Task07_Pancreas.tar
  Task08_HepaticVessel          : https://msd-for-monai.s3-us-west-2.amazonaws.com/Task08_HepaticVessel.tar
  Task09_Spleen                 : https://msd-for-monai.s3-us-west-2.amazonaws.com/Task09_Spleen.tar
  Task10_Colon                  : https://msd-for-monai.s3-us-west-2.amazonaws.com/Task10_Colon.tar 

Then download the Task01_BrainTumor dataset with:

monailabel datasets --download --name Task01_BrainTumour --output datasets

This will download the mentioned dataset to your harddrive.

Then you could run

monailabel start_server --app apps/radiology --studies datasets/Task01_BrainTumour --conf models deepedit 

Start 3D Slicer, connect to MonaiLabel in the extension,
just press the green button:
image
and your fields will be populated. Press “Next Sample” to load the first volume.

Please do all this and report back. You should see one of the brain tumor volumes from the Task01 dataset in 3D Slicer. It is not your volume. It is one of the downloaded series.

@rbumm Thank you for answering my question.

I simply wanted to compare brain tumor extraction results using Segment Editor(Grow from Seeds) and NVIDIA AIAA using clinical DICOM data as shown in the figure below.

So I first extracted the brain tumor using NVIDIA AIAA. However, there was a brain tumor that NVIDIA could not extract, so I posted a question on the 3D-Slicer Forum.

When I extract brain tumor using Segment Editor(Grow from Seeds), brain tumor extracts well.
but I should compare Segment Editor and NVIDIA AIAA(other AIAA).

First image is to use option of Auto-Segmentation in NVIDIA AIAA.

Second image is to use option of Segment from boundary point(DExtr3D).

@pieper mentioned MONAI Label to solve my problem.

So, I had tried to run MONAI Label for extracting brain tumor.

Although you have helped a lot, it is not easy to extract brain tumor of the figure above using MONAI Label.

I don’t have to use the MONAI Label to extract brain tumor.

I should extract brain tumor using AIAA method such as pre-trained Auto Segmentation or Segment from boundary point(DExtr3D) included in NVIDIA AIAA.

If brain tumor of above figure don’t extract using pre-trained Auto Segmentation or DeeEdit/DeepGrow included in MONAI Label, can you suggest alterative other AIAA method?

I should compare Segment Editor module and NVIDIA AIAA(or other AIAA) module after extracting brain tumor of figure above.

No, I can not suggest an alternate AIAA method.

Thank you for helping me @rbumm.