From c734d30d9ca293599db9602773739ecd8a4b5873 Mon Sep 17 00:00:00 2001 From: Fabien SERVANT Date: Tue, 16 May 2023 11:51:58 +0200 Subject: [PATCH 1/3] Node for estimating relative pose per pairs --- .../aliceVision/RelativePoseEstimating.py | 72 +++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 meshroom/nodes/aliceVision/RelativePoseEstimating.py diff --git a/meshroom/nodes/aliceVision/RelativePoseEstimating.py b/meshroom/nodes/aliceVision/RelativePoseEstimating.py new file mode 100644 index 0000000000..d8d2af16ac --- /dev/null +++ b/meshroom/nodes/aliceVision/RelativePoseEstimating.py @@ -0,0 +1,72 @@ +__version__ = "1.0" + +from meshroom.core import desc + +class RelativePoseEstimating(desc.AVCommandLineNode): + commandLine = 'aliceVision_relativePoseEstimating {allParams}' + size = desc.DynamicNodeSize('input') + + parallelization = desc.Parallelization(blockSize=25) + commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' + + category = 'Sparse Reconstruction' + documentation = ''' +''' + + inputs = [ + desc.File( + name='input', + label='SfMData', + description='SfMData file.', + value='', + uid=[0], + ), + desc.ListAttribute( + elementDesc=desc.File( + name="featuresFolder", + label="Features Folder", + description="", + value="", + uid=[0], + ), + name="featuresFolders", + label="Features Folders", + description="Folder(s) containing the extracted features and descriptors." + ), + desc.File( + name='tracksFilename', + label='Tracks file', + description='Tracks file.', + value='', + uid=[0], + ), + desc.ChoiceParam( + name='describerTypes', + label='Describer Types', + description='Describer types used to describe an image.', + value=['dspsift'], + values=['sift', 'sift_float', 'sift_upright', 'dspsift', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv', 'tag16h5'], + exclusive=False, + uid=[0], + joinChar=',', + ), + 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='Pairs Infos', + description='Path to the output Pairs info files directory', + value=desc.Node.internalFolder, + uid=[], + ) + ] From 5735c49675f0cbefb8fff2891205806b62171029 Mon Sep 17 00:00:00 2001 From: Fabien SERVANT Date: Tue, 16 May 2023 13:40:14 +0200 Subject: [PATCH 2/3] sfmBootstraping node --- meshroom/nodes/aliceVision/SfmBootstraping.py | 77 +++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 meshroom/nodes/aliceVision/SfmBootstraping.py diff --git a/meshroom/nodes/aliceVision/SfmBootstraping.py b/meshroom/nodes/aliceVision/SfmBootstraping.py new file mode 100644 index 0000000000..ff3916ac57 --- /dev/null +++ b/meshroom/nodes/aliceVision/SfmBootstraping.py @@ -0,0 +1,77 @@ +__version__ = "1.0" + +from meshroom.core import desc + + +class SfMBootStraping(desc.AVCommandLineNode): + commandLine = 'aliceVision_sfmBootstraping {allParams}' + size = desc.DynamicNodeSize('input') + + category = 'Sparse Reconstruction' + documentation = ''' +''' + + inputs = [ + desc.File( + name='input', + label='SfMData', + description='SfMData file.', + value='', + uid=[0], + ), + desc.ListAttribute( + elementDesc=desc.File( + name="featuresFolder", + label="Features Folder", + description="", + value="", + uid=[0], + ), + name="featuresFolders", + label="Features Folders", + description="Folder(s) containing the extracted features and descriptors." + ), + desc.File( + name='tracksFilename', + label='Tracks file', + description='Tracks file.', + value='', + uid=[0], + ), + desc.File( + name='pairs', + label='Pairs file', + description='Information on pairs.', + value='', + uid=[0], + ), + desc.ChoiceParam( + name='describerTypes', + label='Describer Types', + description='Describer types used to describe an image.', + value=['dspsift'], + values=['sift', 'sift_float', 'sift_upright', 'dspsift', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv', 'tag16h5'], + exclusive=False, + uid=[0], + joinChar=',', + ), + 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='SfMData', + description='Path to the output sfmdata file', + value=desc.Node.internalFolder + 'sfm.json', + uid=[], + ) + ] From 48b2685a0e1ea3d7ef74edcd11a362f66eb85958 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= Date: Fri, 15 Sep 2023 16:02:03 +0200 Subject: [PATCH 3/3] [nodes] SfMBootstraping: Fix labels and harmonize quotes usage --- .../aliceVision/RelativePoseEstimating.py | 44 +++++++-------- meshroom/nodes/aliceVision/SfmBootstraping.py | 54 +++++++++---------- 2 files changed, 49 insertions(+), 49 deletions(-) diff --git a/meshroom/nodes/aliceVision/RelativePoseEstimating.py b/meshroom/nodes/aliceVision/RelativePoseEstimating.py index d8d2af16ac..22c805f3c0 100644 --- a/meshroom/nodes/aliceVision/RelativePoseEstimating.py +++ b/meshroom/nodes/aliceVision/RelativePoseEstimating.py @@ -15,10 +15,10 @@ class RelativePoseEstimating(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='SfMData', - description='SfMData file.', - value='', + name="input", + label="SfMData", + description="SfMData file.", + value="", uid=[0], ), desc.ListAttribute( @@ -34,28 +34,28 @@ class RelativePoseEstimating(desc.AVCommandLineNode): description="Folder(s) containing the extracted features and descriptors." ), desc.File( - name='tracksFilename', - label='Tracks file', - description='Tracks file.', - value='', + name="tracksFilename", + label="Tracks File", + description="Tracks file.", + value="", uid=[0], ), desc.ChoiceParam( - name='describerTypes', - label='Describer Types', - description='Describer types used to describe an image.', - value=['dspsift'], - values=['sift', 'sift_float', 'sift_upright', 'dspsift', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv', 'tag16h5'], + name="describerTypes", + label="Describer Types", + description="Describer types used to describe an image.", + value=["dspsift"], + values=["sift", "sift_float", "sift_upright", "dspsift", "akaze", "akaze_liop", "akaze_mldb", "cctag3", "cctag4", "sift_ocv", "akaze_ocv", "tag16h5"], exclusive=False, uid=[0], - joinChar=',', + joinChar=",", ), 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'], + 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=[], ) @@ -63,9 +63,9 @@ class RelativePoseEstimating(desc.AVCommandLineNode): outputs = [ desc.File( - name='output', - label='Pairs Infos', - description='Path to the output Pairs info files directory', + name="output", + label="Pairs Info", + description="Path to the output Pairs info files directory.", value=desc.Node.internalFolder, uid=[], ) diff --git a/meshroom/nodes/aliceVision/SfmBootstraping.py b/meshroom/nodes/aliceVision/SfmBootstraping.py index ff3916ac57..c33c1f7452 100644 --- a/meshroom/nodes/aliceVision/SfmBootstraping.py +++ b/meshroom/nodes/aliceVision/SfmBootstraping.py @@ -13,10 +13,10 @@ class SfMBootStraping(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='SfMData', - description='SfMData file.', - value='', + name="input", + label="SfMData", + description="SfMData file.", + value="", uid=[0], ), desc.ListAttribute( @@ -32,35 +32,35 @@ class SfMBootStraping(desc.AVCommandLineNode): description="Folder(s) containing the extracted features and descriptors." ), desc.File( - name='tracksFilename', - label='Tracks file', - description='Tracks file.', - value='', + name="tracksFilename", + label="Tracks File", + description="Tracks file.", + value="", uid=[0], ), desc.File( - name='pairs', - label='Pairs file', - description='Information on pairs.', - value='', + name="pairs", + label="Pairs File", + description="Information on pairs.", + value="", uid=[0], ), desc.ChoiceParam( - name='describerTypes', - label='Describer Types', - description='Describer types used to describe an image.', - value=['dspsift'], - values=['sift', 'sift_float', 'sift_upright', 'dspsift', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv', 'tag16h5'], + name="describerTypes", + label="Describer Types", + description="Describer types used to describe an image.", + value=["dspsift"], + values=["sift", "sift_float", "sift_upright", "dspsift", "akaze", "akaze_liop", "akaze_mldb", "cctag3", "cctag4", "sift_ocv", "akaze_ocv", "tag16h5"], exclusive=False, uid=[0], - joinChar=',', + joinChar=",", ), 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'], + 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=[], ) @@ -68,10 +68,10 @@ class SfMBootStraping(desc.AVCommandLineNode): outputs = [ desc.File( - name='output', - label='SfMData', - description='Path to the output sfmdata file', - value=desc.Node.internalFolder + 'sfm.json', + name="output", + label="SfMData", + description="Path to the output SfMData file.", + value=desc.Node.internalFolder + "sfm.json", uid=[], ) ]