Allow multiple gt image dirs
This commit is contained in:
parent
4e44b8a1aa
commit
2931142458
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user