Limit masks to supported extensions

pull/1156/head
Piero Toffanin 2020-09-16 09:56:07 -04:00
rodzic 705ccee43a
commit 7beeafc1ea
2 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -51,7 +51,7 @@ odm_modules_src_path = os.path.join(root_path, "modules")
settings_path = os.path.join(root_path, 'settings.yaml')
# Define supported image extensions
supported_extensions = {'.jpg','.jpeg','.png', '.tif', '.tiff'}
supported_extensions = {'.jpg','.jpeg','.png', '.tif', '.tiff', '.bmp'}
# Define the number of cores
num_cores = multiprocessing.cpu_count()

Wyświetl plik

@ -99,7 +99,7 @@ class ODMLoadDatasetStage(types.ODM_Stage):
masks = {}
for r in rejects:
(p, ext) = os.path.splitext(r)
if p[-5:] == "_mask":
if p[-5:] == "_mask" and ext.lower() in context.supported_extensions:
masks[p] = r
photos = []