Meshroom/meshroom/nodes/aliceVision/FeatureExtraction.py
Yann Lanthony e8c579c942 [core] parallelization: introduce the notion of node 'size'
* node size is an estimation of the number of element to process on a given node, that may be used for parallelization.
* replace the explicit reference to an attribute on a node (Parallelization.inputListParamName)
* size can be:
  * dynamic: depends on the size of the node connected to a specific Attribute
  * static
2017-11-17 18:46:21 +01:00

65 lines
2.1 KiB
Python

import sys
from meshroom.core import desc
class FeatureExtraction(desc.CommandLineNode):
internalFolder = '{cache}/{nodeType}/{uid0}/'
commandLine = 'aliceVision_featureExtraction {allParams}'
size = desc.DynamicNodeSize('input')
parallelization = desc.Parallelization(blockSize=10)
commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}'
inputs = [
desc.File(
name='input',
label='Input',
description='''SfMData file.''',
value='',
uid=[0],
),
desc.ChoiceParam(
name='describerTypes',
label='Describer Types',
description='''Describer types used to describe an image.''',
value=['SIFT'],
values=['SIFT', 'SIFT_FLOAT', 'AKAZE', 'AKAZE_LIOP', 'AKAZE_MLDB', 'CCTAG3', 'CCTAG4', 'SIFT_OCV', 'AKAZE_OCV'],
exclusive=False,
uid=[0],
joinChar=',',
),
desc.ChoiceParam(
name='describerPreset',
label='Describer Preset',
description='''Control the ImageDescriber configuration (low, medium, normal, high, ultra). Configuration 'ultra' can take long time !''',
value='NORMAL',
values=['LOW', 'MEDIUM', 'NORMAL', 'HIGH', 'ULTRA'],
exclusive=True,
uid=[0],
),
desc.BoolParam(
name='upright',
label='Upright',
description='''Upright feature.''',
value=False,
uid=[0],
),
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='''Output path for the features and descriptors files (*.feat, *.desc).''',
value='{cache}/{nodeType}/{uid0}/',
uid=[],
),
]