I want to resize a labeled segmentation mask specifically with nearest neighbor interpolation.
scikit-image has two relevant functions: resize and rescale
But neither of these functions allow you to specify the interpolation method.
It is very important to use 'nearest neighbor' interpolation when resizing segmentation masks.
Does anyone know how to do this with scikit-image
or scipy
or even some other package that can be easily pip installed. I know how to do this in opencv but it cannot be pip installed on all platforms.