Replies: 2 comments 3 replies
-
@D123Roy, BRATS dataset has 5 classes (including background), the error message indicated that your custom dataset has 8 channels which caused the runtime error. If you want to use this pretrained model for your 8-channel dataset, you need to modify the channel to 8. You can refer to this link for more details on transfer learning. |
Beta Was this translation helpful? Give feedback.
-
Hi @D123Roy , looking at the logs, it seems the way for loading the input data has some errors. No sure, but I guess the way of concatenation might be wrong in your case, since the input data should be 4 channels per data, showing 8 probably means you are concatenating two images in the second channel instead of the batch channel. The tutorial should has 4 channels as input, not sure why 5 is required in your case, you could try double check this code section when defining network:
In addition, for loading your own pretrained model, there should be no problem based on your description, you could see there are model downloading process when you are starting MONAI label server, to double confirm, you can check whether your code can load the different path/filename or you can just replace the downloaded model with your own. Hope these helps. BTW, it's better to discuss the Slicer and MONAI Label issues in the MONAI Label repo here: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I am working with a pre-trained model (trained on a custom dataset) for interactive segmentation. I am using 3D Slicer for the interactive segment purpose.-
I developed a pre-trained weights file (.pth) by training with the following link - https://colab.research.google.com/github/Project-MONAI/tutorials/blob/main/3d_segmentation/brats_segmentation_3d.ipynb#scrollTo=Wv2UxnI2gc-K
On adding the path of the file to deepedit.py file in Slicer apps -> lib -> config folder, and then running the model the error is -
Run time error :
Given groups=1,weight of size[32,5,3,3,3], expected input[1,8,128,128,128] to have 5 channels, but got 8 channels instead.
I am clueless. Kindly help
Beta Was this translation helpful? Give feedback.
All reactions