.
random.sample(os.listdir(target_folder), 1) # Read in the image and plot it using matplotlib img = mpimg.imread(target_folder + "/" + random_image[0]) plt.imshow(img) plt.title(target_class) plt.axis("off"); print(f"Image shape: {img.shape}") # show the shape of the image return img # View a random