File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -161,8 +161,14 @@ def __init__(
161161
162162 # Downsampled images may have different names vs images used for COLMAP,
163163 # so we need to map between the two sorted lists of files.
164- colmap_files = sorted (_get_rel_paths (colmap_image_dir ))
165- image_files = sorted (_get_rel_paths (image_dir ))
164+ if os .path .exists (os .path .join (data_dir , "masks" )): # Temporal warkaround on New Dataset, use Mask dir to verify
165+ import re
166+ colmap_files = sorted (_get_rel_paths (colmap_image_dir ), key = lambda x : int (re .search (r'cam_(\d+)_' , x ).group (1 )))
167+ image_files = sorted (_get_rel_paths (image_dir ), key = lambda x : int (re .search (r'cam_(\d+)_' , x ).group (1 )))
168+ else :
169+ colmap_files = sorted (_get_rel_paths (colmap_image_dir ))
170+ image_files = sorted (_get_rel_paths (image_dir ))
171+
166172 colmap_to_image = dict (zip (colmap_files , image_files ))
167173 image_paths = [os .path .join (image_dir , colmap_to_image [f ]) for f in image_names ]
168174
You can’t perform that action at this time.
0 commit comments