From 06047807c24ce604015b662ff974dbc406d48541 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= Date: Tue, 17 Jan 2023 14:00:33 +0100 Subject: [PATCH 01/12] [nodes] DepthMap: Add sgmMaxSimilarity parameter --- meshroom/nodes/aliceVision/DepthMap.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/meshroom/nodes/aliceVision/DepthMap.py b/meshroom/nodes/aliceVision/DepthMap.py index 7161fbcd78..872fe4258a 100644 --- a/meshroom/nodes/aliceVision/DepthMap.py +++ b/meshroom/nodes/aliceVision/DepthMap.py @@ -188,6 +188,15 @@ class DepthMap(desc.AVCommandLineNode): uid=[0], advanced=True, ), + desc.FloatParam( + name='sgmMaxSimilarity', + label='Max Similarity', + description='Maximum similarity threshold (between 0 and 1) used to filter out poorly supported depth values.', + value=1.0, + range=(0.0, 1.0, 0.01), + uid=[0], + advanced=True, + ), desc.FloatParam( name='sgmGammaC', label='GammaC', From d0216491c56246c3126668c4cf5893958e9fd2ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= Date: Mon, 13 Feb 2023 15:48:55 +0100 Subject: [PATCH 02/12] [nodes] DepthMap: Add refineInterpolateMiddleDepth parameter --- meshroom/nodes/aliceVision/DepthMap.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/meshroom/nodes/aliceVision/DepthMap.py b/meshroom/nodes/aliceVision/DepthMap.py index 872fe4258a..44b555ecdc 100644 --- a/meshroom/nodes/aliceVision/DepthMap.py +++ b/meshroom/nodes/aliceVision/DepthMap.py @@ -362,6 +362,13 @@ class DepthMap(desc.AVCommandLineNode): advanced=True, enabled= lambda node: node.refine.refineEnabled.value, ), + desc.BoolParam( + name='refineInterpolateMiddleDepth', + label='Interpolate Middle Depth', + description='Enable middle depth bilinear interpolation.', + value=False, + uid=[0], + ), ]), desc.GroupAttribute( name="colorOptimization", From 72d6ce72d12d1f9555a7fbf66495ada407ffe8ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= Date: Mon, 13 Feb 2023 15:49:34 +0100 Subject: [PATCH 03/12] [nodes] DepthMap: Add exportIntermediateNormalMaps parameter --- meshroom/nodes/aliceVision/DepthMap.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/meshroom/nodes/aliceVision/DepthMap.py b/meshroom/nodes/aliceVision/DepthMap.py index 44b555ecdc..173ef50db3 100644 --- a/meshroom/nodes/aliceVision/DepthMap.py +++ b/meshroom/nodes/aliceVision/DepthMap.py @@ -410,6 +410,14 @@ class DepthMap(desc.AVCommandLineNode): uid=[0], advanced=True, ), + desc.BoolParam( + name='exportIntermediateNormalMaps', + label='Export Normal Maps', + description='Export intermediate normal maps from the SGM and Refine steps.', + value=False, + uid=[], + advanced=True, + ), desc.BoolParam( name='exportIntermediateVolumes', label='Export Volumes', From a052c798d3f7e058cac798b28830a88710aa7b9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= Date: Mon, 13 Feb 2023 15:50:17 +0100 Subject: [PATCH 04/12] [nodes] DepthMap: Add exportIntermediateTopographicCutVolumes parameter --- meshroom/nodes/aliceVision/DepthMap.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/meshroom/nodes/aliceVision/DepthMap.py b/meshroom/nodes/aliceVision/DepthMap.py index 173ef50db3..0fc3a93095 100644 --- a/meshroom/nodes/aliceVision/DepthMap.py +++ b/meshroom/nodes/aliceVision/DepthMap.py @@ -434,6 +434,14 @@ class DepthMap(desc.AVCommandLineNode): uid=[0], advanced=True, ), + desc.BoolParam( + name='exportIntermediateTopographicCutVolumes', + label='Export Cut Volumes', + description='Export intermediate similarity topographic cut volumes from the SGM and Refine steps.', + value=False, + uid=[], + advanced=True, + ), desc.BoolParam( name='exportIntermediateVolume9pCsv', label='Export 9 Points', From e06979f65fda8b994a6855122c045ace9ec698ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= Date: Mon, 13 Feb 2023 15:50:54 +0100 Subject: [PATCH 05/12] [nodes] DepthMap: Add sgmDepthThiknessInflate parameter --- meshroom/nodes/aliceVision/DepthMap.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/meshroom/nodes/aliceVision/DepthMap.py b/meshroom/nodes/aliceVision/DepthMap.py index 0fc3a93095..f204bfcd7a 100644 --- a/meshroom/nodes/aliceVision/DepthMap.py +++ b/meshroom/nodes/aliceVision/DepthMap.py @@ -188,6 +188,15 @@ class DepthMap(desc.AVCommandLineNode): uid=[0], advanced=True, ), + desc.FloatParam( + name='sgmDepthThiknessInflate', + label='Thikness Inflate', + description='Inflate factor to add margins to the depth thikness.', + value=0.0, + range=(0.0, 2.0, 0.1), + uid=[0], + advanced=True, + ), desc.FloatParam( name='sgmMaxSimilarity', label='Max Similarity', From 2d552ef55de9690ab07e12d7da4ecbdddd164e29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= Date: Thu, 13 Apr 2023 18:27:55 +0200 Subject: [PATCH 06/12] [nodes] DepthMap: Add useConsistentScale parameters --- meshroom/nodes/aliceVision/DepthMap.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/meshroom/nodes/aliceVision/DepthMap.py b/meshroom/nodes/aliceVision/DepthMap.py index f204bfcd7a..d8efc14d20 100644 --- a/meshroom/nodes/aliceVision/DepthMap.py +++ b/meshroom/nodes/aliceVision/DepthMap.py @@ -267,6 +267,13 @@ class DepthMap(desc.AVCommandLineNode): uid=[0], advanced=True, ), + desc.BoolParam( + name='sgmUseConsistentScale', + label='Consistent Scale', + description='Compare patch with consistent scale for similarity volume computation.', + value=False, + uid=[0], + ), ]), desc.GroupAttribute( name='refine', @@ -377,6 +384,15 @@ class DepthMap(desc.AVCommandLineNode): description='Enable middle depth bilinear interpolation.', value=False, uid=[0], + enabled= lambda node: node.refine.refineEnabled.value, + ), + desc.BoolParam( + name='refineUseConsistentScale', + label='Consistent Scale', + description='Compare patch with consistent scale for similarity volume computation.', + value=False, + uid=[0], + enabled= lambda node: node.refine.refineEnabled.value, ), ]), desc.GroupAttribute( From 1e4672510ea565a4d43133bf4a6f4869ace16724 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= Date: Thu, 13 Apr 2023 18:28:32 +0200 Subject: [PATCH 07/12] [nodes] DepthMap: Add customPatchPattern group parameter --- meshroom/nodes/aliceVision/DepthMap.py | 89 ++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) diff --git a/meshroom/nodes/aliceVision/DepthMap.py b/meshroom/nodes/aliceVision/DepthMap.py index d8efc14d20..157aa4ab11 100644 --- a/meshroom/nodes/aliceVision/DepthMap.py +++ b/meshroom/nodes/aliceVision/DepthMap.py @@ -419,6 +419,95 @@ class DepthMap(desc.AVCommandLineNode): enabled= lambda node: node.colorOptimization.colorOptimizationEnabled.value, ), ]), + desc.GroupAttribute( + name='customPatchPattern', + label='Custom Patch Pattern', + description='User custom patch pattern for similarity comparison.', + advanced=True, + group=None, + groupDesc=[ + desc.BoolParam( + name='sgmUseCustomPatchPattern', + label='Enable for SGM', + description='Enable custom patch pattern for similarity volume computation at the SGM step .', + value=False, + uid=[0], + advanced=True, + ), + desc.BoolParam( + name='refineUseCustomPatchPattern', + label='Enable for Refine', + description='Enable custom patch pattern for similarity volume computation at the Refine step .', + value=False, + uid=[0], + advanced=True, + ), + desc.ListAttribute( + name="customPatchPatternSubparts", + label="Subparts", + description='User custom patch pattern subparts for similarity volume computation.', + advanced=True, + enabled= lambda node: (node.customPatchPattern.sgmUseCustomPatchPattern.value or node.customPatchPattern.refineUseCustomPatchPattern.value), + elementDesc=desc.GroupAttribute( + name='customPatchPatternSubpart', + label='Patch Pattern Subpart', + description='', + joinChar=":", + group=None, + groupDesc=[ + desc.ChoiceParam( + name='customPatchPatternSubpartType', + label='Type', + description='Patch pattern subpart type.', + value='full', + values=['full', 'circle'], + exclusive=True, + uid=[0], + ), + desc.FloatParam( + name='customPatchPatternSubpartRadius', + label='Radius / WSH', + description='Patch pattern subpart half-width or circle radius.', + value=2.5, + range=(0.5, 30.0, 0.1), + uid=[0], + ), + desc.IntParam( + name='customPatchPatternSubpartNbCoords', + label='Coordinates', + description='Patch pattern subpart number of coordinates (for circle or ignore).', + value=12, + range=(3, 24, 1), + uid=[0], + ), + desc.IntParam( + name='customPatchPatternSubpartLevel', + label='Level', + description='Patch pattern subpart image level.', + value=0, + range=(0, 2, 1), + uid=[0], + ), + desc.FloatParam( + name='customPatchPatternSubpartWeight', + label='Weight', + description='Patch pattern subpart weight.', + value=1.0, + range=(0.0, 1.0, 0.1), + uid=[0], + ), + ]), + ), + desc.BoolParam( + name='customPatchPatternGroupSubpartsPerLevel', + label='Group Subparts Per Level', + description='Group all subparts with the same image level.', + value=False, + uid=[0], + advanced=True, + enabled= lambda node: (node.customPatchPattern.sgmUseCustomPatchPattern.value or node.customPatchPattern.refineUseCustomPatchPattern.value), + ), + ]), desc.GroupAttribute( name='intermediateResults', label='Intermediate Results', From 556c6bb937a7dad5ab1cedc5ca9fb693ef74cf68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= Date: Fri, 14 Apr 2023 17:18:38 +0200 Subject: [PATCH 08/12] [nodes] DepthMap: Update SGM depth map path pattern --- meshroom/nodes/aliceVision/DepthMap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/nodes/aliceVision/DepthMap.py b/meshroom/nodes/aliceVision/DepthMap.py index 157aa4ab11..ee29979dfd 100644 --- a/meshroom/nodes/aliceVision/DepthMap.py +++ b/meshroom/nodes/aliceVision/DepthMap.py @@ -636,7 +636,7 @@ class DepthMap(desc.AVCommandLineNode): label='Depth Maps SGM', description='Debug: Depth maps SGM', semantic='image', - value=desc.Node.internalFolder + '_depthMap_scale2_sgm.exr', + value=desc.Node.internalFolder + '_depthMap_sgm.exr', uid=[], group='', # do not export on the command line enabled=lambda node: node.intermediateResults.exportIntermediateDepthSimMaps.value, From fada8788905d3f6185ef8ee5cf26adfebdb246ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20De=20Lillo?= Date: Fri, 14 Apr 2023 19:07:02 +0200 Subject: [PATCH 09/12] [nodes] DepthMap: Fix Thickness spelling error --- meshroom/nodes/aliceVision/DepthMap.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/meshroom/nodes/aliceVision/DepthMap.py b/meshroom/nodes/aliceVision/DepthMap.py index ee29979dfd..004e74471a 100644 --- a/meshroom/nodes/aliceVision/DepthMap.py +++ b/meshroom/nodes/aliceVision/DepthMap.py @@ -189,9 +189,9 @@ class DepthMap(desc.AVCommandLineNode): advanced=True, ), desc.FloatParam( - name='sgmDepthThiknessInflate', - label='Thikness Inflate', - description='Inflate factor to add margins to the depth thikness.', + name='sgmDepthThicknessInflate', + label='Thickness Inflate', + description='Inflate factor to add margins to the depth thickness.', value=0.0, range=(0.0, 2.0, 0.1), uid=[0], From 2e9668bf02d157478e7cf0af1a4bbf25484b31ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= Date: Thu, 8 Jun 2023 19:47:34 +0200 Subject: [PATCH 10/12] [nodes] DepthMap: Update the node's version --- meshroom/nodes/aliceVision/DepthMap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/nodes/aliceVision/DepthMap.py b/meshroom/nodes/aliceVision/DepthMap.py index 004e74471a..30f5dc3bba 100644 --- a/meshroom/nodes/aliceVision/DepthMap.py +++ b/meshroom/nodes/aliceVision/DepthMap.py @@ -1,4 +1,4 @@ -__version__ = "3.0" +__version__ = "4.0" from meshroom.core import desc From 8294235d39bcc67fb5ec1aa6cd209301694608d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= Date: Thu, 8 Jun 2023 19:48:22 +0200 Subject: [PATCH 11/12] [pipelines] Update DepthMap's version in templates --- meshroom/pipelines/cameraTracking.mg | 2 +- meshroom/pipelines/photogrammetry.mg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/meshroom/pipelines/cameraTracking.mg b/meshroom/pipelines/cameraTracking.mg index d37dc46884..1f3bf5e70e 100644 --- a/meshroom/pipelines/cameraTracking.mg +++ b/meshroom/pipelines/cameraTracking.mg @@ -7,7 +7,7 @@ "nodesVersions": { "FeatureExtraction": "1.1", "CameraInit": "9.0", - "DepthMap": "3.0", + "DepthMap": "4.0", "SfMTriangulation": "1.0", "ExportDistortion": "1.0", "DepthMapFilter": "3.0", diff --git a/meshroom/pipelines/photogrammetry.mg b/meshroom/pipelines/photogrammetry.mg index a8fb773ad1..272e1eff66 100644 --- a/meshroom/pipelines/photogrammetry.mg +++ b/meshroom/pipelines/photogrammetry.mg @@ -9,7 +9,7 @@ "MeshFiltering": "3.0", "Texturing": "6.0", "PrepareDenseScene": "3.0", - "DepthMap": "3.0", + "DepthMap": "4.0", "StructureFromMotion": "3.0", "CameraInit": "9.0", "ImageMatching": "2.0", From 3d68e5eafa9d99be8dd40cffebb690057a0a2e98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= Date: Fri, 9 Jun 2023 16:32:32 +0200 Subject: [PATCH 12/12] [nodes] DepthMap: Fix UIDs of intermediate export attributes --- meshroom/nodes/aliceVision/DepthMap.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meshroom/nodes/aliceVision/DepthMap.py b/meshroom/nodes/aliceVision/DepthMap.py index 30f5dc3bba..7959096567 100644 --- a/meshroom/nodes/aliceVision/DepthMap.py +++ b/meshroom/nodes/aliceVision/DepthMap.py @@ -529,7 +529,7 @@ class DepthMap(desc.AVCommandLineNode): label='Export Normal Maps', description='Export intermediate normal maps from the SGM and Refine steps.', value=False, - uid=[], + uid=[0], advanced=True, ), desc.BoolParam( @@ -553,7 +553,7 @@ class DepthMap(desc.AVCommandLineNode): label='Export Cut Volumes', description='Export intermediate similarity topographic cut volumes from the SGM and Refine steps.', value=False, - uid=[], + uid=[0], advanced=True, ), desc.BoolParam(