Project - Image Classification with Pre-trained Keras models

5 / 6

Loading the Image

Let us load the image we want to classify using this model.

  • Mention the path to load the image we want to classify using the model.

    img_path = '/cxldata/dlcourse/lion.jpg'
  • Resnet50 needs inputs of size (224, 224). So load the image using image.load_img, pass the img_path and target_size=(224, 224) as the input arguments.

    img = << your code comes here >>(img_path, target_size=(224, 224))
  • Now let us view the image we loaded. We shall convert the img to numpy array and display it using plt.imshow.

    << your code comes here >>(np.asarray(img))
See Answer

No hints are availble for this assesment

Note - Having trouble with the assessment engine? Follow the steps listed here

Loading comments...