Simplify format for settings.yaml

Former-commit-id: 7f33fe9b25
pull/1161/head
Dakota Benjamin 2017-03-08 15:19:00 -05:00
rodzic 6291966c32
commit f685096d3b
3 zmienionych plików z 11 dodań i 11 usunięć

Wyświetl plik

@ -3,6 +3,6 @@
# Copy this file and rename to settings.yaml to override. You can also place the a settings.yaml
# file with the same format inside your project to more specific parameter needs.
settings:
- project_path: '/home/dmb2/ODMProjects'
- opensfm_pointcloud: True
- opensfm_processes: 4 # Set this to nproc-2 for large datasets
project_path: '/home/dmb2/ODMProjects'
use_pmvs: False
opensfm_processes: 4 # Set this to nproc-2 for large datasets

Wyświetl plik

@ -3,5 +3,6 @@
# Copy this file and rename to settings.yaml to override. You can also place the a settings.yaml
# file with the same format inside your project to more specific parameter needs.
settings:
- project_path: '/project'
- opensfm_processes: 4 # Set this to nproc-2 for large datasets
project_path: '/'
use_pmvs: False
opensfm_processes: 4 # Set this to nproc-2 for large datasets

Wyświetl plik

@ -15,7 +15,7 @@ with open(context.settings_path) as stream:
def alphanumeric_string(string):
import re
if re.match('^[a-zA-Z0-9]+$', string) is None:
if re.match('^[a-zA-Z0-9_-]+$', string) is None:
msg = '{0} is not a valid name. Must use alphanumeric characters.'.format(string)
raise argparse.ArgumentTypeError(msg)
return string
@ -37,7 +37,7 @@ def config():
parser.add_argument('--project-path',
metavar='<path>',
help='Path to the project folder',
default=defaultSettings[0]['project_path'])
default=defaultSettings['project_path'])
parser.add_argument('name',
metavar='<project name>',
@ -144,16 +144,15 @@ def config():
parser.add_argument('--opensfm-processes',
metavar='<positive integer>',
default=defaultSettings[2]['opensfm_processes'],
default=defaultSettings['opensfm_processes'],
type=int,
help=('The maximum number of processes to use in dense '
'reconstruction. Default: %(default)s'))
parser.add_argument('--use-pmvs',
action='store_true',
default=defaultSettings[1]['opensfm_pointcloud'],
help='Use OpenSfM to compute the point cloud instead '
'of PMVS')
default=defaultSettings['use_pmvs'],
help='Use pmvs to compute point cloud alternatively')
parser.add_argument('--cmvs-maxImages',
metavar='<integer>',