2

What does keras.preprocessing.image.load_img do during image resizing?

In the following statement, target size is set to 128x128.

image1 = img_to_array(image.load_img(img, target_size=(128,128))) / 255

What if I load 100x100 size image?

Will it leave the image as it is or will it zoom to 128x128 size?

Emma
  • 1
  • 9
  • 28
  • 53
PCG
  • 784
  • 13
  • 27

1 Answers1

0

It will actually resize it to the target size!

If the image size is smaller than the target size it will be stretched to fit the desired size.