DynUNet Deep Supervision -- missing code/transforms #7747
-
Hello, this is my first time asking a question here. I am also somewhat new to programming in MONAI, so I may not know as much as to be normally expected here. My lab is using a script that focused on Dynunet and Segresnet. We would like to try Dynunet with deep supervision turned on to see if it can increase the DSC score of an automatic segmentation program we are working on. The problem is, we keep getting a tensor size error: the number of dimensions for input and target should be the same, got shape torch.Size([16, 2, 2, 96, 96, 96]) and torch.Size([16, 1, 96, 96, 96]). The program works fine with Dynunet without deep supervision, so we are probably missing a transform or definition. I suspect we are missing the code in trainer.py, since it seems to be for deep supervision in particular. Before changing anything in the script (which was written before I was hired, so I was not a part of that process), I would like to know if the trainer.py script has what our script is missing, and if you all have any ideas what we could also be missing. Thank you for your time. ps. I looked on google for discussions regarding anything similar to my question on Dynunet deep supervision. The only question that was remotely like mine had an answer that pointed to trainer.py. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @HendricksAlex, thanks for your interest here. Please refer to the tutorial here which included how to generate data and build a whole pipeline. Hope it helps, thanks! |
Beta Was this translation helpful? Give feedback.
Hi @HendricksAlex, thanks for your interest here.
Please refer to the tutorial here which included how to generate data and build a whole pipeline.
https://github.com/Project-MONAI/tutorials/tree/main/modules/dynunet_pipeline
Hope it helps, thanks!