kopia lustrzana https://github.com/OpenDroneMap/ODM
Popsift check fix
rodzic
497b5c60ae
commit
239f051940
|
@ -15,7 +15,10 @@ def has_popsift_and_can_handle_texsize(width, height):
|
|||
if not fits:
|
||||
log.ODM_WARNING("Image size (%sx%spx) would not fit in GPU memory, falling back to CPU" % (width, height))
|
||||
return fits
|
||||
except:
|
||||
except (ModuleNotFoundError, ImportError):
|
||||
return False
|
||||
except Exception as e:
|
||||
log.ODM_WARNING(str(e))
|
||||
return False
|
||||
|
||||
@lru_cache(maxsize=None)
|
||||
|
|
|
@ -205,11 +205,11 @@ class OSFMContext:
|
|||
max_photo = find_largest_photo(photos)
|
||||
w, h = max_photo.width, max_photo.height
|
||||
if w > h:
|
||||
h = (h / w) * feature_process_size
|
||||
w = feature_process_size
|
||||
h = int((h / w) * feature_process_size)
|
||||
w = int(feature_process_size)
|
||||
else:
|
||||
w = (w / h) * feature_process_size
|
||||
h = feature_process_size
|
||||
w = int((w / h) * feature_process_size)
|
||||
h = int(feature_process_size)
|
||||
|
||||
if has_popsift_and_can_handle_texsize(w, h) and feature_type == "SIFT":
|
||||
log.ODM_INFO("Using GPU for extracting SIFT features")
|
||||
|
|
Ładowanie…
Reference in New Issue