application_vnd.jupyter.stderr_output_2.png text_plain_output_3.png text_plain_output_1.png
import matplotlib.image as mpimg

import matplotlib.pyplot as plt

import os

import random

train_dir = '../input/yoga-poses-dataset/DATASET/TRAIN'
test_dir = '../input/yoga-poses-dataset/DATASET/TEST'

def plot_yoga_images(train_dir):
    for i, col in enumerate(os.listdir(train_dir)):
        image = random.choice(os.listdir(train_dir + '/' + col))
        image_path = train_dir + '/' + col + '/' + image
        img = mpimg.imread(image_path) / 255
        plt.axis(False)
        i = i + 1

plot_yoga_images(train_dir)