
No resampling to get different sizes - it turned out that the network learned slower but generalised better to unseen datasets if the data is not resampled. By this, the network is forced to learn the segmentation features in any size.

Using the grid distortion method from the library Albumentations[1]} with a probability parameter of 80 % during training. The number of distortion steps are kept to the standard value of 10. The default behaviour of this function is to distort with linear interpolation on the images and with nearest neighbour interpolation on the masks. This augmentation method increased the robustness of the model to unseen data a lot. Other augmentation methods (random zoom, rotation, shift and cropping) are tested but the combination of no resampling (c.f. first preprocessing point) and the grid distortion performed the best.

Cropping to square - to avoid distortions in subsequent resizing steps.

Center cropping - if image size is bigger than the network input shape, else resize image.

Resize to proper network size if cropping is not possible - bi-linear interpolation and anti-aliasing for the images, nearest neighbour interpolation and anti-aliasing for the masks.

Pixel value clipping - value clipping based on the .999 quantile to improve the pixel intensity distribution. Some images had outliers with pixel values near to 20.000 while 99.9 % of the pixel values are below 2000.

Normalise pixel values - min/max-normalise each image to scale the pixel values of different scanners into the same range. Scaling to zero mean and one standard deviation was also tested, but this led to worse results.

