Skip to content

wrong label order when reading images from folders using 'ImageFolder' and can't get correct labels #714

Closed
@zyl200846

Description

@zyl200846

When I try to load images from folders using datasets.ImagesFolder(), i find the lables' order is not correct as shown in the folder. For example, I have different kinds of images in folders named from 1 to 100, if I use above function to read images and get corresponding labels, of course I will get the images and labels, but the labels for images will become 1, 10, 100, 11, 12, 13 which is not right for corresponding image. The right order should be 1, 2, 3, 4, 5 for corresponding images.
Hope I state the problem clearly and wish you can fix this bug. Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions