Skip to content

Allow empty class folders in ImageFolder #8297

@NicolasHug

Description

@NicolasHug

Follow up to #4925 and as summarized in #4925 (comment), we need to allow empty class folders in ImageFolder i.e. we need a way for users to bypass this error:

if empty_classes:
msg = f"Found no valid file for the classes {', '.join(sorted(empty_classes))}. "

The most obvious way to enable that is by adding a new allow_empty parameter to make_dataset() and ImageFolder() / DatasetFolder(). (name TBD).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions