How to start with monailabel for new models

Thanks, @mikebind.

My reply inline:

Also, despite the ‘use_pretrained_model false’, inference seems to be using a pretrained model (I get a spleen segmentation when I press Next Sample, which must be coming from a pretrained model).

This could be because there is a .pt file downloaded in the model folder. Please make sure there is nothing in there.

I tried the ‘heuristic_planner true’ option because it sounded like this would choose an appropriate image grid size/spacing to use for training, based on the available GPU memory.

That’s right. It selects the image size based on the available GPU. From what you’ve shared, the actual available GPU is 2100 MB:

Available GPU memory: {0: 2100} in MB

I see the default spatial size is [48,48,32], which makes me wonder if [1,1,256], presumably generated by the heuristics planner, is reasonable.

Yes, [1, 1, 256] is what the heuristic planner recommends. However, this spatial size isn’t reasonable :confused:

I have an NVIDIA GeForce GTX 1050 Ti with Max-Q with 4 GB of memory on the GPU. If this is far too low specs for a segmentation problem like this, what would be a reasonable size down-sampled image volume I could try which would be able to run?

As I mentioned before, the actual GPU memory available is 2100 MB. MONAI Label could train a model with a minimum ~3200 MB of memory and on an image size of [64, 64, 32]. However, this size could be too small for some segmentation tasks.

Then, my suggestion is to try the Segmentation model instead. Different to DeepEdit model, the Segmentation model works on patches instead of the whole volume.

For the Segmentation model, you should first update the label name here, change these values to (32, 32, 32) and then run the following command:

monailabel start_server --app apps/radiology --studies datasets/liver_test_from_scratch/ --conf models segmentation --conf use_pretrained_model false

Hope the patch size fits into 2100 MB. You could also try reducing the network size here

Please keep us posted.

2 Likes