Dataset prediction submiting


#1

Hellow, I want to ask a question of the final prediction submiting. Which size of the prediction can we submite? For the image size is too large to train the model,we must resize the image to smaller. So we get the final prediction is smaller than the original image. Can we submite the small size result?


#2

Answered here

No, you’ll have to transform your predictions to the original size of the data. Something like bi/trilinear interpolation would probably work just fine for this.


#3

OK. Thanks for your replying.


#4

Beware with resampling segmentations! Segmentation maps (that contain 0, 1, 2) cannot just be resampled. That will cause interpolation artifacts unless you use nearest neighbor. For segmentations you need to first convert the segmentation map into one hot encodings, then resample those and finally merge them back together. We provide a utility that does exactly this in out batchgenerators framework:

from batchgenerators.augmentations.utils import resize_segmentation

You can get it here: https://github.com/MIC-DKFZ/batchgenerators

You give it your segmentation map (that contains integer numbers as in the ground truth), the new shape and you specify what the order of interpolation is (0=NN, 1=linear, 2=cubic, 3=spline). I recommend order=0 or order=1.

Best,
Fabian


#5

Thank you very much for your advice.I’ll give it a try.