Test multiple images with "Build your First Multi-Label Image ...."

Hi! I’m using the tutorial from PULKIT SHARMA, to predict the roof material from some aerial imagery, but I have a problem with loading multiple images to the model, I’ don’t know a proper method to do it; I’m using the code that Pulkit uses to create the array of test images, but when I’m try to run the model with the test array, an error occurs, and I’m stuck, could you help me to solve this problem?

test_image = “

for i in tqdm(range(test_df.shape[0])):
img = image.load_img(‘images_test/’+test_df[‘id’][i]+’.tif’,target_size=(200,200,3))
img = image.img_to_array(img)
img = img/255
X = np.array(test_image)


Error shows problem with


because imshow can display only one image with size (height, width, colors) but you use array X with many images. You would have to display every image separatelly.

© Copyright 2013-2019 Analytics Vidhya