Hi, I am working on medical image segmentation application where I need to rotate the masks during augmentation. I observed the ops.Rotate operation deteriorates the pixel values near the borders and so I ended up having more labels than the ones in ground-truth image. This issue is also prevalent in other image processing libraries except for Rotate function from PIL library.
In case of mask augmentation I would recommend to use NN (nearest neighbor) interpolation strategy first so you won't get any value outside of the image pixel values.
:+1: for dali.types.INTERP_NN (te default is linear).
Also, keep in mind that the default border handling is equivalent to OpenCV BORDER_REPLICATE. If you want to pad with zeros, set fill_value=0.
Yeah I padded the border with background with fill_value, thanks.