application_vnd.jupyter.stderr_output_1.png
import matplotlib.image as img

import matplotlib.pyplot as plt

import pathlib

path = pathlib.Path('/kaggle/input/5-flower-types-classification-dataset/flower_images')

lilly = list(path.glob('Lilly/*'))[:1000]
lotus = list(path.glob('Lotus/*'))[:1000]
orchid = list(path.glob('Orchid/*'))[:1000]
sunflower = list(path.glob('Sunflower/*'))[:1000]
tulip = list(path.glob('Tulip/*'))[:1000]

data = {'lilly': lilly, 'lotus': lotus, 'orchid': orchid, 'sunflower': sunflower, 'tulip': tulip}
flower_labels = {k: v for k, v in enumerate(data.keys())}

fig, ax = plt.subplots(5, 5, figsize=(30, 25))
fig.suptitle('Flower Category', color='magenta', fontsize=40)
for i in range(5):
    for j in range(5):
        image = img.imread(data.get(flower_labels.get(i))[j])
        ax[i, j].imshow(image)
        ax[i, j].set_title(flower_labels.get(i))