diff --git a/meshroom/nodes/aliceVision/ImageSegmentation.py b/meshroom/nodes/aliceVision/ImageSegmentation.py index 8912820b9a..3c99b05edf 100644 --- a/meshroom/nodes/aliceVision/ImageSegmentation.py +++ b/meshroom/nodes/aliceVision/ImageSegmentation.py @@ -23,7 +23,6 @@ class ImageSegmentation(desc.AVCommandLineNode): value="", uid=[0], ), - desc.File( name="modelPath", label="Segmentation Model", @@ -31,7 +30,6 @@ class ImageSegmentation(desc.AVCommandLineNode): value="${ALICEVISION_SEMANTIC_SEGMENTATION_MODEL}", uid=[0] ), - desc.ChoiceParam( name="validClasses", label="Classes", @@ -52,7 +50,13 @@ class ImageSegmentation(desc.AVCommandLineNode): exclusive=False, uid=[0], ), - + desc.BoolParam( + name="maskInvert", + label="Invert Masks", + description="Invert mask values. If selected, the pixels corresponding to the mask will be set to 0 instead of 255.", + value=False, + uid=[0], + ), desc.ChoiceParam( name="verboseLevel", label="Verbose Level", diff --git a/meshroom/nodes/aliceVision/MeshMasking.py b/meshroom/nodes/aliceVision/MeshMasking.py index 193d23610c..32dc526a3d 100644 --- a/meshroom/nodes/aliceVision/MeshMasking.py +++ b/meshroom/nodes/aliceVision/MeshMasking.py @@ -1,4 +1,4 @@ -__version__ = "1.0" +__version__ = "1.1" from meshroom.core import desc @@ -47,6 +47,15 @@ class MeshMasking(desc.AVCommandLineNode): label="Masks Folders", description="Use masks from specific folder(s). Filename should be the same or the image UID.", ), + desc.ChoiceParam( + name="maskExtension", + label="Mask Extension", + description="File extension for the masks to use.", + value="png", + values=["exr", "jpg", "png"], + exclusive=True, + uid=[0] + ), desc.IntParam( name="threshold", label="Threshold", diff --git a/meshroom/nodes/aliceVision/PrepareDenseScene.py b/meshroom/nodes/aliceVision/PrepareDenseScene.py index a1e1a7c0ca..556e98cd15 100644 --- a/meshroom/nodes/aliceVision/PrepareDenseScene.py +++ b/meshroom/nodes/aliceVision/PrepareDenseScene.py @@ -1,4 +1,4 @@ -__version__ = "3.0" +__version__ = "3.1" from meshroom.core import desc @@ -46,6 +46,15 @@ class PrepareDenseScene(desc.AVCommandLineNode): label="Masks Folders", description="Use masks from specific folder(s). Filename should be the same or the image UID.", ), + desc.ChoiceParam( + name="maskExtension", + label="Mask Extension", + description="File extension for the masks to use.", + value="png", + values=["exr", "jpg", "png"], + exclusive=True, + uid=[0] + ), desc.ChoiceParam( name="outputFileType", label="Output File Type", diff --git a/meshroom/pipelines/cameraTracking.mg b/meshroom/pipelines/cameraTracking.mg index 62531ea8ea..724edf8715 100644 --- a/meshroom/pipelines/cameraTracking.mg +++ b/meshroom/pipelines/cameraTracking.mg @@ -5,31 +5,31 @@ "fileVersion": "1.1", "template": true, "nodesVersions": { - "MeshDecimate": "1.0", - "Texturing": "6.0", - "ExportDistortion": "1.0", - "CameraInit": "9.0", - "ImageMatchingMultiSfM": "1.0", + "DepthMap": "4.0", + "SfMTriangulation": "1.0", "StructureFromMotion": "3.1", - "FeatureExtraction": "1.3", "ApplyCalibration": "1.0", - "SfMTriangulation": "1.0", - "Publish": "1.3", - "DepthMap": "4.0", - "DistortionCalibration": "3.0", - "DepthMapFilter": "3.0", - "ImageSegmentation": "1.0", - "CheckerboardDetection": "1.0", + "Texturing": "6.0", + "PrepareDenseScene": "3.1", + "KeyframeSelection": "4.1", "ScenePreview": "1.0", + "DepthMapFilter": "3.0", + "MeshDecimate": "1.0", + "MeshFiltering": "3.0", + "SfMTransfer": "2.1", + "Publish": "1.3", + "ImageMatchingMultiSfM": "1.0", + "FeatureMatching": "2.0", "Meshing": "7.0", - "PrepareDenseScene": "3.0", + "CameraInit": "9.0", "ImageMatching": "2.0", - "KeyframeSelection": "4.1", + "CheckerboardDetection": "1.0", "ConvertSfMFormat": "2.0", "ExportAnimatedCamera": "2.0", - "FeatureMatching": "2.0", - "SfMTransfer": "2.1", - "MeshFiltering": "3.0" + "DistortionCalibration": "3.0", + "ExportDistortion": "1.0", + "FeatureExtraction": "1.3", + "ImageSegmentation": "1.0" } }, "graph": { @@ -81,8 +81,7 @@ "inputs": { "input": "{ApplyCalibration_1.output}", "masksFolder": "{ImageSegmentation_1.output}", - "maskExtension": "exr", - "maskInvert": true + "maskExtension": "exr" }, "internalInputs": { "color": "#575963" @@ -193,7 +192,11 @@ 0 ], "inputs": { - "input": "{SfMTriangulation_1.output}" + "input": "{SfMTriangulation_1.output}", + "masksFolders": [ + "{ImageSegmentation_1.output}" + ], + "maskExtension": "exr" }, "internalInputs": { "color": "#3f3138" @@ -407,6 +410,20 @@ "color": "#80766f" } }, + "ImageSegmentation_1": { + "nodeType": "ImageSegmentation", + "position": [ + 0, + 200 + ], + "inputs": { + "input": "{CameraInit_1.output}", + "maskInvert": true + }, + "internalInputs": { + "color": "#575963" + } + }, "StructureFromMotion_2": { "nodeType": "StructureFromMotion", "position": [ @@ -489,19 +506,6 @@ "label": "FeatureMatchingFramesToKeyframes", "color": "#80766f" } - }, - "ImageSegmentation_1": { - "nodeType": "ImageSegmentation", - "position": [ - 0, - 200 - ], - "inputs": { - "input": "{CameraInit_1.output}" - }, - "internalInputs": { - "color": "#575963" - } } } } \ No newline at end of file diff --git a/meshroom/pipelines/photogrammetryAndCameraTracking.mg b/meshroom/pipelines/photogrammetryAndCameraTracking.mg index 342521dd2b..d345cb3200 100644 --- a/meshroom/pipelines/photogrammetryAndCameraTracking.mg +++ b/meshroom/pipelines/photogrammetryAndCameraTracking.mg @@ -5,29 +5,29 @@ "fileVersion": "1.1", "template": true, "nodesVersions": { - "MeshDecimate": "1.0", - "Texturing": "6.0", - "ExportDistortion": "1.0", - "CameraInit": "9.0", - "ImageMatchingMultiSfM": "1.0", + "DepthMap": "4.0", "StructureFromMotion": "3.1", - "FeatureExtraction": "1.3", "ApplyCalibration": "1.0", - "Publish": "1.3", - "DepthMap": "4.0", - "DistortionCalibration": "3.0", - "DepthMapFilter": "3.0", - "ImageSegmentation": "1.0", - "CheckerboardDetection": "1.0", + "Texturing": "6.0", + "PrepareDenseScene": "3.1", + "KeyframeSelection": "4.1", "ScenePreview": "1.0", + "DepthMapFilter": "3.0", + "MeshDecimate": "1.0", + "MeshFiltering": "3.0", + "Publish": "1.3", + "ImageMatchingMultiSfM": "1.0", + "FeatureMatching": "2.0", "Meshing": "7.0", - "PrepareDenseScene": "3.0", + "CameraInit": "9.0", "ImageMatching": "2.0", - "KeyframeSelection": "4.1", + "CheckerboardDetection": "1.0", "ConvertSfMFormat": "2.0", "ExportAnimatedCamera": "2.0", - "FeatureMatching": "2.0", - "MeshFiltering": "3.0" + "DistortionCalibration": "3.0", + "ExportDistortion": "1.0", + "FeatureExtraction": "1.3", + "ImageSegmentation": "1.0" } }, "graph": { @@ -52,8 +52,7 @@ "inputs": { "input": "{ApplyCalibration_1.output}", "masksFolder": "{ImageSegmentation_1.output}", - "maskExtension": "exr", - "maskInvert": true + "maskExtension": "exr" }, "internalInputs": { "color": "#575963" @@ -288,6 +287,20 @@ "color": "#80766f" } }, + "ImageSegmentation_1": { + "nodeType": "ImageSegmentation", + "position": [ + 0, + 200 + ], + "inputs": { + "input": "{CameraInit_1.output}", + "maskInvert": true + }, + "internalInputs": { + "color": "#575963" + } + }, "StructureFromMotion_2": { "nodeType": "StructureFromMotion", "position": [ @@ -565,19 +578,6 @@ "internalInputs": { "color": "#575963" } - }, - "ImageSegmentation_1": { - "nodeType": "ImageSegmentation", - "position": [ - 0, - 200 - ], - "inputs": { - "input": "{CameraInit_1.output}" - }, - "internalInputs": { - "color": "#575963" - } } } } \ No newline at end of file