It is critically important that the scans you are predicting have the same axis ordering than nnU-Net. What I mean by this is that when you open up the images with sitk or nibabel and export the numpy arrays, the axes need to match (for example the first coordinate should always be axial slices, so a[12] is the axial slice id 12). If they don't the performance can degrade a lot. I did run into this issue myself when I was applying KiTS to some internal CT data.
Thanks for your reply in the above issue 277, I have a more detailed question concerning with this issue.
You said you also had the axis ordering mismatch problem while apply KiTS model to other dataset, I am wondering:
how did you fix it, that is, how to revise the code in preprocessing data?
I got the solution by referring to here, It can be illustrated with one line of code:
canonical_img = nib.as_closest_canonical(img),
but it turned out not working, could you share me with your solution?
Originally posted by @FabianIsensee in https://github.com/MIC-DKFZ/nnUNet/issues/277#issuecomment-663984088
Hi, @FabianIsensee
Thanks for your reply in the above issue 277, I have a more detailed question concerning with this issue.
You said you also had the axis ordering mismatch problem while apply KiTS model to other dataset, I am wondering:
canonical_img = nib.as_closest_canonical(img)
, but it turned out not working, could you share me with your solution?Thank you very much~