nnUNet icon indicating copy to clipboard operation
nnUNet copied to clipboard

Issues with stack of 3 or 4 frames

Open Li-En-Good opened this issue 1 year ago • 2 comments

Hi,

There is an issue when trying to train/predict with 3 or 4 frames. Training is extremely slow. Looks to me like it originates from SimpleITK? I think the axis was messed up and might need to be transposed by (2,0,1) Could you please guide me on how to fix it? Thanks!

Li-En-Good avatar May 24 '23 16:05 Li-En-Good

Hey, could you please provide more information? What do you mean by 3 or 4 frames? cases/images? channels? What brings you to the conclusion that it might originate form SimpleITK and a problem with transposing exists? I couldn't quite follow this. Best, Ole

dojoh avatar Aug 03 '23 09:08 dojoh

3 or 4 frames on the z dimension. Because the output would be (3,512,512) when the input is (512,512,3). I tried changing SimpleITK in the data loader to Nibabel and it worked fine for stacks with 3 or 4 frames. Also tried reshaping it using the below code: if img.shape[2] == 3 or img.shape[2] == 4: img = np.transpose(img, (2, 0, 1)) Even if the shape of input is fixed, there are some components during training that still aren't compatible with 3 or 4 frames. I will get extremely long training time (~10x the normal time) using image stacks with 3 or 4 frames and the results are much worst and lack continuity on the x axis. Hope that's clear enough. Thanks.

Li-En-Good avatar Aug 04 '23 03:08 Li-En-Good