I have (5000, 32, 32, 3) as numpy.ndarray.
(number of images:5000, image size: (32x32), channel: 3)
I want to resize the image (32x32) to (28x28). How can I do this?
I have (5000, 32, 32, 3) as numpy.ndarray.
(number of images:5000, image size: (32x32), channel: 3)
I want to resize the image (32x32) to (28x28). How can I do this?
I would use scipy.ndimage.zoom().
Something like:
import scipy.ndimage
factor = 28.0 / 32.0
scipy.ndimage.zoom(input_array, (1, factor, factor, 1))
zoom would indeed be a good idea.