-
I was reading SWIN UNETR code and was confused by the dimension order used in the model. For BTCV dataset, the preprocessing method used in SWIN UNETR are similiar to UNETR ,which include: The dimension order of the image after using these transforms seems to be However, in the MONAI/monai/networks/blocks/patchembedding.py Lines 122 to 180 in 456caed This confused me a lot. Is there any procedure changed the dimension order that I did't notice or something else? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
In my understanding as long as the model is consistently used in training and inference, there's no need to distinguish the first/second/third spatial dimensions, these d, h, w are just variable names. the only problem I can see is that if after some training, the model is used together with a different preprocessing pipeline built outside of monai. in this case the pipeline should be created carefully so that it consistently reproduces the training ones. |
Beta Was this translation helpful? Give feedback.
In my understanding as long as the model is consistently used in training and inference, there's no need to distinguish the first/second/third spatial dimensions, these d, h, w are just variable names. the only problem I can see is that if after some training, the model is used together with a different preprocessing pipeline built outside of monai. in this case the pipeline should be created carefully so that it consistently reproduces the training ones.