MIC-DKFZ / nnUNet

Apache License 2.0
5.57k stars 1.7k forks source link

Convert labels from float64 to Int #2029

Open Cestovatels opened 5 months ago

Cestovatels commented 5 months ago

Hello.

The labels I train with are float64 type. If I convert them to int and do the training again with this data, will there be a gain in prediction and saving time? Will this decrease the training success?

Thank you for your answers. @FabianIsensee

CodeHarcourt commented 5 months ago

I try to train the BraTS 2020 Dataset in this model. And when I use the native dataset to train the model. There is a problem which is the tensor is float 64, not int. And then I successfully changed the datatype to int. But the train_loss and val_loss were synchronous ascent. Can you give me some advice?

dojoh commented 4 months ago

just to make sure, you are still talking about labels for segmentation? nnU-Net will use its own data format internally for performance reasons. Thus, I do not believe that this makes much of a difference.

Segmentations must share the same geometry with their corresponding images (same shape etc.). Segmentations are integer maps with each value representing a semantic class. The background must be 0. If there is no background, then do not use the label 0 for something else! Integer values of your semantic classes must be consecutive (0, 1, 2, 3, ...). Of course, not all labels have to be present in each training case. Segmentations are saved as {CASE_IDENTIFER}.{FILE_ENDING} .