MIC-DKFZ / nnUNet

Apache License 2.0
5.71k stars 1.73k forks source link

is crop necessary for common CT data? #889

Closed upupming closed 2 years ago

upupming commented 2 years ago

Hi there, thanks for your nice work, it helps me a lot!

I have a small question. I see this crop logic:

https://github.com/MIC-DKFZ/nnUNet/blob/96d44c2fc1ce5e18da4cd54bf52882047c37982e/nnunet/preprocessing/cropping.py#L28

And from https://github.com/MIC-DKFZ/nnUNet/issues/486 I know that the crop is mainly used for the brats/isles dataset, is that right?

Also, I have a private dataset, I found the minimum house field unit is -1000 (air) instead of 0, I think we should crop all -1000 voxels in the most outside instead of using 0, am I right?

I also found the cropped image in ordinary dataset is always just the same size of the original or just differ in few voxelx, maybe it is not very necessary in common dataset?

FabianIsensee commented 2 years ago

Hey, cropping is not at all needed for CT. In fact it is not even needed for brats etc - we just do it to not waste computation on empty areas. This can and should of course also be applied to large air spaces in CTs but unfortunately there the pixel values are not always the same so it's hard to do in a generalizable way. But you can always do this before you put the images into nnU-Net

upupming commented 2 years ago

Thanks for your explanation!