Operating system: Windows 10
Slicer version: latest version
I want to segment pelvic in MRI from the SMIR dataset using the MONAILABEL plugin. I have read relatively a lot about this plugin. However, I can’t perform the segmentation well enough yet.
These are the steps I take to do so:
1- connecting the server using the anaconda prompt
2- enabling the plugin in Slicer and loading one image
3- labeling the pelvis manually using the paint button in the scribbles part and the updating
4- click “submit label”
and then repeating the process for some other images while the network is being trained.
After the training process, I actually could not see anything when opening the mask files.
I also encounter these two errors:
" AssertionError: Not a valid Label "
" TypeError: object of type ‘NoneType’ has no len() "
Is it the correct way of using MONAI or am I missing something?
Which aspects should I take into account before starting the process?
I would appreciate your help and suggestions.
Thank you
Hi @Mahdis_Khodadadi, sorry I just saw this.
Can I ask you which MONAI Label app are you using (deepedit, deepgrow, or segmentation)?
Can you see the masks you’ve generated in the labels->final folder?
Can you also please share the log file (app.log) you have in the logs folder? It is easier for me to check what could happen.
I tried doing the segmentation like this:
1-labeling the image using segment editor in Slicer
2-submitting the label
3-using fore/background scribbles to edit the label and pressing the update button so training could start
it actually worked pretty fine so far. there are still some problems:
1- I can see the mask files from labels->final folder in Slicer but they are the very first labels that I submitted. Is it correct?
2- I was able to run the training for 3 images, for the 4th image, after one time fine tunning the labels using scribbles, all the values of the mask were lost and now I can’t see anything when I open the mask file of that image from labels->original folder
3- after the second problem, 3D slicer keeps not responding when I try to connect it to the server again.
1- I can see the mask files from labels->final folder in Slicer but they are the very first labels that I submitted. Is it correct?
The labels that you’ll see in labels->final are the ones you submit only.
3- after the second problem, 3D slicer keeps not responding when I try to connect it to the server again.
This might be related to the use of scribbles to fine-tune the predicted label?
Currently, scribbles functionality works best only when creating a label from scratch and not to modify/edit a predicted mask. If you’d like to modify the predicted mask, please use the smart edit in MONAI Label (clicks) or the Slicer segment editor.
My recommendations are:
1/ I see from the logs that you’re using an outdated MONAI Label. Please update the monai label version by pulling the latest changes from the GitHub repo (if working directly from the repo) or create a clean virtual env and install the monailabel-weekly (monailabel-weekly · PyPI)
2/ Use scribbles functionality only to create labels from scratch … Not to modify a predicted mask
Please let us know how that goes … I’m also happy to meet and talk more about this
thank you for your time. It was very helpful talking to you.
So, since I am working with MR images, I’ll continue using “deepedit” app.
I have a few images already manually labeled. So, I use them to train the model and after training is done, I will work on labeling the images which have no mask files.
I will update this conversation in case I face any errors.
I have unfortunately made a big mistake in this thread but I couldn’t edit it anymore.
My images are actually CT scans.
But this doesn’t make the thread unreliable I guess. Except for the fact, that with CT scans I can also use the “segmentation” app.