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:
|
if not fits:
|
||||||
log.ODM_WARNING("Image size (%sx%spx) would not fit in GPU memory, falling back to CPU" % (width, height))
|
log.ODM_WARNING("Image size (%sx%spx) would not fit in GPU memory, falling back to CPU" % (width, height))
|
||||||
return fits
|
return fits
|
||||||
except:
|
except (ModuleNotFoundError, ImportError):
|
||||||
|
return False
|
||||||
|
except Exception as e:
|
||||||
|
log.ODM_WARNING(str(e))
|
||||||
return False
|
return False
|
||||||
|
|
||||||
@lru_cache(maxsize=None)
|
@lru_cache(maxsize=None)
|
||||||
|
|
|
@ -205,11 +205,11 @@ class OSFMContext:
|
||||||
max_photo = find_largest_photo(photos)
|
max_photo = find_largest_photo(photos)
|
||||||
w, h = max_photo.width, max_photo.height
|
w, h = max_photo.width, max_photo.height
|
||||||
if w > h:
|
if w > h:
|
||||||
h = (h / w) * feature_process_size
|
h = int((h / w) * feature_process_size)
|
||||||
w = feature_process_size
|
w = int(feature_process_size)
|
||||||
else:
|
else:
|
||||||
w = (w / h) * feature_process_size
|
w = int((w / h) * feature_process_size)
|
||||||
h = feature_process_size
|
h = int(feature_process_size)
|
||||||
|
|
||||||
if has_popsift_and_can_handle_texsize(w, h) and feature_type == "SIFT":
|
if has_popsift_and_can_handle_texsize(w, h) and feature_type == "SIFT":
|
||||||
log.ODM_INFO("Using GPU for extracting SIFT features")
|
log.ODM_INFO("Using GPU for extracting SIFT features")
|
||||||
|
|
Ładowanie…
Reference in New Issue