Running our models for inference
The trained models can now perform image classification with validation images. In this section, we will run several trained models.
Open the Hugging_Face_AutoTrain.ipynb
that we will use in this section to:
- Retrieve a relatively easy image and a challenging one.
- Classify the validation images.
- Analyze the difficulty of image classification.
- Investigate the configuration of the trained models.
We will begin by retrieving the validation images.
Retrieving validation images
The notebook first imports IPython for media rendering:
from IPython.display import Image #This is used for rendering images in the notebook
The first image is relatively easy to classify: generate_an_image_of_a_car_in_space.jpg
. This image, which we will now download, was classified in Chapter 16, Beyond Text: Vision Transformers in the Dawn of Revolutionary AI, by a vision transformer:
#Development access to delete...