Validation set
The images in the validation set were created by Stable Diffusion and Midjourney and were submitted to several vision models in Chapter 18, Hugging Face AutoTrain: Training Vision Models without Coding. In a real-life project, such a dataset must contain many images of many types. This chapter limits the scope to a few images to explore methods to solve a complex problem with a unit test.
Level 1 image: easy
The first image is the level 1, easy image:
!curl -L https://raw.githubusercontent.com/Denis2054/Transformers_3rd_Edition/master/Chapter16/generate_an_image_of_a_car_in_space.jpg --output "generate_an_image_of_a_car_in_space.jpg"
Let’s display it to have it in mind for the rest of the chapter:
from PIL import Image
# Define the path of your image
image_path = "/content/generate_an_image_of_a_car_in_space.jpg"
# Open the image
image = Image.open(image_path)
image
The output shows a white car on a black background...