Project - Image Classification with Pre-trained Keras models

4 / 6

Getting the Model and Pre-trained Weights

We need to include models and processing packages that are specific to that model.

INSTRUCTIONS
  • Import image from tensorflow.keras.preprocessing.

    from << your code comes here >> import << your code comes here >>
    
  • Import ResNet50 as myModel from tensorflow.keras.applications.resnet50.

    from tensorflow.keras.applications.resnet50 import << your code comes here >> as << your code comes here >>
    
  • Import preprocess_input, decode_predictions from tensorflow.keras.applications.resnet50.

    from tensorflow.keras.applications.resnet50 import << your code comes here >>
    
  • Now get the model model and include the weights of "imagenet" data classification task. We will be using this trained network to predict the class of our desired image.

    model = myModel(weights="imagenet")
    

Note- If you face Unable to open file error while loading the model, refer to Input/Output Error(Error no. 5).

Get Hint See Answer


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

Loading comments...