Merge pull request #1230 from pierotofy/imagegroups

Add --split-image-groups parameter
pull/1231/head
Piero Toffanin 2021-02-05 16:06:26 -05:00 zatwierdzone przez GitHub
commit 029ced4fd9
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
3 zmienionych plików z 15 dodań i 3 usunięć

Wyświetl plik

@ -1 +1 @@
2.4.1
2.4.2

Wyświetl plik

@ -608,6 +608,14 @@ def config(argv=None, parser=None):
'are added to the cluster. This is done to ensure '
'that neighboring submodels overlap. Default: %(default)s')
parser.add_argument('--split-image-groups',
metavar='<path string>',
action=StoreValue,
default=None,
help=('Path to the image groups file that controls how images should be split into groups. '
'The file needs to use the following format: \n'
'image_name group_name\n'
'Default: %(default)s'))
# parser.add_argument('--split-multitracks',
# action=StoreTrue,
# nargs=0,

Wyświetl plik

@ -93,9 +93,13 @@ class OSFMContext:
# check for image_groups.txt (split-merge)
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):
log.ODM_INFO("Copied image_groups.txt to OpenSfM directory")
io.copy(image_groups_file, os.path.join(self.opensfm_project_path, "image_groups.txt"))
dst_groups_file = os.path.join(self.opensfm_project_path, "image_groups.txt")
io.copy(image_groups_file, dst_groups_file)
log.ODM_INFO("Copied %s to %s" % (image_groups_file, dst_groups_file))
# check for cameras
if args.cameras: