[core] change Attributes declaration on Node description

Inputs and outputs Attributes are now declared in two separate lists
* no more isOutput field on Attribute description
* guarantee attributes order (was not the case in Python2 with class attributes)
* Attribute's name is now part of its description

Note: for now, input and output Attributes are still stored in a single model inside a Graph.
This commit is contained in:
Yann Lanthony 2017-10-31 19:47:32 +01:00
parent 00366cda00
commit 16e8037fd7
18 changed files with 506 additions and 405 deletions

View file

@ -7,67 +7,76 @@ class ImageMatching(desc.CommandLineNode):
internalFolder = '{cache}/{nodeType}/{uid0}/'
commandLine = 'aliceVision_imageMatching {allParams}'
input = desc.File(
inputs = [
desc.File(
name='input',
label='Input',
description='''SfMData file or filepath to a simple text file with one image filepath per line, or path to the descriptors folder.''',
value='',
uid=[0],
isOutput=False,
)
featuresDirectory = desc.File(
),
desc.File(
name='featuresDirectory',
label='Features Directory',
description='''Directory containing the extracted features and descriptors. By default, it is the directory containing the SfMData.''',
value='',
uid=[0],
isOutput=False,
)
tree = desc.File(
),
desc.File(
name='tree',
label='Tree',
description='''Input name for the vocabulary tree file.''',
value=os.environ.get('ALICEVISION_VOCTREE', ''),
uid=[0],
isOutput=False,
)
output = desc.File(
label='Output',
description='''Filepath to the output file with the list of selected image pairs.''',
value='{cache}/{nodeType}/{uid0}/imageMatches.txt',
uid=[],
isOutput=True,
)
minNbImages = desc.IntParam(
),
desc.IntParam(
name='minNbImages',
label='Minimal Number of Images',
description='''Minimal number of images to use the vocabulary tree. If we have less features than this threshold, we will compute all matching combinations.''',
value=200,
range=(0, 500, 1),
uid=[0],
)
maxDescriptors = desc.IntParam(
),
desc.IntParam(
name='maxDescriptors',
label='Max Descriptors',
description='''Limit the number of descriptors you load per image. Zero means no limit.''',
value=500,
range=(-sys.maxsize, sys.maxsize, 1),
uid=[0],
)
nbMatches = desc.IntParam(
),
desc.IntParam(
name='nbMatches',
label='Nb Matches',
description='''The number of matches to retrieve for each image (If 0 it will retrieve all the matches).''',
value=50,
range=(-sys.maxsize, sys.maxsize, 1),
uid=[0],
)
weights = desc.File(
),
desc.File(
name='weights',
label='Weights',
description='''Input name for the weight file, if not provided the weights will be computed on the database built with the provided set. Log parameters:''',
value='',
uid=[0],
isOutput=False,
)
verboseLevel = desc.ChoiceParam(
),
desc.ChoiceParam(
name='verboseLevel',
label='Verbose Level',
description='''verbosity level (fatal, error, warning, info, debug, trace).''',
value='info',
values=['fatal', 'error', 'warning', 'info', 'debug', 'trace'],
exclusive=True,
uid=[],
)
)
]
outputs = [
desc.File(
name='output',
label='Output',
description='''Filepath to the output file with the list of selected image pairs.''',
value='{cache}/{nodeType}/{uid0}/imageMatches.txt',
uid=[],
),
]