[nodes] StereoPhotometry: Update nodes' parameters and descriptions

This commit is contained in:
Candice Bentéjac 2023-05-31 12:47:52 +02:00
parent 578d1abbf4
commit f0f5b205bf
4 changed files with 188 additions and 84 deletions

View file

@ -1,4 +1,4 @@
__version__ = "3.0" __version__ = "1.0"
from meshroom.core import desc from meshroom.core import desc
@ -11,44 +11,53 @@ TODO.
''' '''
inputs = [ inputs = [
desc.File(
name='inputJSON',
label='Sphere detection file',
description='Input file containing spheres centers and radius.',
value='',
uid=[0],
),
desc.File( desc.File(
name='inputPath', name='inputPath',
label='SfmData', label='SfMData',
description='Input file. Could be SfMData file or folder.', description='Input file. Could be SfMData file or folder.',
value='', value='',
uid=[0], uid=[0]
),
desc.File(
name='inputJSON',
label='Sphere Detection File',
description='Input JSON file containing spheres centers and radius.',
value='',
uid=[0]
), ),
desc.BoolParam( desc.BoolParam(
name='saveAsModel', name='saveAsModel',
label='Save as model', label='Save As Model',
description='Check if this calibration file will be used with other datasets', description='Check if this calibration file will be used with other datasets.',
value=False, value=False,
uid=[0], uid=[0]
), ),
desc.ChoiceParam( desc.ChoiceParam(
name='method', name='method',
label='Calibration method', label='Calibration Method',
description='Method used for light calibration. Use brightestPoint for shiny sphere and whiteSphere for white matte sphere', description='Method used for light calibration. Use "brightestPoint" for shiny spheres and "whiteSphere" for white matte spheres.',
values=['brightestPoint', 'whiteSphere'], values=['brightestPoint', 'whiteSphere'],
value='brightestPoint', value='brightestPoint',
exclusive=True, exclusive=True,
uid=[0], 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 = [ outputs = [
desc.File( desc.File(
name='outputFile', name='outputFile',
label='Output light file', label='Light File',
description='Light information will be written here.', description='Light information will be written here.',
value=desc.Node.internalFolder +'/lights.json' , value=desc.Node.internalFolder +'/lights.json' ,
uid=[], uid=[]
) )
] ]

View file

@ -1,4 +1,4 @@
__version__ = "3.0" __version__ = "1.0"
from meshroom.core import desc from meshroom.core import desc
@ -10,28 +10,46 @@ TODO.
''' '''
inputs = [ inputs = [
desc.File(
name='inputPath',
label='Normal Maps Folder',
description='Path to the folder containing the normal maps and the masks.',
value='',
uid=[0]
),
desc.File( desc.File(
name='sfmDataFile', name='sfmDataFile',
label='sfmDataFile', label='SfMData',
description='''SfMData file.''', description='Input SfMData file.',
value='', value='',
uid=[0], uid=[0],
), ),
desc.File( desc.IntParam(
name='inputPath', name='downscale',
label='inputPath', label='Downscale Factor',
description='Normal maps folder', description='Downscale factor for faster results.',
value='', value=1,
range=(1, 10, 1),
advanced=True,
uid=[0] 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 = [ outputs = [
desc.File( desc.File(
name='outputPath', name='outputPath',
label='Output path', label='Output Path',
description='Path to the output folder', description='Path to the output folder.',
value=desc.Node.internalFolder, value=desc.Node.internalFolder,
uid=[], uid=[]
) )
] ]

View file

@ -1,4 +1,4 @@
__version__ = "3.0" __version__ = "1.0"
from meshroom.core import desc from meshroom.core import desc
@ -10,54 +10,78 @@ TODO.
''' '''
inputs = [ inputs = [
desc.File( desc.File(
name='pathToJSONLightFile', name='inputPath',
label='Lights file', label='SfMData',
description='File containing lighting information.', description='Input file. Could be an SfMData file or folder containing images.',
value='', value='',
uid=[0] uid=[0]
), ),
desc.File( desc.File(
name='inputPath', name='pathToJSONLightFile',
label='SfmData', label='Light File',
description='Input file. Could be SfMData file or folder.', description='Path to a JSON file containing the lighting information.\n'
value='', 'If empty, .txt files are expected in the image folder.',
uid=[0], value='defaultJSON.txt',
uid=[0]
), ),
desc.File( desc.File(
name='maskPath', name='maskPath',
label='Mask folder path', label='Mask Folder Path',
description='Mask folder path', description='Path to a folder containing masks or to a mask directly.',
value='', value='',
uid=[0], uid=[0]
),
desc.ChoiceParam(
name='SHOrder',
label='Spherical Harmonics Order',
description='Order of the spherical harmonics.\n'
'- 0: directional\n'
'- 1: directional + ambiant\n'
'- 2: second order spherical harmonics',
values=['0', '1', '2'],
value='0',
exclusive=True,
advanced=True,
uid=[0]
),
desc.BoolParam(
name='removeAmbiant',
label='Remove Ambiant Light',
description='True if the ambiant light is to be removed on the PS images, false otherwise.',
value=False,
advanced=True,
uid=[0]
),
desc.BoolParam(
name='isRobust',
label='Use Robust Algorithm',
description='True to use the robust algorithm, false otherwise.',
value=False,
advanced=True,
uid=[0]
),
desc.IntParam(
name='downscale',
label='Downscale Factor',
description='Downscale factor for faster results.',
value=1,
range=(1, 10, 1),
advanced=True,
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 = [ outputs = [
desc.File(
name='outputSfmData',
label='SfmData',
description='',
value=desc.Node.internalFolder + '/sfmData.sfm',
uid=[],
group='', # remove from command line
),
desc.File(
name='outputSfmDataAlbedo',
label='SfmData Albedo',
description='',
value=desc.Node.internalFolder + '/albedoMaps.sfm',
uid=[],
group='', # remove from command line
),
desc.File(
name='outputSfmDataNormal',
label='SfmData Normal',
description='',
value=desc.Node.internalFolder + '/normalMaps.sfm',
uid=[],
group='', # remove from command line
),
desc.File( desc.File(
name='outputPath', name='outputPath',
label='Output Folder', label='Output Folder',
@ -65,18 +89,51 @@ TODO.
value=desc.Node.internalFolder, value=desc.Node.internalFolder,
uid=[], uid=[],
), ),
desc.File(
name='outputSfmData',
label='SfMData',
description='Output path for the Sfm',
value=desc.Node.internalFolder + '/sfmData.sfm',
uid=[],
group='', # remove from command line
),
desc.File(
name='outputSfmDataAlbedo',
label='SfMData Albedo',
description='',
value=desc.Node.internalFolder + '/albedoMaps.sfm',
uid=[],
group='', # remove from command line
),
desc.File(
name='outputSfmDataNormal',
label='SfMData Normal',
description='',
value=desc.Node.internalFolder + '/normalMaps.sfm',
uid=[],
group='', # remove from command line
),
# these attributes are only here to describe more accurately the output of the node # these attributes are only here to describe more accurately the output of the node
# by specifying that it generates 2 sequences of images # by specifying that it generates 2 sequences of images
# (see in Viewer2D.qml how these attributes can be used) # (see in Viewer2D.qml how these attributes can be used)
desc.File( desc.File(
name='normals', name='normals',
label='Normal Maps', label='Normal Maps Camera',
description='Generated normal maps.', description='Generated normal maps in the camera coordinate system.',
semantic='image', semantic='image',
value=desc.Node.internalFolder + '<POSE_ID>_normals.exr', value=desc.Node.internalFolder + '<POSE_ID>_normals.exr',
uid=[], uid=[],
group='', # do not export on the command line group='', # do not export on the command line
), ),
desc.File(
name='normalsWorld',
label='Normal Maps World',
description='Generated normal maps in the world coordinate system.',
semantic='image',
value=desc.Node.internalFolder + '<POSE_ID>_normals_w.exr',
uid=[],
group='', # do not export on the command line
),
desc.File( desc.File(
name='albedo', name='albedo',
label='Albedo Maps', label='Albedo Maps',

View file

@ -1,4 +1,4 @@
__version__ = "3.0" __version__ = "1.0"
from meshroom.core import desc from meshroom.core import desc
@ -12,29 +12,38 @@ TODO.
inputs = [ inputs = [
desc.File( desc.File(
name='input_sfmdata_path', name='input',
label="SfmData", label="SfMData",
description='Input SfMData file.', description='Input SfMData file.',
value='', value='',
uid=[0], uid=[0]
), ),
desc.File( desc.File(
name='input_model_path', name='modelPath',
label='Deep learning net for automatic detection', label='Detection Network',
description='Deep learning net for automatic detection.', description='Deep learning network for automatic calibration sphere detection.',
value='${ALICEVISION_SPHERE_DETECTION_MODEL}', value='${ALICEVISION_SPHERE_DETECTION_MODEL}',
uid=[0], uid=[0]
), ),
desc.BoolParam( desc.BoolParam(
name='autoDetect', name='autoDetect',
label='Automatic Sphere Detection', label='Automatic Sphere Detection',
description='Automatic detection of calibration spheres', description='Automatic detection of calibration spheres',
value=False, value=False,
uid=[0], uid=[0]
),
desc.FloatParam(
name="minScore",
label="Minimum Score",
description="Minimum score for the detection.",
value=0.0,
range=(0.0, 50.0, 0.01),
advanced=True,
uid=[0]
), ),
desc.GroupAttribute( desc.GroupAttribute(
name="sphereCenter", name="sphereCenter",
label="Sphere center", label="Sphere Center",
description="Center of the circle (XY offset to the center of the image in pixels).", description="Center of the circle (XY offset to the center of the image in pixels).",
groupDesc=[ groupDesc=[
desc.FloatParam( desc.FloatParam(
@ -48,7 +57,8 @@ TODO.
uid=[0], uid=[0],
range=(-1000.0, 10000.0, 1.0)), range=(-1000.0, 10000.0, 1.0)),
], ],
group=None, # skip group from command line enabled=lambda node: not node.autoDetect.value,
group=None # skip group from command line
), ),
desc.FloatParam( desc.FloatParam(
name='sphereRadius', name='sphereRadius',
@ -56,16 +66,26 @@ TODO.
description='Sphere radius in pixels.', description='Sphere radius in pixels.',
value=500.0, value=500.0,
range=(0.0, 1000.0, 0.1), range=(0.0, 1000.0, 0.1),
uid=[0], enabled=lambda node: not node.autoDetect.value,
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 = [ outputs = [
desc.File( desc.File(
name='output_path', name='output',
label='Output light file folder', label='Light File Folder',
description='Light information will be written here.', description='Light information will be written here.',
value=desc.Node.internalFolder, value=desc.Node.internalFolder,
uid=[], uid=[]
) )
] ]