text_plain_output_1.png
import pathlib

import random

main_path = pathlib.Path('../input/oct2017/OCT2017 ')
train_path = main_path / 'train'
test_path = main_path / 'test'
val_path = main_path / 'val'
train_path

import random
train_image_paths = [str(path) for path in list(train_path.glob('*/*.jpeg'))]
random.shuffle(train_image_paths)
test_image_paths = [str(path) for path in list(test_path.glob('*/*.jpeg'))]
val_image_paths = [str(path) for path in list(val_path.glob('*/*.jpeg'))]
print('Number of training images:', len(train_image_paths))
print('Number of testing images:', len(test_image_paths))
print('Number of validation images:', len(val_image_paths))