Skip to content

TestDataset error #1

@yangninghua

Description

@yangninghua
class TestDataset(Dataset):
    ......
    def _get_image_files(self, path, ext={'.jpg', '.png'}):
        images = []
        for root, dirs, files in os.walk(path):
            if "check" in root:
                continue
            print('loading image files ' + root)

            # for file in files:
            #     if os.path.splitext(file)[-1] in ext and 'checkpoint' not in file:
            #         images.append(os.path.join(root, file))

            for dir in dirs:
                for file in os.listdir(os.path.join(path, dir)):
                    if os.path.splitext(file)[-1] in ext and 'checkpoint' not in file:
                        images.append(os.path.join(root, dir, file))
        return sorted(images)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions