MIC-DKFZ / nnUNet

Apache License 2.0
5.79k stars 1.74k forks source link

About 2D images #1920

Closed tensorctn closed 7 months ago

tensorctn commented 9 months ago

There is a problem, nnunet's preprocessing are on the 3D image processing, because itself is born for 3D medical images, so the 2D image preprocessing is how to carry out or inside what is a logical pipeline, look at the previous 2D mode png what format does not support to be converted into nii.gz, and now the V2 version of the support is able to directly input the png format. png format, I tried to really train, how he actually realized support is not too clear, only know that the previous 2D into pseudo-3D plus an axis, but add this axis to do 3D that set of pre-processing and feel very strange, do not know the physical meaning, inside the specific pre-processing of those who feel like a black box, before running my 2D data only with U-net found that the effect is not so good, nnunet effect is much better so I want to know what happened in the 2D image in the end inside.Before the U-net I only normalize the data, the effect is not good, I thought it should be the dataset itself is not good preprocessing, tuning parameter is not adjusted, hyper-parameters do not fit my dataset, so I thought to use nnunet, automatically go to the dataset according to the selection of hyper-parameters and preprocessing, I know that the effect of the nnunet is good may be more than the Unet put the tuning of parameter this thing is done well, so I would like to know if the input is 2D, he is in the end how to automatically adjust the selection, because I read the source code of the preprocessing found that most of the processing of three-dimensional data, there are assert data dimensions must be a 3D map!

tensorctn commented 9 months ago

To summarize if it's a 2D image, what's his point of improvement over a regular U-net and how is it implemented?

FabianIsensee commented 9 months ago

Hey, nnU-Net is just a U-Net that automatically takes care of a lot of stuff, such as selecting a patch size and batch size and building a network topology (how many stages, how often do we pool) to fit that. nnU-net uses pretty robust data augmentation as well which I believe substantially contributes to its performance. What exactly makes it perform better or worse than your U-Net implementation I don't know. There is many factors at play that determine how well the training works. If you have specific questions about nnU-Net's hyperparameters I am happy to elucidate them. Don't get confused about the addition of a dimension. This is only done to keep things consistent. After preprocessing, the 2D images will have a shape of (C, 1, H, W) but during training the 1 is removed so that they are (C, H, W) again. Best, Fabian

FabianIsensee commented 8 months ago

Did that answer your question?

tensorctn commented 5 months ago

Thank you very much for your patient explanation.