kopia lustrzana https://github.com/OpenDroneMap/ODM
More efficient logic
rodzic
90a60cb58a
commit
02679f3894
|
@ -26,20 +26,24 @@ class ODMSplitStage(types.ODM_Stage):
|
|||
tree = outputs['tree']
|
||||
reconstruction = outputs['reconstruction']
|
||||
photos = reconstruction.photos
|
||||
|
||||
gps_info_available = False
|
||||
# check for availability of either image_groups.txt (split-merge) or geotagged photos
|
||||
image_groups_file = os.path.join(args.project_path, "image_groups.txt")
|
||||
if 'split_image_groups_is_set' in args:
|
||||
image_groups_file = os.path.abspath(args.split_image_groups)
|
||||
if io.file_exists(image_groups_file) or reconstruction.has_geotagged_photos():
|
||||
gps_info_available = True
|
||||
outputs['large'] = False
|
||||
|
||||
should_split = len(photos) > args.split
|
||||
if should_split and not gps_info_available:
|
||||
log.ODM_WARNING('Could not perform split-merge as GPS information in photos or image_groups.txt is missing.')
|
||||
|
||||
outputs['large'] = should_split and gps_info_available
|
||||
if should_split:
|
||||
gps_info_available = False
|
||||
|
||||
# check for availability of either image_groups.txt (split-merge) or geotagged photos
|
||||
image_groups_file = os.path.join(args.project_path, "image_groups.txt")
|
||||
if 'split_image_groups_is_set' in args:
|
||||
image_groups_file = os.path.abspath(args.split_image_groups)
|
||||
if io.file_exists(image_groups_file) or reconstruction.has_geotagged_photos():
|
||||
gps_info_available = True
|
||||
|
||||
if gps_info_available:
|
||||
outputs['large'] = True
|
||||
else:
|
||||
log.ODM_WARNING('Could not perform split-merge as GPS information in photos or image_groups.txt is missing.')
|
||||
|
||||
if outputs['large']:
|
||||
# If we have a cluster address, we'll use a distributed workflow
|
||||
|
|
Ładowanie…
Reference in New Issue