def __init__(self, root, conf):
    self.conf = conf = SimpleNamespace(**{**self.default_conf, **conf})
    self.root = root
    self.paths = []
    for g in conf.globs:
        self.paths += list(Path(root).glob(('**/' + g)))
    if (len(self.paths) == 0):
        raise ValueError(f'Could not find any image in root: {root}.')
    self.paths = sorted(list(set(self.paths)))
    self.paths = [i.relative_to(root) for i in self.paths]
    logging.info(f'Found {len(self.paths)} images in root {root}.')
def __init__(self, root, conf):
    self.conf = conf = SimpleNamespace(**{**self.default_conf, **conf})
    self.root = root
    self.paths = []
    for g in conf.globs:
        self.paths += list(Path(root).glob(('**/' + g)))
    if (len(self.paths) == 0):
        raise ValueError(f'Could not find any image in root: {root}.')
    self.paths = sorted(list(set(self.paths)))
    self.paths = [i.relative_to(root) for i in self.paths]
    logging.info(f'Found {len(self.paths)} images in root {root}.')