Allow multiple gt image dirs

This commit is contained in:
James Betker 2020-05-25 19:21:09 -06:00
parent 4e44b8a1aa
commit 2931142458

View File

@ -50,7 +50,13 @@ def get_image_paths(data_type, dataroot):
if data_type == 'lmdb':
paths, sizes = _get_paths_from_lmdb(dataroot)
elif data_type == 'img':
paths = sorted(_get_paths_from_images(dataroot))
if isinstance(dataroot, list):
paths = []
for r in dataroot:
paths.extend(_get_paths_from_images(r))
paths = sorted(paths)
else:
paths = sorted(_get_paths_from_images(dataroot))
else:
raise NotImplementedError('data_type [{:s}] is not recognized.'.format(data_type))
return paths, sizes