I am dealing with a dataset that is being loaded as a numpy.ndarray datatype. I want to resize the loaded images from 1X190x200 to 1X256X256 using transforms.Resize(256).
The problem is that this transform only accepts PIL images and not ndarray. I have tried using “functional.to_pil_image( image )”, but I get the following error:
Input type float64 is not supported
(this error appears even when the I duplicate the channels so that the input image is 3x190x200).
Using np.uint8(image) completely destroys the image, and I don’t want to change the datatype to float32.
Is there any way to get around this problem and to resize an ndarray?
Thanks!