Hello,
If you look at the documentation of ImageFolder 5, it specifies that it expects more than one folder in the specified location (root parameter), and not a folder containing only images.
What you could do, in your case, is load “…/input/aptos2019-blindness-detection/” which I presume contains both the training and testing folder. You can then split manually to keep only the training data. I wrote this piece of code to show how you could do that, but you will have to change the names of certain folders.
    root = '/store/dabeaq/datasets/middlebury/'
    folder = ImageFolder(root)
    print(folder.imgs)
    # [('/store/dabeaq/datasets/middlebury/cones/disp2.png', 0), ('/store/dabeaq/datasets/middlebury/cones/disp6.png', 0), ('/store/dabeaq/datasets/middlebury/cones/im2.png', 0), ('/store/dabeaq/datasets/middlebury/cones/im6.png', 0), ('/store/dabeaq/datasets/middlebury/other_cones/disp2_t.png', 1), ('/store/dabeaq/datasets/middlebury/other_cones/disp6_t.png', 1), ('/store/dabeaq/datasets/middlebury/other_cones/im2_t.png', 1), ('/store/dabeaq/datasets/middlebury/other_cones/im6_t.png', 1)]
    train_folder_id = folder.class_to_idx['cones']
    test_folder_id = folder.class_to_idx['other_cones']
    train_images = [img for img, i in folder.imgs if i == train_folder_id]
    test_images = [img for img, i in folder.imgs if i == test_folder_id]
    print(train_images)
    # ['/store/dabeaq/datasets/middlebury/cones/disp2.png', '/store/dabeaq/datasets/middlebury/cones/disp6.png', '/store/dabeaq/datasets/middlebury/cones/im2.png', '/store/dabeaq/datasets/middlebury/cones/im6.png']
    print(test_images)
    # ['/store/dabeaq/datasets/middlebury/other_cones/disp2_t.png', '/store/dabeaq/datasets/middlebury/other_cones/disp6_t.png', '/store/dabeaq/datasets/middlebury/other_cones/im2_t.png', '/store/dabeaq/datasets/middlebury/other_cones/im6_t.png']

Hope this is clear!