From 241bead35c782a0e26d9d46f8eb8656982b1b9cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= Date: Thu, 15 Jun 2023 13:06:03 +0200 Subject: [PATCH 1/5] [nodes] A-C: Harmonize and improve labels and descriptions Use CamelCase for all labels, always end descriptions with periods, and replace the mixed use of single and double quotes with double quotes only. --- .../nodes/aliceVision/ApplyCalibration.py | 33 ++- .../nodes/aliceVision/CameraCalibration.py | 162 ++++++----- meshroom/nodes/aliceVision/CameraInit.py | 269 +++++++++--------- .../nodes/aliceVision/CameraLocalization.py | 267 ++++++++--------- .../nodes/aliceVision/CameraRigCalibration.py | 212 +++++++------- .../aliceVision/CameraRigLocalization.py | 220 +++++++------- .../aliceVision/ColorCheckerCorrection.py | 70 +++-- .../aliceVision/ColorCheckerDetection.py | 38 ++- meshroom/nodes/aliceVision/ConvertMesh.py | 40 +-- .../nodes/aliceVision/ConvertSfMFormat.py | 90 +++--- 10 files changed, 745 insertions(+), 656 deletions(-) diff --git a/meshroom/nodes/aliceVision/ApplyCalibration.py b/meshroom/nodes/aliceVision/ApplyCalibration.py index 43c88b4e88..e50ee4839f 100644 --- a/meshroom/nodes/aliceVision/ApplyCalibration.py +++ b/meshroom/nodes/aliceVision/ApplyCalibration.py @@ -13,27 +13,36 @@ class ApplyCalibration(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='Input SfMData', - description='SfMData file.', - value='', + name="input", + label="SfMData", + description="Input SfMData file.", + value="", uid=[0], ), desc.File( - name='calibration', - label='Calibration', - description='Calibration SfMData file.', - value='', + name="calibration", + label="Calibration", + description="Calibration SfMData file.", + 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 = [ desc.File( - name='output', - label='SfMData File', - description='Path to the output SfMData file.', - value=desc.Node.internalFolder + 'sfmData.sfm', + name="output", + label="SMData", + description="Path to the output SfMData file.", + value=desc.Node.internalFolder + "sfmData.sfm", uid=[], ), ] diff --git a/meshroom/nodes/aliceVision/CameraCalibration.py b/meshroom/nodes/aliceVision/CameraCalibration.py index 86a647f04c..38af3adb83 100644 --- a/meshroom/nodes/aliceVision/CameraCalibration.py +++ b/meshroom/nodes/aliceVision/CameraCalibration.py @@ -7,123 +7,139 @@ class CameraCalibration(desc.AVCommandLineNode): commandLine = 'aliceVision_cameraCalibration {allParams}' category = 'Utils' + documentation = ''' + ''' inputs = [ desc.File( - name='input', - label='Input', - description='''Input images in one of the following form: - - folder containing images - - image sequence like "/path/to/seq.@.jpg" - - video file''', - value='', + name="input", + label="Input", + description="Input images in one of the following form:\n" + " - folder containing images.\n" + " - image sequence like \"/path/to/seq.@.jpg\".\n" + " - video file.", + value="", uid=[0], - ), + ), desc.ChoiceParam( - name='pattern', - label='Pattern', - description='''Type of pattern (CHESSBOARD, CIRCLES, ASYMMETRIC_CIRCLES, ASYMMETRIC_CCTAG).''', - value='CHESSBOARD', - values=['CHESSBOARD', 'CIRCLES', 'ASYMMETRIC_CIRCLES', 'ASYMMETRIC_CCTAG'], + name="pattern", + label="Pattern", + description="Type of pattern (CHESSBOARD, CIRCLES, ASYMMETRIC_CIRCLES, ASYMMETRIC_CCTAG).", + value="CHESSBOARD", + values=["CHESSBOARD", "CIRCLES", "ASYMMETRIC_CIRCLES", "ASYMMETRIC_CCTAG"], exclusive=True, uid=[0], - ), - desc.GroupAttribute(name="size", label="Size", description="Number of inner corners per one of board dimension like W H.", groupDesc=[ - desc.IntParam( - name='width', - label='Width', - description='', - value=7, - range=(0, 10000, 1), - uid=[0], + ), + desc.GroupAttribute( + name="size", + label="Size", + description="Number of inner corners per one of board dimension like W H.", + groupDesc=[ + desc.IntParam( + name="width", + label="Width", + description="", + value=7, + range=(0, 10000, 1), + uid=[0], ), - desc.IntParam( - name='height', - label='Height', - description='', - value=5, - range=(0, 10000, 1), - uid=[0], + desc.IntParam( + name="height", + label="Height", + description="", + value=5, + range=(0, 10000, 1), + uid=[0], ), - ]), + ] + ), desc.FloatParam( - name='squareSize', - label='Square Size', - description='''Size of the grid's square cells (mm).''', + name="squareSize", + label="Square Size", + description="Size of the grid's square cells (mm).", value=1.0, range=(0.0, 100.0, 1.0), uid=[0], - ), + ), desc.IntParam( - name='nbDistortionCoef', - label='Nb Distortion Coef', - description='''Number of distortion coefficient.''', + name="nbDistortionCoef", + label="Nb Distortion Coef", + description="Number of distortion coefficients.", value=3, range=(0, 5, 1), uid=[0], - ), + ), desc.IntParam( - name='maxFrames', - label='Max Frames', - description='''Maximal number of frames to extract from the video file.''', + name="maxFrames", + label="Max Frames", + description="Maximum number of frames to extract from the video file.", value=0, range=(0, 5, 1), uid=[0], - ), + ), desc.IntParam( - name='maxCalibFrames', - label='Max Calib Frames', - description='''Maximal number of frames to use to calibrate from the selected frames.''', + name="maxCalibFrames", + label="Max Calib Frames", + description="Maximum number of frames to use to calibrate from the selected frames.", value=100, range=(0, 1000, 1), uid=[0], - ), + ), desc.IntParam( - name='calibGridSize', - label='Calib Grid Size', - description='''Define the number of cells per edge.''', + name="calibGridSize", + label="Calib Grid Size", + description="Define the number of cells per edge.", value=10, range=(0, 50, 1), uid=[0], - ), + ), desc.IntParam( - name='minInputFrames', - label='Min Input Frames', - description='''Minimal number of frames to limit the refinement loop.''', + name="minInputFrames", + label="Min Input Frames", + description="Minimum number of frames to limit the refinement loop.", value=10, range=(0, 100, 1), uid=[0], - ), + ), desc.FloatParam( - name='maxTotalAvgErr', - label='Max Total Avg Err', - description='''Max Total Average Error.''', + name="maxTotalAvgErr", + label="Max Total Avg Err", + description="Maximum total average error.", value=0.10000000000000001, range=(0.0, 1.0, 0.01), uid=[0], - ), + ), desc.File( - name='debugRejectedImgFolder', - label='Debug Rejected Img Folder', - description='''Folder to export delete images during the refinement loop.''', - value='', + name="debugRejectedImgFolder", + label="Debug Rejected Img Folder", + description="Folder to export images that were deleted during the refinement loop.", + value="", uid=[0], - ), + ), desc.File( - name='debugSelectedImgFolder', - label='Debug Selected Img Folder', - description='''Folder to export debug images.''', - value='', + name="debugSelectedImgFolder", + label="Debug Selected Img Folder", + description="Folder to export debug images.", + 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 = [ desc.File( - name='output', - label='Output', - description='''Output filename for intrinsic [and extrinsic] parameters.''', - value=desc.Node.internalFolder + '/cameraCalibration.cal', + name="output", + label="Output", + description="Output filename for intrinsic [and extrinsic] parameters.", + value=desc.Node.internalFolder + "/cameraCalibration.cal", uid=[], - ), + ), ] diff --git a/meshroom/nodes/aliceVision/CameraInit.py b/meshroom/nodes/aliceVision/CameraInit.py index b64943b98a..84764376ef 100644 --- a/meshroom/nodes/aliceVision/CameraInit.py +++ b/meshroom/nodes/aliceVision/CameraInit.py @@ -11,86 +11,88 @@ from meshroom.multiview import FilesByType, findFilesByTypeInFolder Viewpoint = [ - desc.IntParam(name="viewId", label="Id", description="Image UID", value=-1, uid=[0], range=None), - desc.IntParam(name="poseId", label="Pose Id", description="Pose Id", value=-1, uid=[0], range=None), - desc.File(name="path", label="Image Path", description="Image Filepath", value="", uid=[0]), - desc.IntParam(name="intrinsicId", label="Intrinsic", description="Internal Camera Parameters", value=-1, uid=[0], range=None), - desc.IntParam(name="rigId", label="Rig", description="Rig Parameters", value=-1, uid=[0], range=None), - desc.IntParam(name="subPoseId", label="Rig Sub-Pose", description="Rig Sub-Pose Parameters", value=-1, uid=[0], range=None), + desc.IntParam(name="viewId", label="ID", description="Image UID.", value=-1, uid=[0], range=None), + desc.IntParam(name="poseId", label="Pose ID", description="Pose ID.", value=-1, uid=[0], range=None), + desc.File(name="path", label="Image Path", description="Image filepath.", value="", uid=[0]), + desc.IntParam(name="intrinsicId", label="Intrinsic", description="Internal camera parameters.", value=-1, uid=[0], range=None), + desc.IntParam(name="rigId", label="Rig", description="Rig parameters.", value=-1, uid=[0], range=None), + desc.IntParam(name="subPoseId", label="Rig Sub-Pose", description="Rig sub-pose parameters.", value=-1, uid=[0], range=None), desc.StringParam(name="metadata", label="Image Metadata", - description="The configuration of the Viewpoints is based on the images metadata.\n" + description="The configuration of the Viewpoints is based on the images' metadata.\n" "The important ones are:\n" - " * Focal Length: the focal length in mm.\n" - " * Make and Model: this information allows to convert the focal in mm into a focal length in pixel using an embedded sensor database.\n" - " * Serial Number: allows to uniquely identify a device so multiple devices with the same Make, Model can be differentiated and their internal parameters are optimized separately.", + " - Focal Length: the focal length in mm.\n" + " - Make and Model: this information allows to convert the focal in mm into a focal length in pixels using " + "an embedded sensor database.\n" + " - Serial Number: allows to uniquely identify a device so multiple devices with the same Make, Model can be " + "differentiated and their internal parameters are optimized separately.", value="", uid=[], advanced=True), ] Intrinsic = [ - desc.IntParam(name="intrinsicId", label="Id", description="Intrinsic UID", value=-1, uid=[0], range=None), + desc.IntParam(name="intrinsicId", label="ID", description="Intrinsic UID.", value=-1, uid=[0], range=None), desc.FloatParam(name="initialFocalLength", label="Initial Focal Length", - description="Initial Guess on the Focal Length (in pixels). \n" - "When we have an initial value from EXIF, this value is not accurate but cannot be wrong. \n" - "So this value is used to limit the range of possible values in the optimization. \n" - "If you put -1, this value will not be used and the focal length will not be bounded.", + description="Initial guess on the focal length (in pixels).\n" + "When we have an initial value from EXIF, this value is not accurate but it cannot be wrong.\n" + "So this value is used to limit the range of possible values in the optimization.\n" + "If this value is set to -1, it will not be used and the focal length will not be bounded.", value=-1.0, uid=[0], range=None), - desc.FloatParam(name="focalLength", label="Focal Length", description="Known/Calibrated Focal Length (in mm)", value=1000.0, uid=[0], range=(0.0, 10000.0, 1.0)), - desc.FloatParam(name="pixelRatio", label="pixel Ratio", description="ratio between pixel width and pixel height", value=1.0, uid=[0], range=(0.0, 10.0, 0.1)), - desc.BoolParam(name='pixelRatioLocked', label='Pixel ratio Locked', - description='the pixelRatio value is locked for estimation', + desc.FloatParam(name="focalLength", label="Focal Length", description="Known/calibrated focal length (in mm).", value=1000.0, uid=[0], range=(0.0, 10000.0, 1.0)), + desc.FloatParam(name="pixelRatio", label="Pixel Ratio", description="Ratio between the pixel width and the pixel height.", value=1.0, uid=[0], range=(0.0, 10.0, 0.1)), + desc.BoolParam(name='pixelRatioLocked', label='Pixel Ratio Locked', + description='The pixel ratio value is locked for estimation.', value=True, uid=[0]), desc.ChoiceParam(name="type", label="Camera Type", - description="Mathematical Model used to represent a camera:\n" - " * pinhole: Simplest projective camera model without optical distortion (focal and optical center).\n" - " * radial1: Pinhole camera with one radial distortion parameter\n" - " * radial3: Pinhole camera with 3 radial distortion parameters\n" - " * brown: Pinhole camera with 3 radial and 2 tangential distortion parameters\n" - " * fisheye4: Pinhole camera with 4 distortion parameters suited for fisheye optics (like 120deg FoV)\n" - " * equidistant_r3: Non-projective camera model suited for full-fisheye optics (like 180deg FoV)\n" - " * 3deanamorphic4: Pinhole camera with a 4 anamorphic distortion coefficients.\n" - " * 3declassicld: Pinhole camera with a 10 anamorphic distortion coefficients\n" - " * 3deradial4: Pinhole camera with 3DE radial4 model\n", - value="", values=['', 'pinhole', 'radial1', 'radial3', 'brown', 'fisheye4', 'equidistant_r3', '3deanamorphic4', '3declassicld', '3deradial4'], exclusive=True, uid=[0]), - desc.IntParam(name="width", label="Width", description="Image Width", value=0, uid=[0], range=(0, 10000, 1)), - desc.IntParam(name="height", label="Height", description="Image Height", value=0, uid=[0], range=(0, 10000, 1)), - desc.FloatParam(name="sensorWidth", label="Sensor Width", description="Sensor Width (mm)", value=36.0, uid=[0], range=(0.0, 1000.0, 1.0)), - desc.FloatParam(name="sensorHeight", label="Sensor Height", description="Sensor Height (mm)", value=24.0, uid=[0], range=(0.0, 1000.0, 1.0)), - desc.StringParam(name="serialNumber", label="Serial Number", description="Device Serial Number (Camera UID and Lens UID combined)", value="", uid=[0]), - desc.GroupAttribute(name="principalPoint", label="Principal Point", description="Position of the Optical Center in the Image (i.e. the sensor surface).", groupDesc=[ + description="Mathematical model used to represent a camera:\n" + " - pinhole: Simplest projective camera model without optical distortion (focal and optical center).\n" + " - radial1: Pinhole camera with one radial distortion parameter.\n" + " - radial3: Pinhole camera with 3 radial distortion parameters.\n" + " - brown: Pinhole camera with 3 radial and 2 tangential distortion parameters.\n" + " - fisheye4: Pinhole camera with 4 distortion parameters suited for fisheye optics (like 120deg FoV).\n" + " - equidistant_r3: Non-projective camera model suited for full-fisheye optics (like 180deg FoV).\n" + " - 3deanamorphic4: Pinhole camera with 4 anamorphic distortion coefficients.\n" + " - 3declassicld: Pinhole camera with 10 anamorphic distortion coefficients.\n" + " - 3deradial4: Pinhole camera with 3DE radial4 model.\n", + value="", values=["", "pinhole", "radial1", "radial3", "brown", "fisheye4", "equidistant_r3", "3deanamorphic4", "3declassicld", "3deradial4"], exclusive=True, uid=[0]), + desc.IntParam(name="width", label="Width", description="Image width.", value=0, uid=[0], range=(0, 10000, 1)), + desc.IntParam(name="height", label="Height", description="Image height.", value=0, uid=[0], range=(0, 10000, 1)), + desc.FloatParam(name="sensorWidth", label="Sensor Width", description="Sensor width (in mm).", value=36.0, uid=[0], range=(0.0, 1000.0, 1.0)), + desc.FloatParam(name="sensorHeight", label="Sensor Height", description="Sensor height (in mm).", value=24.0, uid=[0], range=(0.0, 1000.0, 1.0)), + desc.StringParam(name="serialNumber", label="Serial Number", description="Device serial number (Camera UID and Lens UID combined).", value="", uid=[0]), + desc.GroupAttribute(name="principalPoint", label="Principal Point", description="Position of the optical center in the image (i.e. the sensor surface).", groupDesc=[ desc.FloatParam(name="x", label="x", description="", value=0.0, uid=[0], range=(0.0, 10000.0, 1.0)), desc.FloatParam(name="y", label="y", description="", value=0.0, uid=[0], range=(0.0, 10000.0, 1.0)), - ]), + ]), desc.ChoiceParam(name="initializationMode", label="Initialization Mode", - description="Defines how this Intrinsic was initialized:\n" - " * calibrated: calibrated externally.\n" - " * estimated: estimated from metadata and/or sensor width \n" - " * unknown: unknown camera parameters (can still have default value guess)\n" - " * none: not set", + description="Defines how this intrinsic was initialized:\n" + " - calibrated: calibrated externally.\n" + " - estimated: estimated from metadata and/or sensor width.\n" + " - unknown: unknown camera parameters (can still have default value guess).\n" + " - none: not set.", values=("calibrated", "estimated", "unknown", "none"), value="none", exclusive=True, uid=[0], - ), + ), desc.ChoiceParam(name="distortionInitializationMode", label="Distortion Initialization Mode", - description="Defines how the distortion model and parameters was initialized:\n" - " * calibrated: calibrated externally.\n" - " * estimated: estimated from a database of generic calibration \n" - " * unknown: unknown camera parameters (can still have default value guess)\n" - " * none: not set", + description="Defines how the distortion model and parameters were initialized:\n" + " - calibrated: calibrated externally.\n" + " - estimated: estimated from a database of generic calibration.\n" + " - unknown: unknown camera parameters (can still have default value guess).\n" + " - none: not set.", values=("calibrated", "estimated", "unknown", "none"), value="none", exclusive=True, uid=[0], - ), + ), desc.ListAttribute( name="distortionParams", elementDesc=desc.FloatParam(name="p", label="", description="", value=0.0, uid=[0], range=(-0.1, 0.1, 0.01)), label="Distortion Params", description="Distortion parameters.", - ), + ), desc.GroupAttribute( name="undistortionOffset", label="Undistortion Offset", @@ -99,16 +101,17 @@ desc.FloatParam(name="x", label="x", description="", value=0.0, uid=[0], range=(0.0, 10000.0, 1.0)), desc.FloatParam(name="y", label="y", description="", value=0.0, uid=[0], range=(0.0, 10000.0, 1.0)), ] - ), + ), desc.ListAttribute( name="undistortionParams", elementDesc=desc.FloatParam(name="p", label="", description="", value=0.0, uid=[0], range=(-0.1, 0.1, 0.01)), label="Undistortion Params", description="Undistortion parameters." - ), - desc.BoolParam(name='locked', label='Locked', - description='If the camera has been calibrated, the internal camera parameters (intrinsics) can be locked. It should improve robustness and speedup the reconstruction.', - value=False, uid=[0]), + ), + desc.BoolParam(name="locked", label="Locked", + description="If the camera has been calibrated, the internal camera parameters (intrinsics) can be locked. It should improve robustness and speed-up the reconstruction.", + value=False, uid=[0] + ), ] def readSfMData(sfmFile): @@ -163,151 +166,153 @@ class CameraInit(desc.AVCommandLineNode, desc.InitNode): category = 'Sparse Reconstruction' documentation = ''' This node describes your dataset. It lists the Viewpoints candidates, the guess about the type of optic, the initial focal length -and which images are sharing the same internal camera parameters, as well as potential cameras rigs. +and which images are sharing the same internal camera parameters, as well as potential camera rigs. -When you import new images into Meshroom, this node is automatically configured from the analysis of the image metadata. +When you import new images into Meshroom, this node is automatically configured from the analysis of the images' metadata. The software can support images without any metadata but it is recommended to have them for robustness. ### Metadata -Metadata allows images to be grouped together and provides an initialization of the focal length (in pixel unit). -The metadata needed are: +Metadata allow images to be grouped together and provide an initialization of the focal length (in pixel unit). +The needed metadata are: * **Focal Length**: the focal length in mm. - * **Make** & **Model**: this information allows to convert the focal in mm into a focal length in pixel using an embedded sensor database. + * **Make** & **Model**: this information allows to convert the focal in mm into a focal length in pixels using an embedded sensor database. * **Serial Number**: allows to uniquely identify a device so multiple devices with the same Make, Model can be differentiated and their internal parameters are optimized separately (in the photogrammetry case). ''' inputs = [ desc.ListAttribute( name="viewpoints", - elementDesc=desc.GroupAttribute(name="viewpoint", label="Viewpoint", description="", groupDesc=Viewpoint), + elementDesc=desc.GroupAttribute(name="viewpoint", label="Viewpoint", description="Viewpoint.", groupDesc=Viewpoint), label="Viewpoints", - description="Input viewpoints", + description="Input viewpoints.", group="", ), desc.ListAttribute( name="intrinsics", - elementDesc=desc.GroupAttribute(name="intrinsic", label="Intrinsic", description="", groupDesc=Intrinsic), + elementDesc=desc.GroupAttribute(name="intrinsic", label="Intrinsic", description="Intrinsic.", groupDesc=Intrinsic), label="Intrinsics", - description="Camera Intrinsics", + description="Camera intrinsics.", group="", ), desc.File( - name='sensorDatabase', - label='Sensor Database', - description='''Camera sensor width database path.''', - value='${ALICEVISION_SENSOR_DB}', + name="sensorDatabase", + label="Sensor Database", + description="Camera sensor with database path.", + value="${ALICEVISION_SENSOR_DB}", uid=[], ), desc.File( - name='lensCorrectionProfileInfo', - label='Lens Correction Profile Info', - description='''Lens Correction Profile filepath or database directory.''', - value='${ALICEVISION_LENS_PROFILE_INFO}', + name="lensCorrectionProfileInfo", + label="LCP Info", + description="Lens Correction Profile filepath or database directory.", + value="${ALICEVISION_LENS_PROFILE_INFO}", uid=[], ), desc.BoolParam( - name='lensCorrectionProfileSearchIgnoreCameraModel', - label='LCP Generic Search', - description='The lens name and camera maker are used to match the LCP database, but the camera model is ignored.', + name="lensCorrectionProfileSearchIgnoreCameraModel", + label="LCP Generic Search", + description="The lens name and camera maker are used to match the LCP database, but the camera model is ignored.", value=True, uid=[0], advanced=True, ), desc.FloatParam( - name='defaultFieldOfView', - label='Default Field Of View', - description='Default value for the field of view (in degree) used as an initialization when there is no focal or field of view in the image metadata.', + name="defaultFieldOfView", + label="Default Field Of View", + description="Default value for the field of view (in degrees) used as an initialization value when there is no focal or field of view in the image metadata.", value=45.0, range=(0.0, 180.0, 1.0), uid=[], ), desc.ChoiceParam( - name='groupCameraFallback', - label='Group Camera Fallback', - description="If there is no serial number in image metadata, devices cannot be accurately identified.\n" + name="groupCameraFallback", + label="Group Camera Fallback", + description="If there is no serial number in the images' metadata, devices cannot be accurately identified.\n" "Therefore, internal camera parameters cannot be shared among images reliably.\n" "A fallback grouping strategy must be chosen:\n" - " * global: group images from comparable devices (same make/model/focal) globally.\n" - " * folder: group images from comparable devices only within the same folder.\n" - " * image: never group images from comparable devices", - values=['global', 'folder', 'image'], - value='folder', + " - global: group images from comparable devices (same make/model/focal) globally.\n" + " - folder: group images from comparable devices only within the same folder.\n" + " - image: never group images from comparable devices.", + values=["global", "folder", "image"], + value="folder", exclusive=True, uid=[], ), desc.ChoiceParam( - name='allowedCameraModels', - label='Allowed Camera Models', - description='the Camera Models that can be attributed.', - value=['pinhole', 'radial1', 'radial3', 'brown', 'fisheye4', 'fisheye1', '3deanamorphic4', '3deradial4', '3declassicld'], - values=['pinhole', 'radial1', 'radial3', 'brown', 'fisheye4', 'fisheye1', '3deanamorphic4', '3deradial4', '3declassicld'], + name="allowedCameraModels", + label="Allowed Camera Models", + description='List of the camera models that can be attributed.', + value=["pinhole", "radial1", "radial3", "brown", "fisheye4", "fisheye1", "3deanamorphic4", "3deradial4", "3declassicld"], + values=["pinhole", "radial1", "radial3", "brown", "fisheye4", "fisheye1", "3deanamorphic4", "3deradial4", "3declassicld"], exclusive=False, uid=[], - joinChar=',', + joinChar=",", advanced=True, ), desc.ChoiceParam( - name='rawColorInterpretation', - label='RAW Color Interpretation', - description='Allows you to choose how raw data are color processed:\n' - 'None: Debayering without any color processing.\n' - 'LibRawNoWhiteBalancing: Simple neutralization.\n' - 'LibRawWhiteBalancing: Use internal white balancing from libraw.\n' - 'DCPLinearProcessing: Use DCP color profile.\n' - 'DCPMetadata: Same as None with DCP info added in metadata.', - value='DCPLinearProcessing' if os.environ.get('ALICEVISION_COLOR_PROFILE_DB', '') else 'LibRawWhiteBalancing', - values=['None', 'LibRawNoWhiteBalancing', 'LibRawWhiteBalancing', 'DCPLinearProcessing', 'DCPMetadata'], + name="rawColorInterpretation", + label="RAW Color Interpretation", + description="Allows to choose how RAW data are color processed:\n" + " - None: Debayering without any color processing.\n" + " - LibRawNoWhiteBalancing: Simple neutralization.\n" + " - LibRawWhiteBalancing: Use internal white balancing from libraw.\n" + " - DCPLinearProcessing: Use DCP color profile.\n" + " - DCPMetadata: Same as None with DCP info added in metadata.", + value="DCPLinearProcessing" if os.environ.get("ALICEVISION_COLOR_PROFILE_DB", "") else "LibRawWhiteBalancing", + values=["None", "LibRawNoWhiteBalancing", "LibRawWhiteBalancing", "DCPLinearProcessing", "DCPMetadata"], exclusive=True, uid=[0], ), desc.File( - name='colorProfileDatabase', - label='Color Profile Database', - description='''Color Profile database directory path.''', - value='${ALICEVISION_COLOR_PROFILE_DB}', - enabled=lambda node: node.rawColorInterpretation.value.startswith('DCP'), + name="colorProfileDatabase", + label="Color Profile Database", + description="Color Profile database directory path.", + value="${ALICEVISION_COLOR_PROFILE_DB}", + enabled=lambda node: node.rawColorInterpretation.value.startswith("DCP"), uid=[], ), desc.BoolParam( - name='errorOnMissingColorProfile', - label='Error On Missing DCP Color Profile', - description='When enabled, if no color profile is found for at least one image, then an error is thrown.\n' - 'When disabled, if no color profile is found for some images, it will fallback to libRawWhiteBalancing for those images.', + name="errorOnMissingColorProfile", + label="Error On Missing DCP Color Profile", + description="When enabled, if no color profile is found for at least one image, then an error is thrown.\n" + "When disabled, if no color profile is found for some images, it will fallback to libRawWhiteBalancing for those images.", value=True, - enabled=lambda node: node.rawColorInterpretation.value.startswith('DCP'), + enabled=lambda node: node.rawColorInterpretation.value.startswith("DCP"), uid=[0], ), desc.ChoiceParam( - name='viewIdMethod', - label='ViewId Method', + name="viewIdMethod", + label="ViewId Method", description="Allows to choose the way the viewID is generated:\n" - " * metadata : Generate viewId from image metadata.\n" - " * filename : Generate viewId from file names using regex.", - value='metadata', - values=['metadata', 'filename'], + " - metadata : Generate viewId from image metadata.\n" + " - filename : Generate viewId from filename using regex.", + value="metadata", + values=["metadata", "filename"], exclusive=True, uid=[], advanced=True, ), desc.StringParam( - name='viewIdRegex', - label='ViewId Regex', - description='Regex used to catch number used as viewId in filename.' - 'You should capture specific parts of the filename with parenthesis to define matching elements. (only number will works)\n' - 'Some examples of patterns:\n' - r' - Match the longest number at the end of filename (default value): ".*?(\d+)"' + '\n' + - r' - Match the first number found in filename : "(\d+).*"', - value=r'.*?(\d+)', + name="viewIdRegex", + label="ViewId Regex", + description="Regex used to catch number used as viewId in filename." + "You should capture specific parts of the filename with parentheses to define matching elements. (only numbers will work)\n" + "Some examples of patterns:\n" + " - Match the longest number at the end of the filename (default value): " + r'".*?(\d+)"' + "\n" + + " - Match the first number found in filename: " + r'"(\d+).*"', + value=r".*?(\d+)", uid=[], advanced=True, - enabled=lambda node: node.viewIdMethod.value == 'filename', + enabled=lambda node: node.viewIdMethod.value == "filename", ), 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=[], ), diff --git a/meshroom/nodes/aliceVision/CameraLocalization.py b/meshroom/nodes/aliceVision/CameraLocalization.py index 055b7687a9..ab65c4f4d1 100644 --- a/meshroom/nodes/aliceVision/CameraLocalization.py +++ b/meshroom/nodes/aliceVision/CameraLocalization.py @@ -8,218 +8,229 @@ class CameraLocalization(desc.AVCommandLineNode): commandLine = 'aliceVision_cameraLocalization {allParams}' category = 'Utils' + documentation = ''' + ''' inputs = [ desc.File( - name='sfmdata', - label='SfM Data', - description='''The sfm_data.json kind of file generated by AliceVision.''', - value='', + name="sfmdata", + label="SfMData", + description="The SfMData file generated by AliceVision.", + value="", uid=[0], - ), + ), desc.File( - name='mediafile', - label='Media File', - description='''The folder path or the filename for the media to track''', - value='', + name="mediafile", + label="Media File", + description="The folder path or the filename for the media to track.", + value="", uid=[0], - ), + ), desc.File( - name='visualDebug', - label='Visual Debug Folder', - description='''If a folder is provided it enables visual debug and saves all the debugging info in that folder''', - value='', + name="visualDebug", + label="Visual Debug Folder", + description="If a folder is provided, this enables visual debug and all the debugging information will be saved in that folder.", + value="", uid=[0], - ), + ), desc.File( - name='descriptorPath', - label='Descriptor Path', - description='''Folder containing the descriptors for all the images (ie the *.desc.)''', - value='', + name="descriptorPath", + label="Descriptor Path", + description="Folder containing the descriptors for all the images (ie. the *.desc.).", + value="", uid=[0], - ), + ), desc.ChoiceParam( - name='matchDescTypes', - label='Match Desc Types', - description='''Describer types to use for the matching.''', - value=['dspsift'], - values=['sift', 'sift_float', 'sift_upright', 'dspsift', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv'], + name="matchDescTypes", + label="Match Desc Types", + description="Describer types to use for the matching.", + value=["dspsift"], + values=["sift", "sift_float", "sift_upright", "dspsift", "akaze", "akaze_liop", "akaze_mldb", "cctag3", "cctag4", "sift_ocv", "akaze_ocv"], exclusive=False, uid=[0], - joinChar=',', + joinChar=",", ), desc.ChoiceParam( - name='preset', - label='Preset', - description='''Preset for the feature extractor when localizing a new image (low, medium, normal, high, ultra)''', - value='normal', - values=['low', 'medium', 'normal', 'high', 'ultra'], + name="preset", + label="Preset", + description="Preset for the feature extractor when localizing a new image (low, medium, normal, high, ultra).", + value="normal", + values=["low", "medium", "normal", "high", "ultra"], exclusive=True, uid=[0], - ), + ), desc.ChoiceParam( - name='resectionEstimator', - label='Resection Estimator', - description='''The type of *sac framework to use for resection (acransac, loransac)''', - value='acransac', - values=['acransac', 'loransac'], + name="resectionEstimator", + label="Resection Estimator", + description="The type of *sac framework to use for resection (acransac, loransac).", + value="acransac", + values=["acransac", "loransac"], exclusive=True, uid=[0], - ), + ), desc.ChoiceParam( - name='matchingEstimator', - label='Matching Estimator', - description='''The type of *sac framework to use for matching (acransac, loransac)''', - value='acransac', - values=['acransac', 'loransac'], + name="matchingEstimator", + label="Matching Estimator", + description="The type of *sac framework to use for matching (acransac, loransac).", + value="acransac", + values=["acransac", "loransac"], exclusive=True, uid=[0], - ), + ), desc.File( - name='calibration', - label='Calibration', - description='''Calibration file''', - value='', + name="calibration", + label="Calibration", + description="Calibration file.", + value="", uid=[0], - ), + ), desc.BoolParam( - name='refineIntrinsics', - label='Refine Intrinsics', - description='''Enable/Disable camera intrinsics refinement for each localized image''', + name="refineIntrinsics", + label="Refine Intrinsics", + description="Enable/Disable camera intrinsics refinement for each localized image.", value=False, uid=[0], - ), + ), desc.FloatParam( - name='reprojectionError', - label='Reprojection Error', - description='''Maximum reprojection error (in pixels) allowed for resectioning. If set to 0 it lets the ACRansac select an optimal value.''', + name="reprojectionError", + label="Reprojection Error", + description="Maximum reprojection error (in pixels) allowed for resectioning. If set to 0, it lets the ACRansac select an optimal value.", value=4.0, range=(0.1, 50.0, 0.1), uid=[0], - ), + ), desc.IntParam( - name='nbImageMatch', - label='Nb Image Match', - description='''[voctree] Number of images to retrieve in database''', + name="nbImageMatch", + label="Nb Image Match", + description="[voctree] Number of images to retrieve in database.", value=4, range=(1, 1000, 1), uid=[0], - ), + ), desc.IntParam( - name='maxResults', - label='Max Results', - description='''[voctree] For algorithm AllResults, it stops the image matching when this number of matched images is reached. If 0 it is ignored.''', + name="maxResults", + label="Max Results", + description="[voctree] For algorithm AllResults, it stops the image matching when this number of matched images is reached. If 0 it is ignored.", value=10, range=(1, 100, 1), uid=[0], - ), + ), desc.IntParam( - name='commonviews', - label='Commonviews', - description='''[voctree] Number of minimum images in which a point must be seen to be used in cluster tracking''', + name="commonviews", + label="Common Views", + description="[voctree] Number of minimum images in which a point must be seen to be used in cluster tracking.", value=3, range=(2, 50, 1), uid=[0], - ), + ), desc.File( - name='voctree', - label='Voctree', - description='''[voctree] Filename for the vocabulary tree''', - value='${ALICEVISION_VOCTREE}', + name="voctree", + label="Voctree", + description="[voctree] Filename for the vocabulary tree.", + value="${ALICEVISION_VOCTREE}", uid=[0], - ), + ), desc.File( - name='voctreeWeights', - label='Voctree Weights', - description='''[voctree] Filename for the vocabulary tree weights''', - value='', + name="voctreeWeights", + label="Voctree Weights", + description="[voctree] Filename for the vocabulary tree weights.", + value="", uid=[0], - ), + ), desc.ChoiceParam( - name='algorithm', - label='Algorithm', - description='''[voctree] Algorithm type: FirstBest, AllResults''', - value='AllResults', - values=['FirstBest', 'AllResults'], + name="algorithm", + label="Algorithm", + description="[voctree] Algorithm type: FirstBest, AllResults.", + value="AllResults", + values=["FirstBest", "AllResults"], exclusive=True, uid=[0], - ), + ), desc.FloatParam( - name='matchingError', - label='Matching Error', - description='''[voctree] Maximum matching error (in pixels) allowed for image matching with geometric verification. If set to 0 it lets the ACRansac select an optimal value.''', + name="matchingError", + label="Matching Error", + description="[voctree] Maximum matching error (in pixels) allowed for image matching with geometric verification. If set to 0, it lets the ACRansac select an optimal value.", value=4.0, range=(0.0, 50.0, 1.0), uid=[0], - ), + ), desc.IntParam( - name='nbFrameBufferMatching', - label='Nb Frame Buffer Matching', - description='''[voctree] Number of previous frame of the sequence to use for matching (0 = Disable)''', + name="nbFrameBufferMatching", + label="Nb Frame Buffer Matching", + description="[voctree] Number of previous frames of the sequence to use for matching (0 = Disable).", value=10, range=(0, 100, 1), uid=[0], - ), + ), desc.BoolParam( - name='robustMatching', - label='Robust Matching', - description='''[voctree] Enable/Disable the robust matching between query and database images, all putative matches will be considered.''', + name="robustMatching", + label="Robust Matching", + description="[voctree] Enable/Disable the robust matching between query and database images, all putative matches will be considered.", value=True, uid=[0], - ), + ), desc.IntParam( - name='nNearestKeyFrames', - label='N Nearest Key Frames', - description='''[cctag] Number of images to retrieve in the database Parameters specific for final (optional) bundle adjustment optimization of the sequence:''', + name="nNearestKeyFrames", + label="N Nearest Key Frames", + description="[cctag] Number of images to retrieve in the database. Parameters specific for final (optional) bundle adjustment optimization of the sequence.", value=5, range=(1, 100, 1), uid=[0], - ), + ), desc.StringParam( - name='globalBundle', - label='Global Bundle', - description='''[bundle adjustment] If --refineIntrinsics is not set, this option allows to run a final global bundle adjustment to refine the scene.''', - value='', + name="globalBundle", + label="Global Bundle", + description="[bundle adjustment] If --refineIntrinsics is not set, this option allows to run a final global bundle adjustment to refine the scene.", + value="", uid=[0], - ), + ), desc.BoolParam( - name='noDistortion', - label='No Distortion', - description='''[bundle adjustment] It does not take into account distortion during the BA, it consider the distortion coefficients all equal to 0''', + name="noDistortion", + label="No Distortion", + description="[bundle adjustment] It does not take into account distortion during the BA, it considers the distortion coefficients to all be equal to 0.", value=False, uid=[0], - ), + ), desc.BoolParam( - name='noBArefineIntrinsics', - label='No BA Refine Intrinsics', - description='''[bundle adjustment] It does not refine intrinsics during BA''', + name="noBArefineIntrinsics", + label="No BA Refine Intrinsics", + description="[bundle adjustment] If set to true, does not refine intrinsics during BA.", value=False, uid=[0], - ), + ), desc.IntParam( - name='minPointVisibility', - label='Min Point Visibility', - description='''[bundle adjustment] Minimum number of observation that a point must have in order to be considered for bundle adjustment''', + name="minPointVisibility", + label="Min Point Visibility", + description="[bundle adjustment] Minimum number of observations that a point must have in order to be considered for bundle adjustment.", value=2, range=(2, 50, 1), 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='outputAlembic', - label='Alembic', - description='''Filename for the SfMData export file (where camera poses will be stored)''', - value=desc.Node.internalFolder + 'trackedCameras.abc', + name="outputAlembic", + label="Alembic", + description="Filename for the SfMData export file (where camera poses will be stored).", + value=desc.Node.internalFolder + "trackedCameras.abc", uid=[], - ), + ), desc.File( - name='outputJSON', - label='JSON', - description='''Filename for the localization results as .json''', - value=desc.Node.internalFolder + 'trackedCameras.json', + name="outputJSON", + label="JSON File", + description="Filename for the localization results as .json.", + value=desc.Node.internalFolder + "trackedCameras.json", uid=[], - ), + ), ] diff --git a/meshroom/nodes/aliceVision/CameraRigCalibration.py b/meshroom/nodes/aliceVision/CameraRigCalibration.py index b575ea0db8..ac04acf46e 100644 --- a/meshroom/nodes/aliceVision/CameraRigCalibration.py +++ b/meshroom/nodes/aliceVision/CameraRigCalibration.py @@ -8,166 +8,180 @@ class CameraRigCalibration(desc.AVCommandLineNode): commandLine = 'aliceVision_rigCalibration {allParams}' category = 'Utils' + documentation = ''' + ''' inputs = [ desc.File( - name='sfmdata', - label='SfM Data', - description='''The sfmData file.''', - value='', + name="sfmdata", + label='SfMData', + description="Input SfMData file.", + value="", uid=[0], - ), + ), desc.File( - name='mediapath', - label='Media Path', - description='''The path to the video file, the folder of the image sequence or a text file (one image path per line) for each camera of the rig (eg. --mediapath /path/to/cam1.mov /path/to/cam2.mov).''', - value='', + name="mediapath", + label="Media Path", + description="The path to the video file, the folder of the image sequence or a text file\n" + "(one image path per line) for each camera of the rig (eg. --mediapath /path/to/cam1.mov /path/to/cam2.mov).", + value="", uid=[0], - ), + ), desc.File( - name='cameraIntrinsics', - label='Camera Intrinsics', - description='''The intrinsics calibration file for each camera of the rig. (eg. --cameraIntrinsics /path/to/calib1.txt /path/to/calib2.txt).''', - value='', + name="cameraIntrinsics", + label="Camera Intrinsics", + description="The intrinsics calibration file for each camera of the rig (eg. --cameraIntrinsics /path/to/calib1.txt /path/to/calib2.txt).", + value="", uid=[0], - ), + ), desc.File( - name='export', - label='Export', - description='''Filename for the alembic file containing the rig poses with the 3D points. It also saves a file for each camera named 'filename.cam##.abc'.''', - value='trackedcameras.abc', + name="export", + label="Export File", + description="Filename for the alembic file containing the rig poses with the 3D points. It also saves a file for each camera named 'filename.cam##.abc'.", + value="trackedcameras.abc", uid=[0], - ), + ), desc.File( - name='descriptorPath', - label='Descriptor Path', - description='''Folder containing the .desc.''', - value='', + name="descriptorPath", + label="Descriptor Path", + description="Folder containing the .desc.", + value="", uid=[0], - ), + ), desc.ChoiceParam( - name='matchDescTypes', - label='Match Describer Types', - description='''The describer types to use for the matching''', - value=['dspsift'], - values=['sift', 'sift_float', 'sift_upright', 'dspsift', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv'], + name="matchDescTypes", + label="Match Describer Types", + description="The describer types to use for the matching.", + value=["dspsift"], + values=["sift", "sift_float", "sift_upright", "dspsift", "akaze", "akaze_liop", "akaze_mldb", "cctag3", "cctag4", "sift_ocv", "akaze_ocv"], exclusive=False, uid=[0], - joinChar=',', + joinChar=",", ), desc.ChoiceParam( - name='preset', - label='Preset', - description='''Preset for the feature extractor when localizing a new image (low, medium, normal, high, ultra)''', - value='normal', - values=['low', 'medium', 'normal', 'high', 'ultra'], + name="preset", + label="Preset", + description="Preset for the feature extractor when localizing a new image (low, medium, normal, high, ultra).", + value="normal", + values=["low", "medium", "normal", "high", "ultra"], exclusive=True, uid=[0], - ), + ), desc.ChoiceParam( - name='resectionEstimator', - label='Resection Estimator', - description='''The type of *sac framework to use for resection (acransac,loransac)''', - value='acransac', - values=['acransac', 'loransac'], + name="resectionEstimator", + label="Resection Estimator", + description="The type of *sac framework to use for resection (acransac, loransac).", + value="acransac", + values=["acransac", "loransac"], exclusive=True, uid=[0], - ), + ), desc.ChoiceParam( - name='matchingEstimator', - label='Matching Estimator', - description='''The type of *sac framework to use for matching (acransac,loransac)''', - value='acransac', - values=['acransac', 'loransac'], + name="matchingEstimator", + label="Matching Estimator", + description="The type of *sac framework to use for matching (acransac, loransac).", + value="acransac", + values=["acransac", "loransac"], exclusive=True, uid=[0], - ), + ), desc.StringParam( - name='refineIntrinsics', - label='Refine Intrinsics', - description='''Enable/Disable camera intrinsics refinement for each localized image''', - value='', + name="refineIntrinsics", + label="Refine Intrinsics", + description="Enable/Disable camera intrinsics refinement for each localized image.", + value="", uid=[0], - ), + ), desc.FloatParam( - name='reprojectionError', - label='Reprojection Error', - description='''Maximum reprojection error (in pixels) allowed for resectioning. If set to 0 it lets the ACRansac select an optimal value.''', + name="reprojectionError", + label="Reprojection Error", + description="Maximum reprojection error (in pixels) allowed for resectioning.\n" + "If set to 0, it lets the ACRansac select an optimal value.", value=4.0, range=(0.0, 10.0, 0.1), uid=[0], - ), + ), desc.IntParam( - name='maxInputFrames', - label='Max Input Frames', - description='''Maximum number of frames to read in input. 0 means no limit.''', + name="maxInputFrames", + label="Max Input Frames", + description="Maximum number of frames to read in input. 0 means no limit.", value=0, range=(0, 1000, 1), uid=[0], - ), + ), desc.File( - name='voctree', - label='Voctree', - description='''[voctree] Filename for the vocabulary tree''', - value='${ALICEVISION_VOCTREE}', + name="voctree", + label="Voctree", + description="[voctree] Filename for the vocabulary tree.", + value="${ALICEVISION_VOCTREE}", uid=[0], - ), + ), desc.File( - name='voctreeWeights', - label='Voctree Weights', - description='''[voctree] Filename for the vocabulary tree weights''', - value='', + name="voctreeWeights", + label="Voctree Weights", + description="[voctree] Filename for the vocabulary tree weights.", + value="", uid=[0], - ), + ), desc.ChoiceParam( - name='algorithm', - label='Algorithm', - description='''[voctree] Algorithm type: {FirstBest,AllResults}''', - value='AllResults', - values=['FirstBest', 'AllResults'], + name="algorithm", + label="Algorithm", + description="[voctree] Algorithm type: {FirstBest, AllResults}.", + value="AllResults", + values=["FirstBest", "AllResults"], exclusive=True, uid=[0], - ), + ), desc.IntParam( - name='nbImageMatch', - label='Nb Image Match', - description='''[voctree] Number of images to retrieve in the database''', + name="nbImageMatch", + label="Nb Image Match", + description="[voctree] Number of images to retrieve in the database.", value=4, range=(0, 50, 1), uid=[0], - ), + ), desc.IntParam( - name='maxResults', - label='Max Results', - description='''[voctree] For algorithm AllResults, it stops the image matching when this number of matched images is reached. If 0 it is ignored.''', + name="maxResults", + label="Max Results", + description="[voctree] For algorithm AllResults, it stops the image matching when this number of matched images is reached. If set to 0, it is ignored.", value=10, range=(0, 100, 1), uid=[0], - ), + ), desc.FloatParam( - name='matchingError', - label='Matching Error', - description='''[voctree] Maximum matching error (in pixels) allowed for image matching with geometric verification. If set to 0 it lets the ACRansac select an optimal value.''', + name="matchingError", + label="Matching Error", + description="[voctree] Maximum matching error (in pixels) allowed for image matching with geometric verification.\n" + "If set to 0, it lets the ACRansac select an optimal value.", value=4.0, range=(0.0, 10.0, 0.1), uid=[0], - ), + ), desc.IntParam( - name='nNearestKeyFrames', - label='N Nearest Key Frames', - description='''[cctag] Number of images to retrieve in database''', + name="nNearestKeyFrames", + label="N Nearest Key Frames", + description="[cctag] Number of images to retrieve in database.", value=5, range=(0, 50, 1), 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='outfile', - label='File', - description='''The name of the file where to store the calibration data''', - value=desc.Node.internalFolder + 'cameraRigCalibration.rigCal', + name="outfile", + label="Output File", + description="The name of the file to store the calibration data in.", + value=desc.Node.internalFolder + "cameraRigCalibration.rigCal", uid=[], - ), + ), ] diff --git a/meshroom/nodes/aliceVision/CameraRigLocalization.py b/meshroom/nodes/aliceVision/CameraRigLocalization.py index 063acbbe38..e175c0c9c1 100644 --- a/meshroom/nodes/aliceVision/CameraRigLocalization.py +++ b/meshroom/nodes/aliceVision/CameraRigLocalization.py @@ -8,173 +8,187 @@ class CameraRigLocalization(desc.AVCommandLineNode): commandLine = 'aliceVision_rigLocalization {allParams}' category = 'Utils' + documentation = ''' + ''' inputs = [ desc.File( - name='sfmdata', - label='Sfm Data', - description='''The sfmData file.''', - value='', + name="sfmdata", + label="SfMData", + description="The input SfMData file.", + value="", uid=[0], - ), + ), desc.File( - name='mediapath', - label='Media Path', - description='''The path to the video file, the folder of the image sequence or a text file (one image path per line) for each camera of the rig (eg. --mediapath /path/to/cam1.mov /path/to/cam2.mov).''', - value='', + name="mediapath", + label="Media Path", + description="The path to the video file, the folder of the image sequence or a text file (one image path per line) for each camera of the rig (eg. --mediapath /path/to/cam1.mov /path/to/cam2.mov).", + value="", uid=[0], - ), + ), desc.File( - name='calibration', - label='Rig Calibration File', - description='''The file containing the calibration data for the rig (subposes)''', - value='', + name="calibration", + label="Rig Calibration File", + description="The file containing the calibration data for the rig (subposes).", + value="", uid=[0], - ), + ), desc.File( - name='cameraIntrinsics', - label='Camera Intrinsics', - description='''The intrinsics calibration file for each camera of the rig. (eg. --cameraIntrinsics /path/to/calib1.txt /path/to/calib2.txt).''', - value='', + name="cameraIntrinsics", + label="Camera Intrinsics", + description="The intrinsics calibration file for each camera of the rig (eg. --cameraIntrinsics /path/to/calib1.txt /path/to/calib2.txt).", + value="", uid=[0], - ), + ), desc.File( - name='descriptorPath', - label='Descriptor Path', - description='''Folder containing the .desc.''', - value='', + name="descriptorPath", + label="Descriptor Path", + description="Folder containing the .desc.", + value="", uid=[0], - ), + ), desc.ChoiceParam( - name='matchDescTypes', - label='Match Describer Types', - description='''The describer types to use for the matching''', - value=['dspsift'], - values=['sift', 'sift_float', 'sift_upright', 'dspsift', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv'], + name="matchDescTypes", + label="Match Describer Types", + description="The describer types to use for the matching.", + value=["dspsift"], + values=["sift", "sift_float", "sift_upright", "dspsift", "akaze", "akaze_liop", "akaze_mldb", "cctag3", "cctag4", "sift_ocv", "akaze_ocv"], exclusive=False, uid=[0], - joinChar=',', + joinChar=",", ), desc.ChoiceParam( - name='preset', - label='Preset', - description='''Preset for the feature extractor when localizing a new image (low, medium, normal, high, ultra)''', - value='normal', - values=['low', 'medium', 'normal', 'high', 'ultra'], + name="preset", + label="Preset", + description="Preset for the feature extractor when localizing a new image (low, medium, normal, high, ultra).", + value="normal", + values=["low", "medium", "normal", "high", "ultra"], exclusive=True, uid=[0], - ), + ), desc.ChoiceParam( - name='resectionEstimator', - label='Resection Estimator', - description='''The type of *sac framework to use for resection (acransac, loransac)''', - value='acransac', - values=['acransac', 'loransac'], + name="resectionEstimator", + label="Resection Estimator", + description="The type of *sac framework to use for resection (acransac, loransac).", + value="acransac", + values=["acransac", "loransac"], exclusive=True, uid=[0], - ), + ), desc.ChoiceParam( - name='matchingEstimator', - label='Matching Estimator', - description='''The type of *sac framework to use for matching (acransac, loransac)''', - value='acransac', - values=['acransac', 'loransac'], + name="matchingEstimator", + label="Matching Estimator", + description="The type of *sac framework to use for matching (acransac, loransac).", + value="acransac", + values=["acransac", "loransac"], exclusive=True, uid=[0], - ), + ), desc.StringParam( - name='refineIntrinsics', - label='Refine Intrinsics', - description='''Enable/Disable camera intrinsics refinement for each localized image''', - value='', + name="refineIntrinsics", + label="Refine Intrinsics", + description="Enable/Disable camera intrinsics refinement for each localized image.", + value="", uid=[0], - ), + ), desc.FloatParam( - name='reprojectionError', - label='Reprojection Error', - description='''Maximum reprojection error (in pixels) allowed for resectioning. If set to 0 it lets the ACRansac select an optimal value.''', + name="reprojectionError", + label="Reprojection Error", + description="Maximum reprojection error (in pixels) allowed for resectioning.\n" + "If set to 0, it lets the ACRansac select an optimal value.", value=4.0, range=(0.0, 10.0, 0.1), uid=[0], - ), + ), desc.BoolParam( - name='useLocalizeRigNaive', - label='Use Localize Rig Naive', - description='''Enable/Disable the naive method for rig localization: naive method tries to localize each camera separately.''', + name="useLocalizeRigNaive", + label="Use Localize Rig Naive", + description="Enable/Disable the naive method for rig localization: naive method tries to localize each camera separately.", value=False, uid=[0], - ), + ), desc.FloatParam( - name='angularThreshold', - label='Angular Threshold', - description='''The maximum angular threshold in degrees between feature bearing vector and 3D point direction. Used only with the opengv method.''', + name="angularThreshold", + label="Angular Threshold", + description="The maximum angular threshold in degrees between feature bearing vector and 3D point direction. Used only with the opengv method.", value=0.1, range=(0.0, 10.0, 0.01), uid=[0], - ), + ), desc.File( - name='voctree', - label='Voctree', - description='''[voctree] Filename for the vocabulary tree''', - value='${ALICEVISION_VOCTREE}', + name="voctree", + label="Voctree", + description="[voctree] Filename for the vocabulary tree.""", + value="${ALICEVISION_VOCTREE}", uid=[0], - ), + ), desc.File( - name='voctreeWeights', - label='Voctree Weights', - description='''[voctree] Filename for the vocabulary tree weights''', - value='', + name="voctreeWeights", + label="Voctree Weights", + description="[voctree] Filename for the vocabulary tree weights.", + value="", uid=[0], - ), + ), desc.ChoiceParam( - name='algorithm', - label='Algorithm', - description='''[voctree] Algorithm type: {FirstBest,AllResults}''', - value='AllResults', - values=['FirstBest', 'AllResults'], + name="algorithm", + label="Algorithm", + description="[voctree] Algorithm type: {FirstBest, AllResults}.", + value="AllResults", + values=["FirstBest", "AllResults"], exclusive=True, uid=[0], - ), + ), desc.IntParam( - name='nbImageMatch', - label='Nb Image Match', - description='''[voctree] Number of images to retrieve in the database''', + name="nbImageMatch", + label="Nb Image Match", + description="[voctree] Number of images to retrieve in the database.", value=4, range=(0, 100, 1), uid=[0], - ), + ), desc.IntParam( - name='maxResults', - label='Max Results', - description='''[voctree] For algorithm AllResults, it stops the image matching when this number of matched images is reached. If 0 it is ignored.''', + name="maxResults", + label="Max Results", + description="[voctree] For algorithm AllResults, it stops the image matching when this number of matched images is reached.\n" + "If set to 0, it is ignored.", value=10, range=(0, 100, 1), uid=[0], - ), + ), desc.FloatParam( - name='matchingError', - label='Matching Error', - description='''[voctree] Maximum matching error (in pixels) allowed for image matching with geometric verification. If set to 0 it lets the ACRansac select an optimal value.''', + name="matchingError", + label="Matching Error", + description="[voctree] Maximum matching error (in pixels) allowed for image matching with geometric verification.\n" + "If set to 0, it lets the ACRansac select an optimal value.", value=4.0, range=(0.0, 10.0, 0.1), uid=[0], - ), + ), desc.IntParam( - name='nNearestKeyFrames', - label='N Nearest Key Frames', - description='''[cctag] Number of images to retrieve in database''', + name="nNearestKeyFrames", + label="N Nearest Key Frames", + description="[cctag] Number of images to retrieve in database.", value=5, range=(0, 50, 1), 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='outputAlembic', - label='Alembic', - description='''Filename for the SfMData export file (where camera poses will be stored).''', - value=desc.Node.internalFolder + 'trackedcameras.abc', + name="outputAlembic", + label="Alembic", + description="Filename for the SfMData export file (where camera poses will be stored).", + value=desc.Node.internalFolder + "trackedcameras.abc", uid=[], - ), + ), ] diff --git a/meshroom/nodes/aliceVision/ColorCheckerCorrection.py b/meshroom/nodes/aliceVision/ColorCheckerCorrection.py index 2e879ca6ea..5f53bae573 100644 --- a/meshroom/nodes/aliceVision/ColorCheckerCorrection.py +++ b/meshroom/nodes/aliceVision/ColorCheckerCorrection.py @@ -23,56 +23,66 @@ class ColorCheckerCorrection(desc.AVCommandLineNode): inputs = [ desc.File( - name='inputData', - label='Color checker data', - description='Position and colorimetric data of the color checker', - value='', + name="inputData", + label="Color Checker Data", + description="Position and colorimetric data of the color checker.", + value="", uid=[0], ), desc.File( - name='input', - label='Input', - description='SfMData file input, image filenames or regex(es) on the image file path.\nsupported regex: \'#\' matches a single digit, \'@\' one or more digits, \'?\' one character and \'*\' zero or more.', - value='', + name="input", + label="Input", + description="Input SfMData file, image filenames or regex(es) on the image file path.\n" + "Supported regex: '#' matches a single digit, '@' one or more digits, '?' one character and '*' zero or more.", + value="", uid=[0], ), desc.ChoiceParam( - name='extension', - label='Output File Extension', - description='Output Image File Extension.', - value='exr', - values=['exr', ''], + name="extension", + label="Output File Extension", + description="Output image file extension.", + value="exr", + values=["exr", ""], exclusive=True, uid=[0], ), desc.ChoiceParam( - name='storageDataType', - label='Storage Data Type for EXR output', - description='Storage image data type:\n' - ' * float: Use full floating point (32 bits per channel)\n' - ' * half: Use half float (16 bits per channel)\n' - ' * halfFinite: Use half float, but clamp values to avoid non-finite values\n' - ' * auto: Use half float if all values can fit, else use full float\n', - value='float', - values=['float', 'half', 'halfFinite', 'auto'], + name="storageDataType", + label="EXR Storage Data Type", + description="Storage data type for EXR output:\n" + " - float: Use full floating point (32 bits per channel).\n" + " - half: Use half float (16 bits per channel).\n" + " - halfFinite: Use half float, but clamp values to avoid non-finite values.\n" + " - auto: Use half float if all values can fit, else use full float.", + value="float", + values=["float", "half", "halfFinite", "auto"], exclusive=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 = [ desc.File( - name='outSfMData', - label='SfmData', - description='Output sfmData.', - value=lambda attr: (desc.Node.internalFolder + os.path.basename(attr.node.input.value)) if (os.path.splitext(attr.node.input.value)[1] in ['.abc', '.sfm']) else '', + name="outSfMData", + label="SfMData", + description="Output SfMData.", + value=lambda attr: (desc.Node.internalFolder + os.path.basename(attr.node.input.value)) if (os.path.splitext(attr.node.input.value)[1] in [".abc", ".sfm"]) else "", uid=[], - group='', # do not export on the command line + group="", # do not export on the command line ), desc.File( - name='output', - label='Folder', - description='Output Images Folder.', + name="output", + label="Folder", + description="Output images folder.", value=desc.Node.internalFolder, uid=[], ), diff --git a/meshroom/nodes/aliceVision/ColorCheckerDetection.py b/meshroom/nodes/aliceVision/ColorCheckerDetection.py index 1c6822e910..d52379738d 100644 --- a/meshroom/nodes/aliceVision/ColorCheckerDetection.py +++ b/meshroom/nodes/aliceVision/ColorCheckerDetection.py @@ -28,36 +28,46 @@ class ColorCheckerDetection(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='Input', - description='SfMData file input, image filenames or regex(es) on the image file path.\nsupported regex: \'#\' matches a single digit, \'@\' one or more digits, \'?\' one character and \'*\' zero or more.', - value='', + name="input", + label="Input", + description="SfMData file input, image filenames or regex(es) on the image file path.\n" + "Supported regex: '#' matches a single digit, '@' one or more digits, '?' one character and '*' zero or more.", + value="", uid=[0], ), desc.IntParam( - name='maxCount', - label='Max count by image', - description='Max color charts count to detect in a single image', + name="maxCount", + label="Max Count By Image", + description="Maximum color charts count to detect in a single image.", value=1, range=(1, 3, 1), uid=[0], advanced=True, ), desc.BoolParam( - name='debug', - label='Debug', - description='If checked, debug data will be generated', + name="debug", + label="Debug", + description="If checked, debug data will be generated.", 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='outputData', - label='Color checker data', - description='Output position and colorimetric data extracted from detected color checkers in the images', - value=desc.Node.internalFolder + '/ccheckers.json', + name="outputData", + label="Color Checker Data", + description="Output position and colorimetric data extracted from detected color checkers in the images.", + value=desc.Node.internalFolder + "/ccheckers.json", uid=[], ), ] diff --git a/meshroom/nodes/aliceVision/ConvertMesh.py b/meshroom/nodes/aliceVision/ConvertMesh.py index 2bacbac365..d76097a9a1 100644 --- a/meshroom/nodes/aliceVision/ConvertMesh.py +++ b/meshroom/nodes/aliceVision/ConvertMesh.py @@ -11,28 +11,28 @@ class ConvertMesh(desc.AVCommandLineNode): inputs = [ desc.File( - name='inputMesh', - label='Input Mesh', - description='Input Mesh (*.obj, *.mesh, *.meshb, *.ply, *.off, *.stl).', - value='', + name="inputMesh", + label="Input Mesh", + description="Input mesh (*.obj, *.mesh, *.meshb, *.ply, *.off, *.stl).", + value="", uid=[0], ), desc.ChoiceParam( - name='outputMeshFileType', - label='File Type', - description='''Output Mesh Format (*.obj, *.gltf, *.fbx, *.stl).''', - value='obj', - values=('gltf', 'obj', 'fbx', 'stl'), + name="outputMeshFileType", + label="File Type", + description="Output mesh format (*.obj, *.gltf, *.fbx, *.stl).", + value="obj", + values=("gltf", "obj", "fbx", "stl"), exclusive=True, uid=[0], - group='', + group="", ), 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=[], ), @@ -40,10 +40,10 @@ class ConvertMesh(desc.AVCommandLineNode): outputs = [ desc.File( - name='output', - label='Mesh', - description='''Output mesh (*.obj, *.mesh, *.meshb, *.ply, *.off, *.stl).''', - value=desc.Node.internalFolder + 'mesh.' + '{outputMeshFileTypeValue}', + name="output", + label="Mesh", + description="Output mesh (*.obj, *.mesh, *.meshb, *.ply, *.off, *.stl).", + value=desc.Node.internalFolder + "mesh." + "{outputMeshFileTypeValue}", uid=[], - ), + ), ] diff --git a/meshroom/nodes/aliceVision/ConvertSfMFormat.py b/meshroom/nodes/aliceVision/ConvertSfMFormat.py index 0fd163f6ab..9bd2a8156f 100644 --- a/meshroom/nodes/aliceVision/ConvertSfMFormat.py +++ b/meshroom/nodes/aliceVision/ConvertSfMFormat.py @@ -15,97 +15,97 @@ class ConvertSfMFormat(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='Input', - description='SfMData file.', - value='', + name="input", + label="Input", + description="SfMData file.", + value="", uid=[0], ), desc.ChoiceParam( - name='fileExt', - label='SfM File Format', - description='SfM File Format', - value='abc', - values=['abc', 'sfm', 'json', 'ply', 'baf'], + name="fileExt", + label="SfM File Format", + description="Output SfM file format.", + value="abc", + values=["abc", "sfm", "json", "ply", "baf"], exclusive=True, uid=[0], - group='', # exclude from command line + group="", # exclude from command line ), desc.ChoiceParam( - name='describerTypes', - label='Describer Types', - description='Describer types to keep.', - value=['dspsift'], - values=['sift', 'sift_float', 'sift_upright', 'dspsift', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv', 'tag16h5', 'unknown'], + name="describerTypes", + label="Describer Types", + description="Describer types to keep.", + value=["dspsift"], + values=["sift", "sift_float", "sift_upright", "dspsift", "akaze", "akaze_liop", "akaze_mldb", "cctag3", "cctag4", "sift_ocv", "akaze_ocv", "tag16h5", "unknown"], exclusive=False, uid=[0], - joinChar=',', + joinChar=",", ), desc.ListAttribute( elementDesc=desc.File( name="imageId", - label="Image id", - description="", + label="Image ID", + description="UID or path of an image to add to the whitelist.", value="", uid=[0], ), name="imageWhiteList", label="Image White List", - description='image white list (uids or image paths).', + description="Image white list (UIDs or image paths).", ), desc.BoolParam( - name='views', - label='Views', - description='Export views.', + name="views", + label="Views", + description="Export views.", value=True, uid=[0], ), desc.BoolParam( - name='intrinsics', - label='Intrinsics', - description='Export intrinsics.', + name="intrinsics", + label="Intrinsics", + description="Export intrinsics.", value=True, uid=[0], ), desc.BoolParam( - name='extrinsics', - label='Extrinsics', - description='Export extrinsics.', + name="extrinsics", + label="Extrinsics", + description="Export extrinsics.", value=True, uid=[0], ), desc.BoolParam( - name='structure', - label='Structure', - description='Export structure.', + name="structure", + label="Structure", + description="Export structure.", value=True, uid=[0], ), desc.BoolParam( - name='observations', - label='Observations', - description='Export observations.', + name="observations", + label="Observations", + description="Export observations.", value=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'], + 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=[0], + uid=[], ), ] outputs = [ desc.File( - name='output', - label='Output', - description='Path to the output SfM Data file.', - value=desc.Node.internalFolder + 'sfm.{fileExtValue}', + name="output", + label="Output", + description="Path to the output SfMData file.", + value=desc.Node.internalFolder + "sfm.{fileExtValue}", uid=[], - ), + ), ] From 5c2865968d7b91b13c7966feae25233934db0954 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= Date: Fri, 16 Jun 2023 10:31:03 +0200 Subject: [PATCH 2/5] [nodes] D-G: Harmonize and improve labels and descriptions Use CamelCase for all labels, always end descriptions with periods, and replace the mixed use of single and double quotes with double quotes only. --- meshroom/nodes/aliceVision/DepthMap.py | 1046 +++++++++-------- meshroom/nodes/aliceVision/DepthMapFilter.py | 90 +- .../aliceVision/DistortionCalibration.py | 43 +- .../nodes/aliceVision/ExportAnimatedCamera.py | 98 +- .../aliceVision/ExportColoredPointCloud.py | 26 +- meshroom/nodes/aliceVision/ExportMatches.py | 44 +- meshroom/nodes/aliceVision/ExportMaya.py | 23 +- .../nodes/aliceVision/FeatureExtraction.py | 132 +-- meshroom/nodes/aliceVision/FeatureMatching.py | 178 +-- .../nodes/aliceVision/FeatureRepeatability.py | 108 +- meshroom/nodes/aliceVision/GlobalSfM.py | 118 +- 11 files changed, 971 insertions(+), 935 deletions(-) diff --git a/meshroom/nodes/aliceVision/DepthMap.py b/meshroom/nodes/aliceVision/DepthMap.py index 7959096567..d4443139d2 100644 --- a/meshroom/nodes/aliceVision/DepthMap.py +++ b/meshroom/nodes/aliceVision/DepthMap.py @@ -23,571 +23,579 @@ class DepthMap(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='SfMData', - description='SfMData file.', - value='', + name="input", + label="SfMData", + description="Input SfMData file.", + value="", uid=[0], ), desc.File( - name='imagesFolder', - label='Images Folder', - description='Use images from a specific folder instead of those specify in the SfMData file.\nFilename should be the image uid.', - value='', + name="imagesFolder", + label="Images Folder", + description="Use images from a specific folder instead of those specified in the SfMData file.\n" + "Filename should be the image UID.", + value="", uid=[0], ), desc.ChoiceParam( - name='downscale', - label='Downscale', - description='Downscale the input images to compute the depth map.\n' - 'Full resolution (downscale=1) gives the best result,\n' - 'but using a larger downscale will reduce computation time at the expense of quality.\n' - 'If the images are noisy, blurry or if the surfaces are challenging (weakly-textured or with specularities) a larger downscale may improve.', + name="downscale", + label="Downscale", + description="Downscale the input images to compute the depth map.\n" + "Full resolution (downscale = 1) gives the best result,\n" + "but using a larger downscale will reduce computation time at the expense of quality.\n" + "If the images are noisy, blurry or if the surfaces are challenging (weakly-textured or with specularities), a larger downscale may improve.", value=2, values=[1, 2, 4, 8, 16], exclusive=True, uid=[0], ), desc.FloatParam( - name='minViewAngle', - label='Min View Angle', - description='Minimum angle between two views (select the neighbouring cameras, select depth planes from epipolar segment point).', + name="minViewAngle", + label="Min View Angle", + description="Minimum angle between two views (select the neighbouring cameras, select depth planes from epipolar segment point).", value=2.0, range=(0.0, 10.0, 0.1), uid=[0], advanced=True, ), desc.FloatParam( - name='maxViewAngle', - label='Max View Angle', - description='Maximum angle between two views (select the neighbouring cameras, select depth planes from epipolar segment point).', + name="maxViewAngle", + label="Max View Angle", + description="Maximum angle between two views (select the neighbouring cameras, select depth planes from epipolar segment point).", value=70.0, range=(10.0, 120.0, 1.0), uid=[0], advanced=True, ), desc.GroupAttribute( - name='tiling', - label='Tiling', - description='Tiles are used to split the computation into fixed buffers to best fit the GPU.', + name="tiling", + label="Tiling", + description="Tiles are used to split the computation into fixed buffers to fit the GPU best.", group=None, groupDesc=[ desc.IntParam( - name='tileBufferWidth', - label='Buffer Width', - description='Maximum tile buffer width.', + name="tileBufferWidth", + label="Buffer Width", + description="Maximum tile buffer width.", value=1024, range=(-1, 2000, 10), uid=[0], ), desc.IntParam( - name='tileBufferHeight', - label='Buffer Height', - description='Maximum tile buffer height.', + name="tileBufferHeight", + label="Buffer Height", + description="Maximum tile buffer height.", value=1024, range=(-1, 2000, 10), uid=[0], ), desc.IntParam( - name='tilePadding', - label='Padding', - description='Buffer padding for overlapping tiles.', + name="tilePadding", + label="Padding", + description="Buffer padding for overlapping tiles.", value=64, range=(0, 500, 1), uid=[0], ), desc.BoolParam( - name='autoAdjustSmallImage', - label='Auto Adjust Small Image', - description='Automatically adjust depth map parameters if images are smaller than one tile (maxTCamsPerTile=maxTCams, adjust step if needed).', + name="autoAdjustSmallImage", + label="Auto Adjust Small Image", + description="Automatically adjust depth map parameters if images are smaller than one tile\n" + "(maxTCamsPerTile = maxTCams, adjust step if needed).", value=True, uid=[0], advanced=True, ), ]), desc.BoolParam( - name='chooseTCamsPerTile', - label='Choose Neighbour Cameras Per Tile', - description='Choose neighbour cameras per tile or globally to the image.', + name="chooseTCamsPerTile", + label="Choose Neighbour Cameras Per Tile", + description="Choose neighbour cameras per tile or globally to the image.", value=True, uid=[0], advanced=True, ), desc.IntParam( - name='maxTCams', - label='Max Nb Neighbour Cameras', - description='Maximum number of neighbour cameras per image.', + name="maxTCams", + label="Max Nb Neighbour Cameras", + description="Maximum number of neighbour cameras per image.", value=10, range=(1, 20, 1), uid=[0], ), desc.GroupAttribute( - name='sgm', - label='SGM', - description='Semi-Global Matching (SGM) step computes a similarity volume and extracts the initial low-resolution depth map.\n' - 'This method is highly robust but has limited depth precision (banding artifacts due to a limited list of depth planes).', + name="sgm", + label="SGM", + description="The Semi-Global Matching (SGM) step computes a similarity volume and extracts the initial low-resolution depth map.\n" + "This method is highly robust but has limited depth precision (banding artifacts due to a limited list of depth planes).", group=None, groupDesc=[ - desc.IntParam( - name='sgmScale', - label='Downscale Factor', - description='Downscale factor applied on source images for the SGM step (in addition to the global downscale).', - value=2, - range=(-1, 10, 1), - uid=[0], - ), - desc.IntParam( - name='sgmStepXY', - label='Step XY', - description='The step is used to compute the similarity volume for one pixel over N (in the XY image plane).', - value=2, - range=(-1, 10, 1), - uid=[0], - ), - desc.IntParam( - name='sgmStepZ', - label='Step Z', - description='Initial step used to compute the similarity volume on Z axis (every N pixels on the epilolar line).\n' - '-1 means automatic estimation.\n' - 'This value will be adjusted in all case to fit in the max memory (sgmMaxDepths).', - value=-1, - range=(-1, 10, 1), - uid=[0], - ), - desc.IntParam( - name='sgmMaxTCamsPerTile', - label='Max Nb Neighbour Cameras Per Tile', - description='Maximum number of neighbour cameras used per tile.', - value=4, - range=(1, 20, 1), - uid=[0], - ), - desc.IntParam( - name='sgmWSH', - label='WSH', - description='Half-size of the patch used to compute the similarity. Patch width is wsh*2+1.', - value=4, - range=(1, 20, 1), - uid=[0], - advanced=True, - ), - desc.BoolParam( - name='sgmUseSfmSeeds', - label='Use SfM Landmarks', - description='Use landmarks from Structure-from-Motion as input seeds to define min/max depth ranges.', - value=True, - uid=[0], - advanced=True, - ), - desc.FloatParam( - name='sgmSeedsRangeInflate', - label='Seeds Range Inflate', - description='Inflate factor to add margins around SfM seeds.', - value=0.2, - range=(0.0, 2.0, 0.1), - uid=[0], - advanced=True, - ), - desc.FloatParam( - 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], - 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', - description='GammaC threshold used for similarity computation.', - value=5.5, - range=(0.0, 30.0, 0.5), - uid=[0], - advanced=True, - ), - desc.FloatParam( - name='sgmGammaP', - label='GammaP', - description='GammaP threshold used for similarity computation.', - value=8.0, - range=(0.0, 30.0, 0.5), - uid=[0], - advanced=True, - ), - desc.FloatParam( - name='sgmP1', - label='P1', - description='P1 parameter for SGM filtering.', - value=10.0, - range=(0.0, 255.0, 0.5), - uid=[0], - advanced=True, - ), - desc.FloatParam( - name='sgmP2Weighting', - label='P2 Weighting', - description='P2 weighting parameter for SGM filtering.', - value=100.0, - range=(-255.0, 255.0, 0.5), - uid=[0], - advanced=True, - ), - desc.IntParam( - name='sgmMaxDepths', - label='Max Depths', - description='Maximum number of depths in the similarity volume.', - value=1500, - range=(1, 5000, 1), - uid=[0], - advanced=True, - ), - desc.StringParam( - name='sgmFilteringAxes', - label='Filtering Axes', - description='Define axes for the filtering of the similarity volume.', - value='YX', - uid=[0], - advanced=True, - ), - desc.BoolParam( - name='sgmDepthListPerTile', - label='Depth List Per Tile', - description='Select the list of depth planes per tile or globally to the image.', - value=True, - 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.IntParam( + name="sgmScale", + label="Downscale Factor", + description="Downscale factor applied on source images for the SGM step (in addition to the global downscale).", + value=2, + range=(-1, 10, 1), + uid=[0], + ), + desc.IntParam( + name="sgmStepXY", + label="Step XY", + description="The step is used to compute the similarity volume for one pixel over N (in the XY image plane).", + value=2, + range=(-1, 10, 1), + uid=[0], + ), + desc.IntParam( + name="sgmStepZ", + label="Step Z", + description="Initial step used to compute the similarity volume on Z axis (every N pixels on the epilolar line).\n" + "-1 means automatic estimation.\n" + "This value will be adjusted in all case to fit in the max memory (sgmMaxDepths).", + value=-1, + range=(-1, 10, 1), + uid=[0], + ), + desc.IntParam( + name="sgmMaxTCamsPerTile", + label="Max Nb Neighbour Cameras Per Tile", + description="Maximum number of neighbour cameras used per tile.", + value=4, + range=(1, 20, 1), + uid=[0], + ), + desc.IntParam( + name="sgmWSH", + label="WSH", + description="Half-size of the patch used to compute the similarity. Patch width is wsh*2+1.", + value=4, + range=(1, 20, 1), + uid=[0], + advanced=True, + ), + desc.BoolParam( + name="sgmUseSfmSeeds", + label="Use SfM Landmarks", + description="Use landmarks from Structure-from-Motion as input seeds to define min/max depth ranges.", + value=True, + uid=[0], + advanced=True, + ), + desc.FloatParam( + name="sgmSeedsRangeInflate", + label="Seeds Range Inflate", + description="Inflate factor to add margins around SfM seeds.", + value=0.2, + range=(0.0, 2.0, 0.1), + uid=[0], + advanced=True, + ), + desc.FloatParam( + 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], + 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", + description="GammaC threshold used for similarity computation.", + value=5.5, + range=(0.0, 30.0, 0.5), + uid=[0], + advanced=True, + ), + desc.FloatParam( + name="sgmGammaP", + label="GammaP", + description="GammaP threshold used for similarity computation.", + value=8.0, + range=(0.0, 30.0, 0.5), + uid=[0], + advanced=True, + ), + desc.FloatParam( + name="sgmP1", + label="P1", + description="P1 parameter for SGM filtering.", + value=10.0, + range=(0.0, 255.0, 0.5), + uid=[0], + advanced=True, + ), + desc.FloatParam( + name="sgmP2Weighting", + label="P2 Weighting", + description="P2 weighting parameter for SGM filtering.", + value=100.0, + range=(-255.0, 255.0, 0.5), + uid=[0], + advanced=True, + ), + desc.IntParam( + name="sgmMaxDepths", + label="Max Depths", + description="Maximum number of depths in the similarity volume.", + value=1500, + range=(1, 5000, 1), + uid=[0], + advanced=True, + ), + desc.StringParam( + name="sgmFilteringAxes", + label="Filtering Axes", + description="Define axes for the filtering of the similarity volume.", + value="YX", + uid=[0], + advanced=True, + ), + desc.BoolParam( + name="sgmDepthListPerTile", + label="Depth List Per Tile", + description="Select the list of depth planes per tile or globally to the image.", + value=True, + 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', - label='Refine', - description='The refine step computes a similarity volume in higher resolution but with a small depth range around the SGM depth map.\n' - 'This allows to compute a depth map with sub-pixel accuracy.', + name="refine", + label="Refine", + description="The refine step computes a similarity volume in higher resolution but with a small depth range around the SGM depth map.\n" + "This allows to compute a depth map with sub-pixel accuracy.", group=None, groupDesc=[ - desc.BoolParam( - name='refineEnabled', - label='Enable', - description='Enable depth/similarity map refinement process.', - value=True, - uid=[0], - ), - desc.IntParam( - name='refineScale', - label='Downscale factor', - description='Downscale factor applied on source images for the Refine step (in addition to the global downscale).', - value=1, - range=(-1, 10, 1), - uid=[0], - enabled= lambda node: node.refine.refineEnabled.value, - ), - desc.IntParam( - name='refineStepXY', - label='Step XY', - description='The step is used to compute the refine volume for one pixel over N (in the XY image plane).', - value=1, - range=(-1, 10, 1), - uid=[0], - enabled= lambda node: node.refine.refineEnabled.value, - ), - desc.IntParam( - name='refineMaxTCamsPerTile', - label='Max Nb Neighbour Cameras Per Tile', - description='Maximum number of neighbour cameras used per tile.', - value=4, - range=(1, 20, 1), - uid=[0], - enabled= lambda node: node.refine.refineEnabled.value, - ), - desc.IntParam( - name='refineSubsampling', - label='Number of Subsamples', - description='The number of subsamples used to extract the best depth from the refine volume (sliding gaussian window precision).', - value=10, - range=(1, 30, 1), - uid=[0], - advanced=True, - enabled= lambda node: node.refine.refineEnabled.value, - ), - desc.IntParam( - name='refineHalfNbDepths', - label='Half Number of Depths', - description='The thickness of the refine area around the initial depth map.\n' - 'This parameter defines the number of depths in front of and behind the initial value \n' - 'for which we evaluate the similarity with a finer z sampling.', - value=15, - range=(1, 50, 1), - uid=[0], - advanced=True, - enabled= lambda node: node.refine.refineEnabled.value, - ), - desc.IntParam( - name='refineWSH', - label='WSH', - description='Half-size of the patch used to compute the similarity. Patch width is wsh*2+1.', - value=3, - range=(1, 20, 1), - uid=[0], - advanced=True, - enabled= lambda node: node.refine.refineEnabled.value, - ), - desc.FloatParam( - name='refineSigma', - label='Sigma', - description='Sigma (2*sigma^2) of the gaussian filter used to extract the best depth from the refine volume.', - value=15.0, - range=(0.0, 30.0, 0.5), - uid=[0], - advanced=True, - enabled= lambda node: node.refine.refineEnabled.value, - ), - desc.FloatParam( - name='refineGammaC', - label='GammaC', - description='GammaC threshold used for similarity computation.', - value=15.5, - range=(0.0, 30.0, 0.5), - uid=[0], - advanced=True, - enabled= lambda node: node.refine.refineEnabled.value, - ), - desc.FloatParam( - name='refineGammaP', - label='GammaP', - description='GammaP threshold used for similarity computation.', - value=8.0, - range=(0.0, 30.0, 0.5), - uid=[0], - 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], - 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.BoolParam( + name="refineEnabled", + label="Enable", + description="Enable depth/similarity map refinement process.", + value=True, + uid=[0], + ), + desc.IntParam( + name="refineScale", + label="Downscale Factor", + description="Downscale factor applied on source images for the Refine step (in addition to the global downscale).", + value=1, + range=(-1, 10, 1), + uid=[0], + enabled= lambda node: node.refine.refineEnabled.value, + ), + desc.IntParam( + name="refineStepXY", + label="Step XY", + description="The step is used to compute the refine volume for one pixel over N (in the XY image plane).", + value=1, + range=(-1, 10, 1), + uid=[0], + enabled= lambda node: node.refine.refineEnabled.value, + ), + desc.IntParam( + name="refineMaxTCamsPerTile", + label="Max Nb Neighbour Cameras Per Tile", + description="Maximum number of neighbour cameras used per tile.", + value=4, + range=(1, 20, 1), + uid=[0], + enabled= lambda node: node.refine.refineEnabled.value, + ), + desc.IntParam( + name="refineSubsampling", + label="Number Of Subsamples", + description="The number of subsamples used to extract the best depth from the refine volume (sliding gaussian window precision).", + value=10, + range=(1, 30, 1), + uid=[0], + advanced=True, + enabled= lambda node: node.refine.refineEnabled.value, + ), + desc.IntParam( + name="refineHalfNbDepths", + label="Half Number Of Depths", + description="The thickness of the refine area around the initial depth map.\n" + "This parameter defines the number of depths in front of and behind the initial value\n" + "for which we evaluate the similarity with a finer z sampling.", + value=15, + range=(1, 50, 1), + uid=[0], + advanced=True, + enabled= lambda node: node.refine.refineEnabled.value, + ), + desc.IntParam( + name="refineWSH", + label="WSH", + description="Half-size of the patch used to compute the similarity. Patch width is wsh*2+1.", + value=3, + range=(1, 20, 1), + uid=[0], + advanced=True, + enabled= lambda node: node.refine.refineEnabled.value, + ), + desc.FloatParam( + name="refineSigma", + label="Sigma", + description="Sigma (2*sigma^2) of the Gaussian filter used to extract the best depth from the refine volume.", + value=15.0, + range=(0.0, 30.0, 0.5), + uid=[0], + advanced=True, + enabled= lambda node: node.refine.refineEnabled.value, + ), + desc.FloatParam( + name="refineGammaC", + label="GammaC", + description="GammaC threshold used for similarity computation.", + value=15.5, + range=(0.0, 30.0, 0.5), + uid=[0], + advanced=True, + enabled= lambda node: node.refine.refineEnabled.value, + ), + desc.FloatParam( + name="refineGammaP", + label="GammaP", + description="GammaP threshold used for similarity computation.", + value=8.0, + range=(0.0, 30.0, 0.5), + uid=[0], + 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], + 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( name="colorOptimization", label="Color Optimization", - description='Color optimization post-process parameters.', + description="Color optimization post-process parameters.", group=None, groupDesc=[ - desc.BoolParam( - name='colorOptimizationEnabled', - label='Enable', - description='Enable depth/similarity map post-process color optimization.', - value=True, - uid=[0], - ), - desc.IntParam( - name='colorOptimizationNbIterations', - label='Number of Iterations', - description='Number of iterations of the optimization.', - value=100, - range=(1, 500, 10), - uid=[0], - advanced=True, - enabled= lambda node: node.colorOptimization.colorOptimizationEnabled.value, - ), - ]), + desc.BoolParam( + name="colorOptimizationEnabled", + label="Enable", + description="Enable depth/similarity map post-process color optimization.", + value=True, + uid=[0], + ), + desc.IntParam( + name="colorOptimizationNbIterations", + label="Number Of Iterations", + description="Number of iterations for the optimization.", + value=100, + range=(1, 500, 10), + uid=[0], + advanced=True, + enabled= lambda node: node.colorOptimization.colorOptimizationEnabled.value, + ), + ] + ), desc.GroupAttribute( - name='customPatchPattern', - label='Custom Patch Pattern', - description='User custom patch pattern for similarity comparison.', + 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.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="Custom patch pattern subpart configuration for similarity volume computation.", + 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.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.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', - description='Intermediate results parameters for debug purposes.\n' - 'Warning: Dramatically affect performances and use large amount of storage.', + name="intermediateResults", + label="Intermediate Results", + description="Intermediate results parameters for debug purposes.\n" + "Warning: Dramatically affect performances and use large amount of storage.", advanced=True, group=None, groupDesc=[ - desc.BoolParam( - name='exportIntermediateDepthSimMaps', - label='Export Depth Maps', - description='Export intermediate depth/similarity maps from the SGM and Refine steps.', - value=False, - 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=[0], - advanced=True, - ), - desc.BoolParam( - name='exportIntermediateVolumes', - label='Export Volumes', - description='Export intermediate full similarity volumes from the SGM and Refine steps.', - value=False, - uid=[0], - advanced=True, - ), - desc.BoolParam( - name='exportIntermediateCrossVolumes', - label='Export Cross Volumes', - description='Export intermediate similarity cross volumes from the SGM and Refine steps.', - value=False, - 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=[0], - advanced=True, - ), - desc.BoolParam( - name='exportIntermediateVolume9pCsv', - label='Export 9 Points', - description='Export intermediate volumes 9 points from the SGM and Refine steps in CSV files.', - value=False, - uid=[0], - advanced=True, - ), - desc.BoolParam( - name='exportTilePattern', - label='Export Tile Pattern', - description='Export the bounding boxes of tiles volumes as meshes. This allows to visualize the depth map search areas.', - value=False, - uid=[0], - advanced=True, - ), - ]), + desc.BoolParam( + name="exportIntermediateDepthSimMaps", + label="Export Depth Maps", + description="Export intermediate depth/similarity maps from the SGM and Refine steps.", + value=False, + 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=[0], + advanced=True, + ), + desc.BoolParam( + name="exportIntermediateVolumes", + label="Export Volumes", + description="Export intermediate full similarity volumes from the SGM and Refine steps.", + value=False, + uid=[0], + advanced=True, + ), + desc.BoolParam( + name="exportIntermediateCrossVolumes", + label="Export Cross Volumes", + description="Export intermediate similarity cross volumes from the SGM and Refine steps.", + value=False, + 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=[0], + advanced=True, + ), + desc.BoolParam( + name="exportIntermediateVolume9pCsv", + label="Export 9 Points", + description="Export intermediate volumes 9 points from the SGM and Refine steps in CSV files.", + value=False, + uid=[0], + advanced=True, + ), + desc.BoolParam( + name="exportTilePattern", + label="Export Tile Pattern", + description="Export the bounding boxes of tiles volumes as meshes. This allows to visualize the depth map search areas.", + value=False, + uid=[0], + advanced=True, + ), + ] + ), desc.IntParam( - name='nbGPUs', - label='Number of GPUs', - description='Number of GPUs to use (0 means use all available GPUs).', + name="nbGPUs", + label="Number Of GPUs", + description="Number of GPUs to use (0 means that all the available GPUs will be used).", value=0, range=(0, 5, 1), uid=[], advanced=True, ), 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=[], ), @@ -595,9 +603,9 @@ class DepthMap(desc.AVCommandLineNode): outputs = [ desc.File( - name='output', - label='Folder', - description='Output folder for generated depth maps.', + name="output", + label="Folder", + description="Output folder for generated depth maps.", value=desc.Node.internalFolder, uid=[], ), @@ -605,60 +613,60 @@ class DepthMap(desc.AVCommandLineNode): # by specifying that it generates 2 sequences of images # (see in Viewer2D.qml how these attributes can be used) desc.File( - name='depth', - label='Depth Maps', - description='Generated depth maps.', - semantic='image', - value=desc.Node.internalFolder + '_depthMap.exr', + name="depth", + label="Depth Maps", + description="Generated depth maps.", + semantic="image", + value=desc.Node.internalFolder + "_depthMap.exr", uid=[], - group='', # do not export on the command line + group="", # do not export on the command line ), desc.File( - name='sim', - label='Sim Maps', - description='Generated sim maps.', - semantic='image', - value=desc.Node.internalFolder + '_simMap.exr', + name="sim", + label="Sim Maps", + description="Generated sim maps.", + semantic="image", + value=desc.Node.internalFolder + "_simMap.exr", uid=[], - group='', # do not export on the command line + group="", # do not export on the command line ), desc.File( - name='tilePattern', - label='Tile Pattern', - description='Debug: Tile pattern', - value=desc.Node.internalFolder + '_tilePattern.obj', + name="tilePattern", + label="Tile Pattern", + description="Debug: Tile pattern.", + value=desc.Node.internalFolder + "_tilePattern.obj", uid=[], - group='', # do not export on the command line + group="", # do not export on the command line enabled=lambda node: node.intermediateResults.exportTilePattern.value, ), desc.File( - name='depthSgm', - label='Depth Maps SGM', - description='Debug: Depth maps SGM', - semantic='image', - value=desc.Node.internalFolder + '_depthMap_sgm.exr', + name="depthSgm", + label="Depth Maps SGM", + description="Debug: Depth maps SGM", + semantic="image", + value=desc.Node.internalFolder + "_depthMap_sgm.exr", uid=[], - group='', # do not export on the command line + group="", # do not export on the command line enabled=lambda node: node.intermediateResults.exportIntermediateDepthSimMaps.value, ), desc.File( - name='depthSgmUpscaled', - label='Depth Maps SGM Upscaled', - description='Debug: Depth maps SGM upscaled', - semantic='image', - value=desc.Node.internalFolder + '_depthMap_sgmUpscaled.exr', + name="depthSgmUpscaled", + label="Depth Maps SGM Upscaled", + description="Debug: Depth maps SGM upscaled.", + semantic="image", + value=desc.Node.internalFolder + "_depthMap_sgmUpscaled.exr", uid=[], - group='', # do not export on the command line + group="", # do not export on the command line enabled=lambda node: node.intermediateResults.exportIntermediateDepthSimMaps.value, ), desc.File( - name='depthRefined', - label='Depth Maps Refined', - description='Debug: Depth maps after refinement', - semantic='image', - value=desc.Node.internalFolder + '_depthMap_refinedFused.exr', + name="depthRefined", + label="Depth Maps Refined", + description="Debug: Depth maps after refinement", + semantic="image", + value=desc.Node.internalFolder + "_depthMap_refinedFused.exr", uid=[], - group='', # do not export on the command line + group="", # do not export on the command line enabled=lambda node: node.intermediateResults.exportIntermediateDepthSimMaps.value, ), ] diff --git a/meshroom/nodes/aliceVision/DepthMapFilter.py b/meshroom/nodes/aliceVision/DepthMapFilter.py index 3acebbacc5..487a4074fe 100644 --- a/meshroom/nodes/aliceVision/DepthMapFilter.py +++ b/meshroom/nodes/aliceVision/DepthMapFilter.py @@ -18,32 +18,32 @@ class DepthMapFilter(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='SfMData', - description='SfMData file.', - value='', + name="input", + label="SfMData", + description="SfMData file.", + value="", uid=[0], ), desc.File( name="depthMapsFolder", - label="DepthMaps Folder", - description="Input depth maps folder", + label="Depth Maps Folder", + description="Input depth maps folder.", value="", uid=[0], ), desc.FloatParam( - name='minViewAngle', - label='Min View Angle', - description='Minimum angle between two views.', + name="minViewAngle", + label="Min View Angle", + description="Minimum angle between two views.", value=2.0, range=(0.0, 10.0, 0.1), uid=[0], advanced=True, ), desc.FloatParam( - name='maxViewAngle', - label='Max View Angle', - description='Maximum angle between two views.', + name="maxViewAngle", + label="Max View Angle", + description="Maximum angle between two views.", value=70.0, range=(10.0, 120.0, 1.0), uid=[0], @@ -51,7 +51,7 @@ class DepthMapFilter(desc.AVCommandLineNode): ), desc.IntParam( name="nNearestCams", - label="Number of Nearest Cameras", + label="Number Of Nearest Cameras", description="Number of nearest cameras used for filtering.", value=10, range=(0, 20, 1), @@ -61,7 +61,7 @@ class DepthMapFilter(desc.AVCommandLineNode): desc.IntParam( name="minNumOfConsistentCams", label="Min Consistent Cameras", - description="Min Number of Consistent Cameras", + description="Minimum number of consistent cameras.", value=3, range=(0, 10, 1), uid=[0], @@ -69,15 +69,15 @@ class DepthMapFilter(desc.AVCommandLineNode): desc.IntParam( name="minNumOfConsistentCamsWithLowSimilarity", label="Min Consistent Cameras Bad Similarity", - description="Min Number of Consistent Cameras for pixels with weak similarity value", + description="Minimum number of consistent cameras for pixels with weak similarity value.", value=4, range=(0, 10, 1), uid=[0], ), desc.FloatParam( - name='pixToleranceFactor', - label='Tolerance Size', - description='Filtering tolerance size factor (in px).', + name="pixToleranceFactor", + label="Tolerance Size", + description="Filtering tolerance size factor, in pixels.", value=2.0, range=(0.001, 10.0, 0.1), uid=[0], @@ -85,8 +85,8 @@ class DepthMapFilter(desc.AVCommandLineNode): ), desc.IntParam( name="pixSizeBall", - label="Filtering Size in Pixels", - description="Filtering size in pixels", + label="Filtering Size", + description="Filtering size in pixels.", value=0, range=(0, 10, 1), uid=[0], @@ -94,27 +94,27 @@ class DepthMapFilter(desc.AVCommandLineNode): ), desc.IntParam( name="pixSizeBallWithLowSimilarity", - label="Filtering Size in Pixels Bad Similarity", - description="Filtering size in pixels", + label="Filtering Size Bad Similarity", + description="Filtering size in pixels for low similarity.", value=0, range=(0, 10, 1), uid=[0], advanced=True, ), desc.BoolParam( - name='computeNormalMaps', - label='Compute Normal Maps', - description='Compute normal maps per depth map.', + name="computeNormalMaps", + label="Compute Normal Maps", + description="Compute normal maps for each depth map.", value=False, uid=[0], advanced=True, ), 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=[], ), @@ -122,9 +122,9 @@ class DepthMapFilter(desc.AVCommandLineNode): outputs = [ desc.File( - name='output', - label='Filtered DepthMaps Folder', - description='Output folder for generated depth maps.', + name="output", + label="Filtered Depth Maps Folder", + description="Output folder for generated depth maps.", value=desc.Node.internalFolder, uid=[], ), @@ -132,21 +132,21 @@ class DepthMapFilter(desc.AVCommandLineNode): # by specifying that it generates 2 sequences of images # (see in Viewer2D.qml how these attributes can be used) desc.File( - name='depth', - label='Depth Maps', - description='Filtered depth maps.', - semantic='image', - value=desc.Node.internalFolder + '_depthMap.exr', + name="depth", + label="Depth Maps", + description="Filtered depth maps.", + semantic="image", + value=desc.Node.internalFolder + "_depthMap.exr", uid=[], - group='', # do not export on the command line + group="", # do not export on the command line ), desc.File( - name='sim', - label='Sim Maps', - description='Filtered sim maps.', - semantic='image', - value=desc.Node.internalFolder + '_simMap.exr', + name="sim", + label="Sim Maps", + description="Filtered sim maps.", + semantic="image", + value=desc.Node.internalFolder + "_simMap.exr", uid=[], - group='', # do not export on the command line + group="", # do not export on the command line ), ] diff --git a/meshroom/nodes/aliceVision/DistortionCalibration.py b/meshroom/nodes/aliceVision/DistortionCalibration.py index 9bbfaa795c..1ac9c84c45 100644 --- a/meshroom/nodes/aliceVision/DistortionCalibration.py +++ b/meshroom/nodes/aliceVision/DistortionCalibration.py @@ -14,36 +14,45 @@ class DistortionCalibration(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='Input SfMData', - description='SfMData file.', - value='', + name="input", + label="Input SfMData", + description="SfMData file.", + value="", uid=[0], ), desc.File( - name='checkerboards', - label='Checkerboards Folder', - description='Folder containing checkerboard JSON files.', - value='', + name="checkerboards", + label="Checkerboards Folder", + description="Folder containing checkerboard JSON files.", + value="", uid=[0], ), desc.ChoiceParam( - name='cameraModel', - label='Camera Model', - description='Camera model used to estimate distortion.', - value='3deanamorphic4', - values=['3deanamorphic4'], + name="cameraModel", + label="Camera Model", + description="Camera model used to estimate distortion.", + value="3deanamorphic4", + values=["3deanamorphic4"], exclusive=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 = [ desc.File( - name='output', - label='SfMData File', - description='Path to the output SfMData file.', - value=desc.Node.internalFolder + 'sfmData.sfm', + name="output", + label="SfMData File", + description="Path to the output SfMData file.", + value=desc.Node.internalFolder + "sfmData.sfm", uid=[], ) ] diff --git a/meshroom/nodes/aliceVision/ExportAnimatedCamera.py b/meshroom/nodes/aliceVision/ExportAnimatedCamera.py index 644519e0ec..7db62fec63 100644 --- a/meshroom/nodes/aliceVision/ExportAnimatedCamera.py +++ b/meshroom/nodes/aliceVision/ExportAnimatedCamera.py @@ -14,71 +14,73 @@ class ExportAnimatedCamera(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='Input SfMData', - description='SfMData file containing a complete SfM.', - value='', + name="input", + label="Input SfMData", + description="SfMData file containing a complete SfM.", + value="", uid=[0], ), desc.File( - name='sfmDataFilter', - label='SfMData Filter', - description='Filter out cameras from the export if they are part of this SfMData. Export all cameras if empty.', - value='', + name="sfmDataFilter", + label="SfMData Filter", + description="Filter out cameras from the export if they are part of this SfMData.\n" + "If empty, export all cameras.", + value="", uid=[0], ), desc.File( - name='viewFilter', - label='View Filter', - description='Select the cameras to export using an expression based on the image filepath. Export all cameras if empty.', - value='', + name="viewFilter", + label="View Filter", + description="Select the cameras to export using an expression based on the image filepath.\n" + "If empty, export all cameras.", + value="", uid=[0], ), desc.BoolParam( - name='exportUVMaps', - label='Export UV Maps', - description='Export UV Maps, absolutes values (x,y) of distortion are encoding in UV channels.', + name="exportUVMaps", + label="Export UV Maps", + description="Export UV maps. Absolutes values (x, y) of distortion are encoded in UV channels.", value=True, uid=[0], ), desc.BoolParam( - name='exportUndistortedImages', - label='Export Undistorted Images', - description='Export Undistorted Images.', + name="exportUndistortedImages", + label="Export Undistorted Images", + description="Export undistorted images.", value=False, uid=[0], ), desc.ChoiceParam( - name='undistortedImageType', - label='Undistort Image Format ', - description='Image file format to use for undistorted images ("jpg", "png", "tif", "exr (half)").', - value='exr', - values=['jpg', 'png', 'tif', 'exr'], + name="undistortedImageType", + label="Undistort Image Format", + description="Image file format to use for undistorted images ('jpg', 'png', 'tif', 'exr (half)').", + value="exr", + values=["jpg", "png", "tif", "exr"], exclusive=True, uid=[0], enabled= lambda node: node.exportUndistortedImages.value, ), desc.BoolParam( - name='exportFullROD', - label='Export Full ROD', - description='Export Full ROD.', + name="exportFullROD", + label="Export Full ROD", + description="Export full ROD.", value=False, - enabled=lambda node: node.exportUndistortedImages.value and node.undistortedImageType.value == 'exr', + enabled=lambda node: node.exportUndistortedImages.value and node.undistortedImageType.value == "exr", uid=[0], ), desc.BoolParam( - name='correctPrincipalPoint', - label='Correct Principal Point ', - description='Correct Principal Point.', + name="correctPrincipalPoint", + label="Correct Principal Point", + description="Correct principal point.", value=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'], + 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=[], ), @@ -86,26 +88,26 @@ class ExportAnimatedCamera(desc.AVCommandLineNode): outputs = [ desc.File( - name='output', - label='Folder', - description='Output folder with animated camera and undistorted images.', + name="output", + label="Folder", + description="Output folder with animated camera and undistorted images.", value=desc.Node.internalFolder, uid=[], ), desc.File( - name='outputCamera', - label='Camera', - description='Output filename for the animated camera in Alembic format.', - value=desc.Node.internalFolder + 'camera.abc', - group='', # exclude from command line + name="outputCamera", + label="Camera", + description="Output filename for the animated camera in Alembic format.", + value=desc.Node.internalFolder + "camera.abc", + group="", # exclude from command line uid=[], ), desc.File( - name='outputUndistorted', - label='Undistorted Images', - description='Output Undistorted images.', - value=desc.Node.internalFolder + 'undistort', - group='', # exclude from command line + name="outputUndistorted", + label="Undistorted Images", + description="Output undistorted images.", + value=desc.Node.internalFolder + "undistort", + group="", # exclude from command line uid=[], ), ] diff --git a/meshroom/nodes/aliceVision/ExportColoredPointCloud.py b/meshroom/nodes/aliceVision/ExportColoredPointCloud.py index 2f18c94cea..dee37d94bf 100644 --- a/meshroom/nodes/aliceVision/ExportColoredPointCloud.py +++ b/meshroom/nodes/aliceVision/ExportColoredPointCloud.py @@ -7,21 +7,23 @@ class ExportColoredPointCloud(desc.AVCommandLineNode): commandLine = 'aliceVision_exportColoredPointCloud {allParams}' category = 'Export' + documentation = ''' + ''' inputs = [ desc.File( - name='input', - label='Input SfMData', - description='SfMData file containing a complete SfM.', - value='', + name="input", + label="Input SfMData", + description="SfMData file containing a complete SfM.", + 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'], + 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=[], ), @@ -29,9 +31,9 @@ class ExportColoredPointCloud(desc.AVCommandLineNode): outputs = [ desc.File( - name='output', - label='Point Cloud Filepath', - description='Output point cloud with visibilities as SfMData file.', + name="output", + label="Point Cloud Filepath", + description="Output point cloud with visibilities as SfMData file.", value="{cache}/{nodeType}/{uid0}/pointCloud.abc", uid=[], ), diff --git a/meshroom/nodes/aliceVision/ExportMatches.py b/meshroom/nodes/aliceVision/ExportMatches.py index b2cd04a39e..ec189d16af 100644 --- a/meshroom/nodes/aliceVision/ExportMatches.py +++ b/meshroom/nodes/aliceVision/ExportMatches.py @@ -8,30 +8,32 @@ class ExportMatches(desc.AVCommandLineNode): size = desc.DynamicNodeSize('input') category = 'Export' + documentation = ''' + ''' inputs = [ desc.File( - name='input', - label='Input', - description='SfMData file.', - value='', + 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=['dspsift'], - values=['sift', 'sift_float', 'sift_upright', 'dspsift', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv'], + 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"], exclusive=False, uid=[0], - joinChar=',', + joinChar=",", ), desc.ListAttribute( elementDesc=desc.File( name="featuresFolder", label="Features Folder", - description="", + description="Folder containing some extracted features and descriptors.", value="", uid=[0], ), @@ -43,7 +45,7 @@ class ExportMatches(desc.AVCommandLineNode): elementDesc=desc.File( name="matchesFolder", label="Matches Folder", - description="", + description="Folder containing some computed matches.", value="", uid=[0], ), @@ -52,21 +54,21 @@ class ExportMatches(desc.AVCommandLineNode): description="Folder(s) in which computed matches are stored." ), 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=[], - ) + ), ] outputs = [ desc.File( - name='output', - label='Folder', - description='Output path for the features and descriptors files (*.feat, *.desc).', + name="output", + label="Folder", + description="Output path for the features and descriptors files (*.feat, *.desc).", value=desc.Node.internalFolder, uid=[], ), diff --git a/meshroom/nodes/aliceVision/ExportMaya.py b/meshroom/nodes/aliceVision/ExportMaya.py index b297b81cf5..253144a2fb 100644 --- a/meshroom/nodes/aliceVision/ExportMaya.py +++ b/meshroom/nodes/aliceVision/ExportMaya.py @@ -16,19 +16,28 @@ class ExportMaya(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='Input SfMData', - description='', - value='', + name="input", + label="Input SfMData", + description="Input SfMData file.", + 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 = [ desc.File( - name='output', - label='Folder', - description='Folder for MeshroomMaya outputs: undistorted images and thumbnails.', + name="output", + label="Folder", + description="Folder for MeshroomMaya outputs: undistorted images and thumbnails.", value=desc.Node.internalFolder, uid=[], ), diff --git a/meshroom/nodes/aliceVision/FeatureExtraction.py b/meshroom/nodes/aliceVision/FeatureExtraction.py index 7b744a5e57..f3eff90c80 100644 --- a/meshroom/nodes/aliceVision/FeatureExtraction.py +++ b/meshroom/nodes/aliceVision/FeatureExtraction.py @@ -32,126 +32,126 @@ class FeatureExtraction(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='SfMData', - description='SfMData file.', - value='', + name="input", + label="SfMData", + description="Input SfMData file.", + value="", uid=[0], ), desc.File( - name='masksFolder', - label='Masks Folder', - description='Use masks to filter features. Filename should be the same or the image uid.', - value='', + name="masksFolder", + label="Masks Folder", + description="Use masks to filter features. Filename should be the same or the image UID.", + 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='describerPreset', - label='Describer Density', - description='Control the ImageDescriber density (low, medium, normal, high, ultra).\n' - 'Warning: Use ULTRA only on small datasets.', - value='normal', - values=['low', 'medium', 'normal', 'high', 'ultra', 'custom'], + name="describerPreset", + label="Describer Density", + description="Control the ImageDescriber density (low, medium, normal, high, ultra).\n" + "Warning: Use ULTRA only on small datasets.", + value="normal", + values=["low", "medium", "normal", "high", "ultra", "custom"], exclusive=True, uid=[0], group=lambda node: 'allParams' if node.describerPreset.value != 'custom' else None, ), desc.IntParam( - name='maxNbFeatures', - label='Max Nb Features', - description='Max number of features extracted (0 means default value based on Describer Density).', + name="maxNbFeatures", + label="Max Nb Features", + description="Maximum number of features extracted (0 means default value based on Describer Density).", value=0, range=(0, 100000, 1000), uid=[0], advanced=True, - enabled=lambda node: (node.describerPreset.value == 'custom'), + enabled=lambda node: (node.describerPreset.value == "custom"), ), desc.ChoiceParam( - name='describerQuality', - label='Describer Quality', - description='Control the ImageDescriber quality (low, medium, normal, high, ultra).', - value='normal', - values=['low', 'medium', 'normal', 'high', 'ultra'], + name="describerQuality", + label="Describer Quality", + description="Control the ImageDescriber quality (low, medium, normal, high, ultra).", + value="normal", + values=["low", "medium", "normal", "high", "ultra"], exclusive=True, uid=[0], ), desc.ChoiceParam( - name='contrastFiltering', - label='Contrast Filtering', + name="contrastFiltering", + label="Contrast Filtering", description="Contrast filtering method to ignore features with too low contrast that can be considered as noise:\n" - "* Static: Fixed threshold.\n" - "* AdaptiveToMedianVariance: Based on image content analysis.\n" - "* NoFiltering: Disable contrast filtering.\n" - "* GridSortOctaves: Grid Sort but per octaves (and only per scale at the end).\n" - "* GridSort: Grid sort per octaves and at the end (scale * peakValue).\n" - "* GridSortScaleSteps: Grid sort per octaves and at the end (scale and then peakValue).\n" - "* NonExtremaFiltering: Filter non-extrema peakValues.\n", - value='GridSort', - values=['Static', 'AdaptiveToMedianVariance', 'NoFiltering', 'GridSortOctaves', 'GridSort', 'GridSortScaleSteps', 'GridSortOctaveSteps', 'NonExtremaFiltering'], + " - Static: Fixed threshold.\n" + " - AdaptiveToMedianVariance: Based on image content analysis.\n" + " - NoFiltering: Disable contrast filtering.\n" + " - GridSortOctaves: Grid Sort but per octaves (and only per scale at the end).\n" + " - GridSort: Grid sort per octaves and at the end (scale * peakValue).\n" + " - GridSortScaleSteps: Grid sort per octaves and at the end (scale and then peakValue).\n" + " - NonExtremaFiltering: Filter non-extrema peakValues.\n", + value="GridSort", + values=["Static", "AdaptiveToMedianVariance", "NoFiltering", "GridSortOctaves", "GridSort", "GridSortScaleSteps", "GridSortOctaveSteps", "NonExtremaFiltering"], exclusive=True, advanced=True, uid=[0], ), desc.FloatParam( - name='relativePeakThreshold', - label='Relative Peak Threshold', - description='Peak Threshold relative to median of gradients.', + name="relativePeakThreshold", + label="Relative Peak Threshold", + description="Peak threshold relative to median of gradients.", value=0.01, range=(0.01, 1.0, 0.001), advanced=True, uid=[0], - enabled=lambda node: (node.contrastFiltering.value == 'AdaptiveToMedianVariance'), + enabled=lambda node: (node.contrastFiltering.value == "AdaptiveToMedianVariance"), ), desc.BoolParam( - name='gridFiltering', - label='Grid Filtering', - description='Enable grid filtering. Highly recommended to ensure usable number of features.', + name="gridFiltering", + label="Grid Filtering", + description="Enable grid filtering. Highly recommended to ensure usable number of features.", value=True, advanced=True, uid=[0], ), desc.ChoiceParam( - name='workingColorSpace', - label='Working Color Space', - description='Allows you to choose the color space in which the data are processed.', - value='sRGB', - values=['sRGB', 'Linear', 'ACES2065-1', 'ACEScg', 'no_conversion'], + name="workingColorSpace", + label="Working Color Space", + description="Allows you to choose the color space in which the data are processed.", + value="sRGB", + values=["sRGB", "Linear", "ACES2065-1", "ACEScg", "no_conversion"], exclusive=True, uid=[0], ), desc.BoolParam( - name='forceCpuExtraction', - label='Force CPU Extraction', - description='Use only CPU feature extraction.', + name="forceCpuExtraction", + label="Force CPU Extraction", + description="Use only CPU feature extraction.", value=True, uid=[], advanced=True, ), desc.IntParam( - name='maxThreads', - label='Max Nb Threads', - description='Specifies the maximum number of threads to run simultaneously (0 for automatic mode).', + name="maxThreads", + label="Max Nb Threads", + description="Maximum number of threads to run simultaneously (0 for automatic mode).", value=0, range=(0, 24, 1), uid=[], advanced=True, ), 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=[], ) @@ -159,9 +159,9 @@ class FeatureExtraction(desc.AVCommandLineNode): outputs = [ desc.File( - name='output', - label='Features Folder', - description='Output path for the features and descriptors files (*.feat, *.desc).', + name="output", + label="Features Folder", + description="Output path for the features and descriptors files (*.feat, *.desc).", value=desc.Node.internalFolder, uid=[], ), diff --git a/meshroom/nodes/aliceVision/FeatureMatching.py b/meshroom/nodes/aliceVision/FeatureMatching.py index cdc5b69eda..bbcab8bc3b 100644 --- a/meshroom/nodes/aliceVision/FeatureMatching.py +++ b/meshroom/nodes/aliceVision/FeatureMatching.py @@ -34,17 +34,17 @@ class FeatureMatching(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='SfMData', - description='SfMData file.', - value='', + name="input", + label="SfMData", + description="Input SfMData file.", + value="", uid=[0], ), desc.ListAttribute( elementDesc=desc.File( name="featuresFolder", label="Features Folder", - description="", + description="Folder containing some extracted features and descriptors.", value="", uid=[0], ), @@ -53,173 +53,177 @@ class FeatureMatching(desc.AVCommandLineNode): description="Folder(s) containing the extracted features and descriptors." ), desc.File( - name='imagePairsList', - label='Image Pairs', - description='Path to a file which contains the list of image pairs to match.', - value='', + name="imagePairsList", + label="Image Pairs", + description="Path to a file which contains the list of image pairs to match.", + 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='photometricMatchingMethod', - label='Photometric Matching Method', - description='For Scalar based regions descriptor\n' - ' * BRUTE_FORCE_L2: L2 BruteForce matching\n' - ' * ANN_L2: L2 Approximate Nearest Neighbor matching\n' - ' * CASCADE_HASHING_L2: L2 Cascade Hashing matching\n' - ' * FAST_CASCADE_HASHING_L2: L2 Cascade Hashing with precomputed hashed regions (faster than CASCADE_HASHING_L2 but use more memory) \n' - 'For Binary based descriptor\n' - ' * BRUTE_FORCE_HAMMING: BruteForce Hamming matching', - value='ANN_L2', - values=('BRUTE_FORCE_L2', 'ANN_L2', 'CASCADE_HASHING_L2', 'FAST_CASCADE_HASHING_L2', 'BRUTE_FORCE_HAMMING'), + name="photometricMatchingMethod", + label="Photometric Matching Method", + description="For scalar based regions descriptors:\n" + " - BRUTE_FORCE_L2: L2 BruteForce matching\n" + " - ANN_L2: L2 Approximate Nearest Neighbor matching\n" + " - CASCADE_HASHING_L2: L2 Cascade Hashing matching\n" + " - FAST_CASCADE_HASHING_L2: L2 Cascade Hashing with precomputed hashed regions (faster than CASCADE_HASHING_L2 but use more memory)\n" + "For Binary based descriptors:\n" + " - BRUTE_FORCE_HAMMING: BruteForce Hamming matching", + value="ANN_L2", + values=("BRUTE_FORCE_L2", "ANN_L2", "CASCADE_HASHING_L2", "FAST_CASCADE_HASHING_L2", "BRUTE_FORCE_HAMMING"), exclusive=True, uid=[0], advanced=True, ), desc.ChoiceParam( - name='geometricEstimator', - label='Geometric Estimator', - description='Geometric estimator: (acransac: A-Contrario Ransac, loransac: LO-Ransac (only available for "fundamental_matrix" model)', - value='acransac', - values=['acransac', 'loransac'], + name="geometricEstimator", + label="Geometric Estimator", + description="Geometric estimator:\n" + " - acransac: A-Contrario Ransac.\n" + " - loransac: LO-Ransac (only available for 'fundamental_matrix' model).", + value="acransac", + values=["acransac", "loransac"], exclusive=True, uid=[0], advanced=True, ), desc.ChoiceParam( - name='geometricFilterType', - label='Geometric Filter Type', - description='Geometric validation method to filter features matches: \n' - ' * fundamental_matrix\n' - ' * fundamental_with_distortion\n' - ' * essential_matrix\n' - ' * homography_matrix\n' - ' * homography_growing\n' - ' * no_filtering', - value='fundamental_matrix', - values=['fundamental_matrix', 'fundamental_with_distortion', 'essential_matrix', 'homography_matrix', 'homography_growing', 'no_filtering'], + name="geometricFilterType", + label="Geometric Filter Type", + description="Geometric validation method to filter features matches:\n" + " - fundamental_matrix\n" + " - fundamental_with_distortion\n" + " - essential_matrix\n" + " - homography_matrix\n" + " - homography_growing\n" + " - no_filtering", + value="fundamental_matrix", + values=["fundamental_matrix", "fundamental_with_distortion", "essential_matrix", "homography_matrix", "homography_growing", "no_filtering"], exclusive=True, uid=[0], advanced=True, ), desc.FloatParam( - name='distanceRatio', - label='Distance Ratio', - description='Distance ratio to discard non meaningful matches.', + name="distanceRatio", + label="Distance Ratio", + description="Distance ratio to discard non meaningful matches.", value=0.8, range=(0.0, 1.0, 0.01), uid=[0], advanced=True, ), desc.IntParam( - name='maxIteration', - label='Max Iteration', - description='Maximum number of iterations allowed in ransac step.', + name="maxIteration", + label="Max Iterations", + description="Maximum number of iterations allowed in the ransac step.", value=2048, range=(1, 20000, 1), uid=[0], advanced=True, ), desc.FloatParam( - name='geometricError', - label='Geometric Validation Error', - description='Maximum error (in pixels) allowed for features matching during geometric verification.\n' - 'If set to 0, it will select a threshold according to the localizer estimator used\n' - '(if ACRansac, it will analyze the input data to select the optimal value).', + name="geometricError", + label="Geometric Validation Error", + description="Maximum error (in pixels) allowed for features matching during geometric verification.\n" + "If set to 0, it will select a threshold according to the localizer estimator used\n" + "(if ACRansac, it will analyze the input data to select the optimal value).", value=0.0, range=(0.0, 10.0, 0.1), uid=[0], advanced=True, ), desc.FloatParam( - name='knownPosesGeometricErrorMax', - label='Known Poses Geometric Error Max', - description='Maximum error (in pixels) allowed for features matching guided by geometric information from known camera poses.\n' - 'If set to 0 it lets the ACRansac select an optimal value.', + name="knownPosesGeometricErrorMax", + label="Known Poses Geometric Error Max", + description="Maximum error (in pixels) allowed for features matching guided by geometric information from known camera poses.\n" + "If set to 0 it lets the ACRansac select an optimal value.", value=5.0, range=(0.0, 100.0, 1.0), uid=[0], advanced=True, ), desc.FloatParam( - name='minRequired2DMotion', - label='Minimal 2D Motion', - description='Filter out matches without enough 2D motion (threshold in pixels). Use -1 to disable this filter. Useful for filtering the background during acquisition with a turntable and a static camera.', + name="minRequired2DMotion", + label="Minimal 2D Motion", + description="Filter out matches without enough 2D motion (threshold in pixels).\n" + "Use -1 to disable this filter.\n" + "Useful for filtering the background during acquisition with a turntable and a static camera.", value=-1.0, range=(0.0, 10.0, 1.0), uid=[0], ), desc.IntParam( - name='maxMatches', - label='Max Matches', - description='Maximum number of matches to keep.', + name="maxMatches", + label="Max Matches", + description="Maximum number of matches to keep.", value=0, range=(0, 10000, 1), uid=[0], advanced=True, ), desc.BoolParam( - name='savePutativeMatches', - label='Save Putative Matches', - description='putative matches.', + name="savePutativeMatches", + label="Save Putative Matches", + description="Save putative matches.", value=False, uid=[0], advanced=True, ), desc.BoolParam( - name='crossMatching', - label='Cross Matching', - description='Make sure that the matching process is symmetric (same matches for I->J than for J->I)', + name="crossMatching", + label="Cross Matching", + description="Ensure that the matching process is symmetric (same matches for I->J than for J->I).", value=False, uid=[0], ), desc.BoolParam( - name='guidedMatching', - label='Guided Matching', - description='the found model to improve the pairwise correspondences.', + name="guidedMatching", + label="Guided Matching", + description="Use the found model to improve the pairwise correspondences.", value=False, uid=[0], ), desc.BoolParam( - name='matchFromKnownCameraPoses', - label='Match From Known Camera Poses', - description='Enable the usage of geometric information from known camera poses to guide the feature matching.\n' - 'If some cameras have unknown poses (so there is no geometric prior), the standard feature matching will be performed.', + name="matchFromKnownCameraPoses", + label="Match From Known Camera Poses", + description="Enable the usage of geometric information from known camera poses to guide the feature matching.\n" + "If some cameras have unknown poses (so there is no geometric prior), the standard feature matching will be performed.", value=False, uid=[0], ), desc.BoolParam( - name='exportDebugFiles', - label='Export Debug Files', - description='debug files (svg, dot).', + name="exportDebugFiles", + label="Export Debug Files", + description="Expor debug files (svg, dot).", value=False, uid=[], advanced=True ), 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=[], ) ] outputs = [ desc.File( - name='output', - label='Matches Folder', - description='Path to a folder in which computed matches will be stored.', + name="output", + label="Matches Folder", + description="Path to a folder in which the computed matches are stored.", value=desc.Node.internalFolder, uid=[], ), diff --git a/meshroom/nodes/aliceVision/FeatureRepeatability.py b/meshroom/nodes/aliceVision/FeatureRepeatability.py index 41d9967df5..bfb2061616 100644 --- a/meshroom/nodes/aliceVision/FeatureRepeatability.py +++ b/meshroom/nodes/aliceVision/FeatureRepeatability.py @@ -16,88 +16,88 @@ class FeatureRepeatability(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='Input Folder', - description='Input Folder with evaluation datasets.', - value='', + name="input", + label="Input Folder", + description="Input folder with evaluation datasets.", + value="", uid=[0], ), desc.ChoiceParam( - name='describerTypes', - label='Describer Types', - description='Describer types used to describe an image.', - value=['sift'], - values=['sift', 'sift_float', 'sift_upright', 'dspsift', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv'], + name="describerTypes", + label="Describer Types", + description="Describer types used to describe an image.", + value=["sift"], + values=["sift", "sift_float", "sift_upright", "dspsift", "akaze", "akaze_liop", "akaze_mldb", "cctag3", "cctag4", "sift_ocv", "akaze_ocv"], exclusive=False, uid=[0], - joinChar=',', + joinChar=",", ), desc.ChoiceParam( - name='describerPreset', - label='Describer Density', - description='Control the ImageDescriber density (low, medium, normal, high, ultra).\n' - 'Warning: Use ULTRA only on small datasets.', - value='normal', - values=['low', 'medium', 'normal', 'high', 'ultra'], + name="describerPreset", + label="Describer Density", + description="Control the ImageDescriber density (low, medium, normal, high, ultra).\n" + "Warning: Use ULTRA only on small datasets.", + value="normal", + values=["low", "medium", "normal", "high", "ultra"], exclusive=True, uid=[0], ), desc.ChoiceParam( - name='describerQuality', - label='Describer Quality', - description='Control the ImageDescriber quality (low, medium, normal, high, ultra).', - value='normal', - values=['low', 'medium', 'normal', 'high', 'ultra'], + name="describerQuality", + label="Describer Quality", + description="Control the ImageDescriber quality (low, medium, normal, high, ultra).", + value="normal", + values=["low", "medium", "normal", "high", "ultra"], exclusive=True, uid=[0], ), desc.ChoiceParam( - name='contrastFiltering', - label='Contrast Filtering', + name="contrastFiltering", + label="Contrast Filtering", description="Contrast filtering method to ignore features with too low contrast that can be considered as noise:\n" - "* Static: Fixed threshold.\n" - "* AdaptiveToMedianVariance: Based on image content analysis.\n" - "* NoFiltering: Disable contrast filtering.\n" - "* GridSortOctaves: Grid Sort but per octaves (and only per scale at the end).\n" - "* GridSort: Grid sort per octaves and at the end (scale * peakValue).\n" - "* GridSortScaleSteps: Grid sort per octaves and at the end (scale and then peakValue).\n" - "* NonExtremaFiltering: Filter non-extrema peakValues.\n", - value='Static', - values=['Static', 'AdaptiveToMedianVariance', 'NoFiltering', 'GridSortOctaves', 'GridSort', 'GridSortScaleSteps', 'GridSortOctaveSteps', 'NonExtremaFiltering'], + " - Static: Fixed threshold.\n" + " - AdaptiveToMedianVariance: Based on image content analysis.\n" + " - NoFiltering: Disable contrast filtering.\n" + " - GridSortOctaves: Grid Sort but per octaves (and only per scale at the end).\n" + " - GridSort: Grid sort per octaves and at the end (scale * peakValue).\n" + " - GridSortScaleSteps: Grid sort per octaves and at the end (scale and then peakValue).\n" + " - NonExtremaFiltering: Filter non-extrema peakValues.", + value="Static", + values=["Static", "AdaptiveToMedianVariance", "NoFiltering", "GridSortOctaves", "GridSort", "GridSortScaleSteps", "GridSortOctaveSteps", "NonExtremaFiltering"], exclusive=True, advanced=True, uid=[0], ), desc.FloatParam( - name='relativePeakThreshold', - label='Relative Peak Threshold', - description='Peak Threshold relative to median of gradients.', + name="relativePeakThreshold", + label="Relative Peak Threshold", + description="Peak threashold relative to the median of gradients.", value=0.01, range=(0.01, 1.0, 0.001), advanced=True, uid=[0], - enabled=lambda node: (node.contrastFiltering.value == 'AdaptiveToMedianVariance'), + enabled=lambda node: (node.contrastFiltering.value == "AdaptiveToMedianVariance"), ), desc.BoolParam( - name='gridFiltering', - label='Grid Filtering', - description='Enable grid filtering. Highly recommended to ensure usable number of features.', + name="gridFiltering", + label="Grid Filtering", + description="Enable grid filtering. Highly recommended to ensure a usable number of features.", value=True, advanced=True, uid=[0], ), desc.BoolParam( - name='forceCpuExtraction', - label='Force CPU Extraction', - description='Use only CPU feature extraction.', + name="forceCpuExtraction", + label="Force CPU Extraction", + description="Use only CPU feature extraction.", value=True, uid=[], advanced=True, ), desc.IntParam( - name='invalidate', - label='Invalidate', - description='Invalidate.', + name="invalidate", + label="Invalidate", + description="Invalidate.", value=0, range=(0, 10000, 1), group="", @@ -106,17 +106,17 @@ class FeatureRepeatability(desc.AVCommandLineNode): desc.StringParam( name="comments", label="Comments", - description="Comments", + description="Comments.", value="", group="", uid=[], ), 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=[], ) @@ -124,9 +124,9 @@ class FeatureRepeatability(desc.AVCommandLineNode): outputs = [ desc.File( - name='output', - label='Folder', - description='Output path for the features and descriptors files (*.feat, *.desc).', + name="output", + label="Folder", + description="Output path for the features and descriptors files (*.feat, *.desc).", value=desc.Node.internalFolder, uid=[], ), diff --git a/meshroom/nodes/aliceVision/GlobalSfM.py b/meshroom/nodes/aliceVision/GlobalSfM.py index b3e93aa02a..de7e5cfe5d 100644 --- a/meshroom/nodes/aliceVision/GlobalSfM.py +++ b/meshroom/nodes/aliceVision/GlobalSfM.py @@ -18,85 +18,85 @@ class GlobalSfM(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='Input', - description="SfM Data File", - value='', + name="input", + label="SfMData", + description="Input SfMData file.", + value="", uid=[0], ), desc.ListAttribute( elementDesc=desc.File( - name='featuresFolder', - label='Features Folder', - description="", - value='', + name="featuresFolder", + label="Features Folder", + description="Folder containing some extracted features.", + value="", uid=[0], ), - name='featuresFolders', - label='Features Folders', + name="featuresFolders", + label="Features Folders", description="Folder(s) containing the extracted features." ), desc.ListAttribute( elementDesc=desc.File( - name='matchesFolder', - label='Matches Folder', - description="", - value='', + name="matchesFolder", + label="Matches Folder", + description="Folder containing some computed matches.", + value="", uid=[0], ), - name='matchesFolders', - label='Matches Folders', + name="matchesFolders", + label="Matches Folders", description="Folder(s) in which computed matches are stored." ), 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'], + 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"], exclusive=False, uid=[0], - joinChar=',', + joinChar=",", ), desc.ChoiceParam( - name='rotationAveraging', - label='Rotation Averaging Method', - description="Method for rotation averaging :\n" - " * L1 minimization\n" - " * L2 minimization\n", - values=['L1_minimization', 'L2_minimization'], - value='L2_minimization', + name="rotationAveraging", + label="Rotation Averaging Method", + description="Method for rotation averaging:\n" + " - L1 minimization\n" + " - L2 minimization", + values=["L1_minimization", "L2_minimization"], + value="L2_minimization", exclusive=True, uid=[0], ), desc.ChoiceParam( - name='translationAveraging', - label='Translation Averaging Method', - description="Method for translation averaging :\n" - " * L1 minimization\n" - " * L2 minimization of sum of squared Chordal distances\n" - " * L1 soft minimization", - values=['L1_minimization', 'L2_minimization', 'L1_soft_minimization'], - value='L1_soft_minimization', + name="translationAveraging", + label="Translation Averaging Method", + description="Method for translation averaging:\n" + " - L1 minimization\n" + " - L2 minimization of sum of squared Chordal distances\n" + " - L1 soft minimization", + values=["L1_minimization", "L2_minimization", "L1_soft_minimization"], + value="L1_soft_minimization", exclusive=True, uid=[0], ), desc.BoolParam( - name='lockAllIntrinsics', - label='Force Lock of All Intrinsic Camera Parameters.', - description='Force to keep constant all the intrinsics parameters of the cameras (focal length, \n' - 'principal point, distortion if any) during the reconstruction.\n' - 'This may be helpful if the input cameras are already fully calibrated.', + name="lockAllIntrinsics", + label="Lock All Intrinsic Camera Parameters", + description="Force to keep all the intrinsics parameters of the cameras (focal length, \n" + "principal point, distortion if any) constant during the reconstruction.\n" + "This may be helpful if the input cameras are already fully calibrated.", 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'], + 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=[], ) @@ -104,23 +104,23 @@ class GlobalSfM(desc.AVCommandLineNode): outputs = [ desc.File( - name='output', - label='Output SfMData File', - description='Path to the output sfmdata file', - value=desc.Node.internalFolder + 'sfm.abc', + name="output", + label="SfMData", + description="Path to the output SfMData file.", + value=desc.Node.internalFolder + "sfm.abc", uid=[], ), desc.File( - name='outputViewsAndPoses', - label='Output Poses', - description='''Path to the output sfmdata file with cameras (views and poses).''', - value=desc.Node.internalFolder + 'cameras.sfm', + name="outputViewsAndPoses", + label="Output Poses", + description="Path to the output SfMData file with cameras (views and poses).", + value=desc.Node.internalFolder + "cameras.sfm", uid=[], ), desc.File( - name='extraInfoFolder', - label='Folder', - description='Folder for intermediate reconstruction files and additional reconstruction information files.', + name="extraInfoFolder", + label="Folder", + description="Folder for intermediate reconstruction files and additional reconstruction information files.", value=desc.Node.internalFolder, uid=[], ), From 3146dcface348f8be3db1da6556b039be9aa131b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= Date: Fri, 16 Jun 2023 10:31:18 +0200 Subject: [PATCH 3/5] [nodes] I-L: Harmonize and improve labels and descriptions Use CamelCase for all labels, always end descriptions with periods, and replace the mixed use of single and double quotes with double quotes only. --- meshroom/nodes/aliceVision/ImageMasking.py | 189 ++-- meshroom/nodes/aliceVision/ImageMatching.py | 108 +-- .../aliceVision/ImageMatchingMultiSfM.py | 135 +-- meshroom/nodes/aliceVision/ImageProcessing.py | 836 ++++++++++-------- .../nodes/aliceVision/ImportKnownPoses.py | 33 +- .../nodes/aliceVision/KeyframeSelection.py | 24 +- .../nodes/aliceVision/LdrToHdrCalibration.py | 117 +-- meshroom/nodes/aliceVision/LdrToHdrMerge.py | 189 ++-- .../nodes/aliceVision/LdrToHdrSampling.py | 102 +-- .../nodes/aliceVision/LightingCalibration.py | 53 +- .../nodes/aliceVision/LightingEstimation.py | 79 +- 11 files changed, 977 insertions(+), 888 deletions(-) diff --git a/meshroom/nodes/aliceVision/ImageMasking.py b/meshroom/nodes/aliceVision/ImageMasking.py index e52ce5caeb..48a810169a 100644 --- a/meshroom/nodes/aliceVision/ImageMasking.py +++ b/meshroom/nodes/aliceVision/ImageMasking.py @@ -9,138 +9,143 @@ class ImageMasking(desc.AVCommandLineNode): parallelization = desc.Parallelization(blockSize=40) commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}' + documentaiton = ''' + ''' + inputs = [ desc.File( - name='input', - label='Input', - description='''SfMData file.''', - value='', + name="input", + label="SfMData", + description="Input SfMData file.", + value="", uid=[0], ), desc.ChoiceParam( - name='algorithm', - label='Algorithm', - description='', - value='HSV', - values=['HSV', 'AutoGrayscaleThreshold'], + name="algorithm", + label="Algorithm", + description="", + value="HSV", + values=["HSV", "AutoGrayscaleThreshold"], exclusive=True, uid=[0], ), desc.GroupAttribute( name="hsv", label="HSV Parameters", - description="""Values to select: - - Green: default values - - White: Tolerance = 1, minSaturation = 0, maxSaturation = 0.1, minValue = 0.8, maxValue = 1 - - Black: Tolerance = 1, minSaturation = 0, maxSaturation = 0.1, minValue = 0, maxValue = 0.2 - """, + description="Values to select:\n" + " - Green: default values\n" + " - White: Tolerance = 1, minSaturation = 0, maxSaturation = 0.1, minValue = 0.8, maxValue = 1\n" + " - Black: Tolerance = 1, minSaturation = 0, maxSaturation = 0.1, minValue = 0, maxValue = 0.2", group=None, - enabled=lambda node: node.algorithm.value == 'HSV', + enabled=lambda node: node.algorithm.value == "HSV", groupDesc=[ - desc.FloatParam( - name='hsvHue', - label='Hue', - description='Hue value to isolate in [0,1] range. 0 = red, 0.33 = green, 0.66 = blue, 1 = red.', - semantic='color/hue', - value=0.33, - range=(0.0, 1.0, 0.01), - uid=[0] - ), - desc.FloatParam( - name='hsvHueRange', - label='Tolerance', - description='Tolerance around the hue value to isolate.', - value=0.1, - range=(0.0, 1.0, 0.01), - uid=[0] - ), - desc.FloatParam( - name='hsvMinSaturation', - label='Min Saturation', - description='Hue is meaningless if saturation is low. Do not mask pixels below this threshold.', - value=0.3, - range=(0.0, 1.0, 0.01), - uid=[0] - ), - desc.FloatParam( - name='hsvMaxSaturation', - label='Max Saturation', - description='Do not mask pixels above this threshold. It might be useful to mask white/black pixels.', - value=1.0, - range=(0.0, 1.0, 0.01), - uid=[0] - ), - desc.FloatParam( - name='hsvMinValue', - label='Min Value', - description='Hue is meaningless if value is low. Do not mask pixels below this threshold.', - value=0.3, - range=(0.0, 1.0, 0.01), - uid=[0] - ), - desc.FloatParam( - name='hsvMaxValue', - label='Max Value', - description='Do not mask pixels above this threshold. It might be useful to mask white/black pixels.', - value=1.0, - range=(0.0, 1.0, 0.01), - uid=[0] - ), - ]), + desc.FloatParam( + name="hsvHue", + label="Hue", + description="Hue value to isolate in [0,1] range.\n" + "0 = red, 0.33 = green, 0.66 = blue, 1 = red.", + semantic="color/hue", + value=0.33, + range=(0.0, 1.0, 0.01), + uid=[0] + ), + desc.FloatParam( + name="hsvHueRange", + label="Tolerance", + description="Tolerance around the hue value to isolate.", + value=0.1, + range=(0.0, 1.0, 0.01), + uid=[0] + ), + desc.FloatParam( + name="hsvMinSaturation", + label="Min Saturation", + description="Hue is meaningless if saturation is low. Do not mask pixels below this threshold.", + value=0.3, + range=(0.0, 1.0, 0.01), + uid=[0] + ), + desc.FloatParam( + name="hsvMaxSaturation", + label="Max Saturation", + description="Do not mask pixels above this threshold. It might be useful to mask white/black pixels.", + value=1.0, + range=(0.0, 1.0, 0.01), + uid=[0] + ), + desc.FloatParam( + name="hsvMinValue", + label="Min Value", + description="Hue is meaningless if the value is low. Do not mask pixels below this threshold.", + value=0.3, + range=(0.0, 1.0, 0.01), + uid=[0] + ), + desc.FloatParam( + name="hsvMaxValue", + label="Max Value", + description="Do not mask pixels above this threshold. It might be useful to mask white/black pixels.", + value=1.0, + range=(0.0, 1.0, 0.01), + uid=[0] + ), + ] + ), desc.BoolParam( - name='invert', - label='Invert', - description='''If ticked, the selected area is ignored. - If not, only the selected area is considered.''', + name="invert", + label="Invert", + description="If selected, the selected area is ignored.\n" + "If not, only the selected area is considered.", value=True, uid=[0] ), desc.IntParam( - name='growRadius', - label='Grow Radius', - description='Grow the selected area. It might be used to fill the holes: then use shrinkRadius to restore the initial coutours.', + name="growRadius", + label="Grow Radius", + description="Grow the selected area.\n" + "It might be used to fill the holes: then use shrinkRadius to restore the initial coutours.", value=0, range=(0, 50, 1), uid=[0] ), desc.IntParam( - name='shrinkRadius', - label='Shrink Radius', - description='Shrink the selected area.', + name="shrinkRadius", + label="Shrink Radius", + description="Shrink the selected area.", value=0, range=(0, 50, 1), uid=[0] ), desc.File( - name='depthMapFolder', - label='Depth Mask Folder', - description='''Depth Mask Folder''', - value='', + name="depthMapFolder", + label="Depth Mask Folder", + description="Depth mask folder.", + value="", uid=[0], ), desc.StringParam( - name='depthMapExp', - label='Depth Mask Expression', - description='''Depth Mask Expression, like "{inputFolder}/{stem}-depth.{ext}".''', - value='', + name="depthMapExp", + label="Depth Mask Expression", + description="Depth mask expression, like '{inputFolder}/{stem}-depth.{ext}'.", + 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'], + 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 folder.''', + name="output", + label="Output", + description="Output folder.", value=desc.Node.internalFolder, uid=[], ), diff --git a/meshroom/nodes/aliceVision/ImageMatching.py b/meshroom/nodes/aliceVision/ImageMatching.py index 60992785ac..64c05330cd 100644 --- a/meshroom/nodes/aliceVision/ImageMatching.py +++ b/meshroom/nodes/aliceVision/ImageMatching.py @@ -35,17 +35,17 @@ class ImageMatching(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='SfmData', - description='SfMData file .', - value='', + name="input", + label="SfMData", + description="Input SfMData file.", + value="", uid=[0], ), desc.ListAttribute( elementDesc=desc.File( name="featuresFolder", label="Features Folder", - description="", + description="Folder containing some extracted features and descriptors.", value="", uid=[0], ), @@ -54,85 +54,87 @@ class ImageMatching(desc.AVCommandLineNode): description="Folder(s) containing the extracted features and descriptors." ), desc.ChoiceParam( - name='method', - label='Method', - description='Method used to select the image pairs to match:\n' - ' * VocabularyTree: It uses image retrieval techniques to find images that share some content without the cost of resolving all \n' - 'feature matches in details. Each image is represented in a compact image descriptor which allows to compute the distance between all \n' - 'images descriptors very efficiently. If your scene contains less than "Voc Tree: Minimal Number of Images", all image pairs will be selected.\n' - ' * Sequential: If your input is a video sequence, you can use this option to link images between them over time.\n' - ' * SequentialAndVocabularyTree: Combines sequential approach with VocTree to enable connections between keyframes at different times.\n' - ' * Exhaustive: Export all image pairs.\n' - ' * Frustum: If images have known poses, computes the intersection between cameras frustums to create the list of image pairs.\n' - ' * FrustumOrVocabularyTree: If images have known poses, use frustum intersection else use VocabularyTree.\n', - value='SequentialAndVocabularyTree', - values=['VocabularyTree', 'Sequential', 'SequentialAndVocabularyTree', 'Exhaustive', 'Frustum', 'FrustumOrVocabularyTree'], + name="method", + label="Method", + description="Method used to select the image pairs to match:\n" + " - VocabularyTree: It uses image retrieval techniques to find images that share some content without the cost of resolving all \n" + "feature matches in details. Each image is represented in a compact image descriptor which allows to compute the distance between all \n" + "images descriptors very efficiently. If your scene contains less than 'Voc Tree: Minimal Number of Images', all image pairs will be selected.\n" + " - Sequential: If your input is a video sequence, you can use this option to link images between them over time.\n" + " - SequentialAndVocabularyTree: Combines sequential approach with VocTree to enable connections between keyframes at different times.\n" + " - Exhaustive: Export all image pairs.\n" + " - Frustum: If images have known poses, computes the intersection between cameras frustums to create the list of image pairs.\n" + " - FrustumOrVocabularyTree: If images have known poses, use frustum intersection else use VocabularyTree.\n", + value="SequentialAndVocabularyTree", + values=["VocabularyTree", "Sequential", "SequentialAndVocabularyTree", "Exhaustive", "Frustum", "FrustumOrVocabularyTree"], exclusive=True, uid=[0], ), desc.File( - name='tree', - label='Voc Tree: Tree', - description='Input name for the vocabulary tree file.', - value='${ALICEVISION_VOCTREE}', + name="tree", + label="Voc Tree: Tree", + description="Input name for the vocabulary tree file.", + value="${ALICEVISION_VOCTREE}", uid=[], - enabled=lambda node: 'VocabularyTree' in node.method.value, + enabled=lambda node: "VocabularyTree" in node.method.value, ), desc.File( - name='weights', - label='Voc Tree: Weights', - description='Input name for the weight file, if not provided the weights will be computed on the database built with the provided set.', - value='', + name="weights", + label="Voc Tree: Weights", + description="Input name for the weight file.\n" + "If not provided, the weights will be computed on the database built with the provided set.", + value="", uid=[0], advanced=True, - enabled=lambda node: 'VocabularyTree' in node.method.value, + enabled=lambda node: "VocabularyTree" in node.method.value, ), desc.IntParam( - name='minNbImages', - label='Voc Tree: Minimal Number of Images', - description='Minimal number of images to use the vocabulary tree. If we have less features than this threshold, we will compute all matching combinations.', + name="minNbImages", + label="Voc Tree: Minimum Number Of Images", + description="Minimum number of images to use the vocabulary tree.\n" + "If we have less features than this threshold, we will compute all matching combinations.", value=200, range=(0, 500, 1), uid=[0], advanced=True, - enabled=lambda node: 'VocabularyTree' in node.method.value, + enabled=lambda node: "VocabularyTree" in node.method.value, ), desc.IntParam( - name='maxDescriptors', - label='Voc Tree: Max Descriptors', - description='Limit the number of descriptors you load per image. Zero means no limit.', + name="maxDescriptors", + label="Voc Tree: Max Descriptors", + description="Limit the number of descriptors you load per image. 0 means no limit.", value=500, range=(0, 100000, 1), uid=[0], advanced=True, - enabled=lambda node: 'VocabularyTree' in node.method.value, + enabled=lambda node: "VocabularyTree" in node.method.value, ), desc.IntParam( - name='nbMatches', - label='Voc Tree: Nb Matches', - description='The number of matches to retrieve for each image (If 0 it will retrieve all the matches).', + name="nbMatches", + label="Voc Tree: Nb Matches", + description="The number of matches to retrieve for each image. (If 0, it will retrieve all the matches).", value=40, range=(0, 1000, 1), uid=[0], advanced=True, - enabled=lambda node: 'VocabularyTree' in node.method.value, + enabled=lambda node: "VocabularyTree" in node.method.value, ), desc.IntParam( - name='nbNeighbors', - label='Sequential: Nb Neighbors', - description='The number of neighbors to retrieve for each image (If 0 it will retrieve all the neighbors).', + name="nbNeighbors", + label="Sequential: Nb Neighbors", + description="The number of neighbors to retrieve for each image. (If 0, it will retrieve all the neighbors).", value=5, range=(0, 1000, 1), uid=[0], advanced=True, - enabled=lambda node: 'Sequential' in node.method.value, + enabled=lambda node: "Sequential" in node.method.value, ), 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=[], ) @@ -140,10 +142,10 @@ class ImageMatching(desc.AVCommandLineNode): outputs = [ desc.File( - name='output', - label='Image Pairs', - description='Filepath to the output file with the list of selected image pairs.', - value=desc.Node.internalFolder + 'imageMatches.txt', + name="output", + label="Image Pairs", + description="Filepath to the output file with the list of selected image pairs.", + value=desc.Node.internalFolder + "imageMatches.txt", uid=[], ), ] diff --git a/meshroom/nodes/aliceVision/ImageMatchingMultiSfM.py b/meshroom/nodes/aliceVision/ImageMatchingMultiSfM.py index 6b25cb66af..5d834eb99e 100644 --- a/meshroom/nodes/aliceVision/ImageMatchingMultiSfM.py +++ b/meshroom/nodes/aliceVision/ImageMatchingMultiSfM.py @@ -20,24 +20,24 @@ class ImageMatchingMultiSfM(desc.AVCommandLineNode): ''' inputs = [ desc.File( - name='input', - label='Input A', - description='SfMData file .', - value='', + name="input", + label="Input A", + description="First input SfMData file.", + value="", uid=[0], ), desc.File( - name='inputB', - label='Input B', - description='SfMData file .', - value='', + name="inputB", + label="Input B", + description="Second input SfMData file.", + value="", uid=[0], ), desc.ListAttribute( elementDesc=desc.File( name="featuresFolder", label="Features Folder", - description="", + description="Folder containing some extracted features and descriptors.", value="", uid=[0], ), @@ -46,93 +46,98 @@ class ImageMatchingMultiSfM(desc.AVCommandLineNode): description="Folder(s) containing the extracted features and descriptors." ), desc.ChoiceParam( - name='method', - label='Method', - description='Method used to select the image pairs to match:\n' - ' * VocabularyTree: It uses image retrieval techniques to find images that share some content without the cost of resolving all \n' - 'feature matches in details. Each image is represented in a compact image descriptor which allows to compute the distance between all \n' - 'images descriptors very efficiently. If your scene contains less than "Voc Tree: Minimal Number of Images", all image pairs will be selected.\n' - ' * SequentialAndVocabularyTree: Combines sequential approach with VocTree to enable connections between keyframes at different times.\n' - ' * Exhaustive: Export all image pairs.\n' - ' * Frustum: If images have known poses, computes the intersection between cameras frustums to create the list of image pairs.\n' - ' * FrustumOrVocabularyTree: If images have known poses, use frustum intersection else use VocabularyTree.\n', - value='SequentialAndVocabularyTree', - values=['VocabularyTree', 'SequentialAndVocabularyTree', 'Exhaustive', 'Frustum'], + name="method", + label="Method", + description="Method used to select the image pairs to match:\n" + " - VocabularyTree: It uses image retrieval techniques to find images that share some content without the cost of resolving all \n" + "feature matches in details. Each image is represented in a compact image descriptor which allows to compute the distance between all \n" + "images descriptors very efficiently. If your scene contains less than 'Voc Tree: Minimal Number of Images', all image pairs will be selected.\n" + " - SequentialAndVocabularyTree: Combines sequential approach with VocTree to enable connections between keyframes at different times.\n" + " - Exhaustive: Export all image pairs.\n" + " - Frustum: If images have known poses, computes the intersection between cameras frustums to create the list of image pairs.\n" + " - FrustumOrVocabularyTree: If images have known poses, use frustum intersection. Otherwise, use VocabularyTree.\n", + value="SequentialAndVocabularyTree", + values=["VocabularyTree", "SequentialAndVocabularyTree", "Exhaustive", "Frustum"], exclusive=True, uid=[0], ), desc.File( - name='tree', - label='Voc Tree: Tree', - description='Input name for the vocabulary tree file.', - value='${ALICEVISION_VOCTREE}', + name="tree", + label="Voc Tree: Tree", + description="Input name for the vocabulary tree file.", + value="${ALICEVISION_VOCTREE}", uid=[], - enabled=lambda node: 'VocabularyTree' in node.method.value, + enabled=lambda node: "VocabularyTree" in node.method.value, ), desc.File( - name='weights', - label='Voc Tree: Weights', - description='Input name for the weight file, if not provided the weights will be computed on the database built with the provided set.', - value='', + name="weights", + label="Voc Tree: Weights", + description="Input name for the weight file.\n" + "If not provided, the weights will be computed on the database built with the provided set.", + value="", uid=[0], advanced=True, - enabled=lambda node: 'VocabularyTree' in node.method.value, + enabled=lambda node: "VocabularyTree" in node.method.value, ), desc.ChoiceParam( - name='matchingMode', - label='Matching Mode', - description='The mode to combine image matching between the input SfMData A and B:\n"a/a+a/b" for A with A + A with B.\n"a/ab" for A with A and B.\n"a/b" for A with B.', - value='a/a+a/b', - values=['a/a+a/b','a/ab', 'a/b'], + name="matchingMode", + label="Matching Mode", + description="The mode to combine image matching between the input SfMData A and B:\n" + "- 'a/a+a/b' for A with A + A with B.\n" + "- 'a/ab' for A with A and B.\n" + "- 'a/b' for A with B.", + value="a/a+a/b", + values=["a/a+a/b","a/ab", "a/b"], exclusive=True, uid=[0], ), desc.IntParam( - name='minNbImages', - label='Voc Tree: Minimal Number of Images', - description='Minimal number of images to use the vocabulary tree. If we have less features than this threshold, we will compute all matching combinations.', + name="minNbImages", + label="Voc Tree: Minimum Number Of Images", + description="Minimum number of images to use the vocabulary tree.\n" + "If we have less features than this threshold, we will compute all the matching combinations.", value=200, range=(0, 500, 1), uid=[0], advanced=True, - enabled=lambda node: 'VocabularyTree' in node.method.value, + enabled=lambda node: "VocabularyTree" in node.method.value, ), desc.IntParam( - name='maxDescriptors', - label='Voc Tree: Max Descriptors', - description='Limit the number of descriptors you load per image. Zero means no limit.', + name="maxDescriptors", + label="Voc Tree: Max Descriptors", + description="Limit the number of descriptors you load per image. 0 means no limit.", value=500, range=(0, 100000, 1), uid=[0], advanced=True, - enabled=lambda node: 'VocabularyTree' in node.method.value, + enabled=lambda node: "VocabularyTree" in node.method.value, ), desc.IntParam( - name='nbMatches', - label='Voc Tree: Nb Matches', - description='The number of matches to retrieve for each image (If 0 it will retrieve all the matches).', + name="nbMatches", + label="Voc Tree: Nb Matches", + description="The number of matches to retrieve for each image. (If 0, it will retrieve all the matches).", value=40, range=(0, 1000, 1), uid=[0], advanced=True, - enabled=lambda node: 'VocabularyTree' in node.method.value, + enabled=lambda node: "VocabularyTree" in node.method.value, ), desc.IntParam( - name='nbNeighbors', - label='Sequential: Nb Neighbors', - description='The number of neighbors to retrieve for each image (If 0 it will retrieve all the neighbors).', + name="nbNeighbors", + label="Sequential: Nb Neighbors", + description="The number of neighbors to retrieve for each image. (If 0, it will retrieve all the neighbors).", value=5, range=(0, 1000, 1), uid=[0], advanced=True, - enabled=lambda node: 'Sequential' in node.method.value, + enabled=lambda node: "Sequential" in node.method.value, ), 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=[], ) @@ -140,17 +145,17 @@ class ImageMatchingMultiSfM(desc.AVCommandLineNode): outputs = [ desc.File( - name='output', - label='List File', - description='Filepath to the output file with the list of selected image pairs.', - value=desc.Node.internalFolder + 'imageMatches.txt', + name="output", + label="List File", + description="Filepath to the output file with the list of selected image pairs.", + value=desc.Node.internalFolder + "imageMatches.txt", uid=[], ), desc.File( - name='outputCombinedSfM', - label='Combined SfM', - description='Path for the combined SfMData file', - value=desc.Node.internalFolder + 'combineSfM.sfm', + name="outputCombinedSfM", + label="Combined SfM", + description="Path for the combined SfMData file.", + value=desc.Node.internalFolder + "combineSfM.sfm", uid=[], ), ] diff --git a/meshroom/nodes/aliceVision/ImageProcessing.py b/meshroom/nodes/aliceVision/ImageProcessing.py index c68c41413c..ad12c8cf02 100644 --- a/meshroom/nodes/aliceVision/ImageProcessing.py +++ b/meshroom/nodes/aliceVision/ImageProcessing.py @@ -41,467 +41,520 @@ class ImageProcessing(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='Input', - description='SfMData file input, image filenames or regex(es) on the image file path.\nsupported regex: \'#\' matches a single digit, \'@\' one or more digits, \'?\' one character and \'*\' zero or more.', - value='', + name="input", + label="Input", + description="SfMData file input, image filenames or regex(es) on the image file path.\n" + "Supported regex:\n" + " - '#' matches a single digit.\n" + " - '@' matches one or more digits.\n" + " - '?' matches one character.\n" + " - '*' matches zero character or more.", + value="", uid=[0], ), desc.ListAttribute( elementDesc=desc.File( name="inputFolder", - label="input Folder", - description="", + label="Input Folder", + description="Folder containing images.", value="", uid=[0], ), name="inputFolders", - label="Images input Folders", - description='Use images from specific folder(s).', + label="Input Images Folders", + description="Use images from specific folder(s).", ), desc.ListAttribute( elementDesc=desc.StringParam( name="metadataFolder", label="Metadata Folder", - description="", + description="Specific folder containing images with metadata.", value="", uid=[0], ), name="metadataFolders", - label="Metadata input Folders", - description='Use images metadata from specific folder(s).', + label="Input Metadata Folders", + description="Use images metadata from specific folder(s).", ), desc.ChoiceParam( - name='extension', - label='Output File Extension', - description='Output Image File Extension.', - value='', - values=['', 'exr', 'jpg', 'tiff', 'png'], + name="extension", + label="Output File Extension", + description="Output image file extension.\n" + "If unset, the output file extension will match the input's if possible.", + value="", + values=["", "exr", "jpg", "tiff", "png"], exclusive=True, uid=[0], ), desc.BoolParam( - name='reconstructedViewsOnly', - label='Only Reconstructed Views', - description='Process Only Reconstructed Views', + name="reconstructedViewsOnly", + label="Only Reconstructed Views", + description="Only process reconstructed views.", value=False, uid=[0], ), desc.BoolParam( - name='keepImageFilename', - label='Keep Image Name', - description='Keep original image name instead of view name', + name="keepImageFilename", + label="Keep Image Name", + description="Keep the original image name instead of the view name.", value=False, uid=[0], ), desc.BoolParam( - name='fixNonFinite', - label='Fix Non-Finite', - description='Fix non-finite pixels based on neighboring pixels average.', + name="fixNonFinite", + label="Fix Non-Finite", + description="Fix non-finite pixels based on neighboring pixels average.", value=False, uid=[0], ), desc.BoolParam( - name='exposureCompensation', - label='Exposure Compensation', - description='Exposure compensation (only valid for SfMData)', + name="exposureCompensation", + label="Exposure Compensation", + description="Exposure compensation (only valid for SfMData).", value=False, uid=[0], ), desc.BoolParam( - name='rawAutoBright', - label='RAW Auto Bright', - description='Enable automatic exposure adjustment for RAW images', + name="rawAutoBright", + label="RAW Auto Bright", + description="Enable automatic exposure adjustment for RAW images.", value=False, uid=[0], ), desc.FloatParam( - name='rawExposureAdjust', - label='RAW Exposure Adjustment', - description='Manual exposure adjustment in fstops for RAW images', + name="rawExposureAdjust", + label="RAW Exposure Adjustment", + description="Manual exposure adjustment in fstops for RAW images.", value=0.0, range=(-2.0, 3.0, 0.125), uid=[0], ), - desc.GroupAttribute(name="lensCorrection", label="Lens Correction", description="Automatic lens correction settings.", joinChar=":", groupDesc=[ - desc.BoolParam( - name='lensCorrectionEnabled', - label='Enable', - description='Enable lens correction.', - value=False, - uid=[0], - ), - desc.BoolParam( - name='geometry', - label='Geometry', - description='Geometry correction if a model is available in SfM data.', - value=False, - uid=[0], - enabled=lambda node: node.lensCorrection.lensCorrectionEnabled.value, - ), - desc.BoolParam( - name='vignetting', - label='Vignetting', - description='Vignetting correction if model parameters are available in metadata.', - value=False, - uid=[0], - enabled=lambda node: node.lensCorrection.lensCorrectionEnabled.value, - ), - desc.BoolParam( - name='chromaticAberration', - label='Chromatic Aberration', - description='Chromatic aberration (fringing) correction if model parameters are available in metadata.', - value=False, - uid=[0], - enabled=False # To replace with the line below when the correction of chromatic aberration will be available - # enabled=lambda node: node.lensCorrection.lensCorrectionEnabled.value - ) - ]), + desc.GroupAttribute( + name="lensCorrection", + label="Lens Correction", + description="Automatic lens correction settings.", + joinChar=":", + groupDesc=[ + desc.BoolParam( + name="lensCorrectionEnabled", + label="Enable", + description="Enable lens correction.", + value=False, + uid=[0], + ), + desc.BoolParam( + name="geometry", + label="Geometry", + description="Geometry correction if a model is available in the SfMData.", + value=False, + uid=[0], + enabled=lambda node: node.lensCorrection.lensCorrectionEnabled.value, + ), + desc.BoolParam( + name="vignetting", + label="Vignetting", + description="Vignetting correction if the model parameters are available in the metadata.", + value=False, + uid=[0], + enabled=lambda node: node.lensCorrection.lensCorrectionEnabled.value, + ), + desc.BoolParam( + name="chromaticAberration", + label="Chromatic Aberration", + description="Chromatic aberration (fringing) correction if the model parameters are available in the metadata.", + value=False, + uid=[0], + enabled=False # To replace with the line below when the correction of chromatic aberration will be available + # enabled=lambda node: node.lensCorrection.lensCorrectionEnabled.value + ) + ] + ), desc.FloatParam( - name='scaleFactor', - label='Scale Factor', - description='Scale Factor.', + name="scaleFactor", + label="Scale Factor", + description="Scale factor.", value=1.0, range=(0.0, 1.0, 0.01), uid=[0], ), desc.IntParam( - name='maxWidth', - label='Max Width', - description='Maximal width of the output images (0: ignored).', + name="maxWidth", + label="Max Width", + description="Maximum width of the output images (0: ignored).", value=0, range=(0, 10000, 1), uid=[0], ), desc.IntParam( - name='maxHeight', - label='Max Height', - description='Maximal height of the output images (0: ignored).', + name="maxHeight", + label="Max Height", + description="Maximum height of the output images (0: ignored).", value=0, range=(0, 10000, 1), uid=[0], ), desc.FloatParam( - name='contrast', - label='Contrast', - description='Contrast.', + name="contrast", + label="Contrast", + description="Contrast.", value=1.0, range=(0.0, 100.0, 0.1), uid=[0], ), desc.IntParam( - name='medianFilter', - label='Median Filter', - description='Median Filter.', + name="medianFilter", + label="Median Filter", + description="Median filter.", value=0, range=(0, 10, 1), uid=[0], ), desc.BoolParam( - name='fillHoles', - label='Fill Holes', - description='Fill holes based on the alpha channel.\n' - 'Note: It will enable fixNonFinite, as it is required for the image pyramid construction used to fill holes.', + name="fillHoles", + label="Fill Holes", + description="Fill holes based on the alpha channel.\n" + "Note: It will enable 'fixNonFinite', as it is required for the image pyramid construction used to fill holes.", value=False, uid=[0], ), - desc.GroupAttribute(name="sharpenFilter", label="Sharpen Filter", description="Sharpen Filtering Parameters.", joinChar=":", groupDesc=[ - desc.BoolParam( - name='sharpenFilterEnabled', - label='Enable', - description='Use sharpen.', - value=False, - uid=[0], - ), - desc.IntParam( - name='width', - label='Width', - description='Sharpen Width.', - value=3, - range=(1, 9, 2), - uid=[0], - enabled=lambda node: node.sharpenFilter.sharpenFilterEnabled.value, - ), - desc.FloatParam( - name='contrast', - label='Contrast', - description='Sharpen Contrast.', - value=1.0, - range=(0.0, 100.0, 0.1), - uid=[0], - enabled=lambda node: node.sharpenFilter.sharpenFilterEnabled.value, - ), - desc.FloatParam( - name='threshold', - label='Threshold', - description='Sharpen Threshold.', - value=0.0, - range=(0.0, 1.0, 0.01), - uid=[0], - enabled=lambda node: node.sharpenFilter.sharpenFilterEnabled.value, - ), - ]), - desc.GroupAttribute(name="bilateralFilter", label="Bilateral Filter", description="Bilateral Filtering Parameters.", joinChar=":", groupDesc=[ - desc.BoolParam( - name='bilateralFilterEnabled', - label='Enable', - description='Bilateral Filter.', - value=False, - uid=[0], - ), - desc.IntParam( - name='bilateralFilterDistance', - label='Distance', - description='Diameter of each pixel neighborhood that is used during bilateral filtering.\nCould be very slow for large filters, so it is recommended to use 5.', - value=0, - range=(0, 9, 1), - uid=[0], - enabled=lambda node: node.bilateralFilter.bilateralFilterEnabled.value, - ), - desc.FloatParam( - name='bilateralFilterSigmaSpace', - label='Sigma Coordinate Space', - description='Bilateral Filter sigma in the coordinate space.', - value=0.0, - range=(0.0, 150.0, 0.01), - uid=[0], - enabled=lambda node: node.bilateralFilter.bilateralFilterEnabled.value, - ), - desc.FloatParam( - name='bilateralFilterSigmaColor', - label='Sigma Color Space', - description='Bilateral Filter sigma in the color space.', - value=0.0, - range=(0.0, 150.0, 0.01), - uid=[0], - enabled=lambda node: node.bilateralFilter.bilateralFilterEnabled.value, - ), - ]), - desc.GroupAttribute(name="claheFilter", label="Clahe Filter", description="Clahe Filtering Parameters.", joinChar=":", groupDesc=[ - desc.BoolParam( - name='claheEnabled', - label='Enable', - description='Use Contrast Limited Adaptive Histogram Equalization (CLAHE) Filter.', - value=False, - uid=[0], - ), - desc.FloatParam( - name='claheClipLimit', - label='Clip Limit', - description='Sets Threshold For Contrast Limiting.', - value=4.0, - range=(0.0, 8.0, 1.0), - uid=[0], - enabled=lambda node: node.claheFilter.claheEnabled.value, - ), - desc.IntParam( - name='claheTileGridSize', - label='Tile Grid Size', - description='Sets Size Of Grid For Histogram Equalization. Input Image Will Be Divided Into Equally Sized Rectangular Tiles.', - value=8, - range=(4, 64, 4), - uid=[0], - enabled=lambda node: node.claheFilter.claheEnabled.value, - ), - ]), - desc.GroupAttribute(name="noiseFilter", label="Noise Filter", description="Noise Filtering Parameters.", joinChar=":", groupDesc=[ - desc.BoolParam( - name='noiseEnabled', - label='Enable', - description='Add Noise.', - value=False, - uid=[0], - ), - desc.ChoiceParam( - name='noiseMethod', - label='Method', - description=" * method: There are several noise types to choose from:\n" - " * uniform: adds noise values uninformly distributed on range [A,B).\n" - " * gaussian: adds Gaussian (normal distribution) noise values with mean value A and standard deviation B.\n" - " * salt: changes to value A a portion of pixels given by B.\n", - value='uniform', - values=['uniform', 'gaussian', 'salt'], - exclusive=True, - uid=[0], - enabled=lambda node: node.noiseFilter.noiseEnabled.value, - ), - desc.FloatParam( - name='noiseA', - label='A', - description='Parameter that have a different interpretation depending on the method chosen.', - value=0.0, - range=(0.0, 1.0, 0.0001), - uid=[0], - enabled=lambda node: node.noiseFilter.noiseEnabled.value, - ), - desc.FloatParam( - name='noiseB', - label='B', - description='Parameter that have a different interpretation depending on the method chosen.', - value=1.0, - range=(0.0, 1.0, 0.0001), - uid=[0], - enabled=lambda node: node.noiseFilter.noiseEnabled.value, - ), - desc.BoolParam( - name='noiseMono', - label='Mono', - description='If is Checked, a single noise value will be applied to all channels otherwise a separate noise value will be computed for each channel.', - value=True, - uid=[0], - enabled=lambda node: node.noiseFilter.noiseEnabled.value, - ), - ]), - desc.GroupAttribute(name="nlmFilter", label="NL Means Denoising (8 bits)", - description="NL Means Denoising Parameters.\n This implementation only works on 8-bit images, so the colors can be reduced and clamped.", - joinChar=":", groupDesc=[ - desc.BoolParam( - name='nlmFilterEnabled', - label='Enable', - description='Use Non-local Mean Denoising from OpenCV to denoise images', - value=False, - uid=[0], - ), - desc.FloatParam( - name='nlmFilterH', - label='H', - description='Parameter regulating filter strength for luminance component.\n' - 'Bigger H value perfectly removes noise but also removes image details, smaller H value preserves details but also preserves some noise.', - value=5.0, - range=(1.0, 1000.0, 0.01), - uid=[0], - enabled=lambda node: node.nlmFilter.nlmFilterEnabled.value, - ), - desc.FloatParam( - name='nlmFilterHColor', - label='HColor', - description='Parameter regulating filter strength for color components. Not necessary for grayscale images.\n' - 'Bigger HColor value perfectly removes noise but also removes image details, smaller HColor value preserves details but also preserves some noise.', - value=10.0, - range=(0.0, 1000.0, 0.01), - uid=[0], - enabled=lambda node: node.nlmFilter.nlmFilterEnabled.value, - ), - desc.IntParam( - name='nlmFilterTemplateWindowSize', - label='Template Window Size', - description='Size in pixels of the template patch that is used to compute weights. Should be odd.', - value=7, - range=(1, 101, 2), - uid=[0], - enabled=lambda node: node.nlmFilter.nlmFilterEnabled.value, - ), - desc.IntParam( - name='nlmFilterSearchWindowSize', - label='Search Window Size', - description='Size in pixels of the window that is used to compute weighted average for given pixel. Should be odd. Affect performance linearly: greater searchWindowsSize - greater denoising time.', - value=21, - range=(1, 1001, 2), - uid=[0], - enabled=lambda node: node.nlmFilter.nlmFilterEnabled.value, - ), - ]), + desc.GroupAttribute( + name="sharpenFilter", + label="Sharpen Filter", + description="Sharpen filter parameters.", + joinChar=":", + groupDesc=[ + desc.BoolParam( + name="sharpenFilterEnabled", + label="Enable", + description="Use sharpen filter.", + value=False, + uid=[0], + ), + desc.IntParam( + name="width", + label="Width", + description="Sharpening width.", + value=3, + range=(1, 9, 2), + uid=[0], + enabled=lambda node: node.sharpenFilter.sharpenFilterEnabled.value, + ), + desc.FloatParam( + name="contrast", + label="Contrast", + description="Sharpening contrast.", + value=1.0, + range=(0.0, 100.0, 0.1), + uid=[0], + enabled=lambda node: node.sharpenFilter.sharpenFilterEnabled.value, + ), + desc.FloatParam( + name="threshold", + label="Threshold", + description="Sharpening threshold.", + value=0.0, + range=(0.0, 1.0, 0.01), + uid=[0], + enabled=lambda node: node.sharpenFilter.sharpenFilterEnabled.value, + ), + ] + ), + desc.GroupAttribute( + name="bilateralFilter", + label="Bilateral Filter", + description="Bilateral filter parameters.", + joinChar=":", + groupDesc=[ + desc.BoolParam( + name="bilateralFilterEnabled", + label="Enable", + description="Use bilateral filter.", + value=False, + uid=[0], + ), + desc.IntParam( + name="bilateralFilterDistance", + label="Distance", + description="Diameter of each pixel neighborhood that is used during bilateral filtering.\n" + "Could be very slow for large filters, so it is recommended to use 5.", + value=0, + range=(0, 9, 1), + uid=[0], + enabled=lambda node: node.bilateralFilter.bilateralFilterEnabled.value, + ), + desc.FloatParam( + name="bilateralFilterSigmaSpace", + label="Sigma Coordinate Space", + description="Bilateral filter sigma in the coordinate space.", + value=0.0, + range=(0.0, 150.0, 0.01), + uid=[0], + enabled=lambda node: node.bilateralFilter.bilateralFilterEnabled.value, + ), + desc.FloatParam( + name="bilateralFilterSigmaColor", + label="Sigma Color Space", + description="Bilateral filter sigma in the color space.", + value=0.0, + range=(0.0, 150.0, 0.01), + uid=[0], + enabled=lambda node: node.bilateralFilter.bilateralFilterEnabled.value, + ), + ] + ), + desc.GroupAttribute( + name="claheFilter", + label="Clahe Filter", + description="Clahe filter parameters.", + joinChar=":", + groupDesc=[ + desc.BoolParam( + name="claheEnabled", + label="Enable", + description="Use Contrast Limited Adaptive Histogram Equalization (CLAHE) filter.", + value=False, + uid=[0], + ), + desc.FloatParam( + name="claheClipLimit", + label="Clip Limit", + description="Threshold for contrast limiting.", + value=4.0, + range=(0.0, 8.0, 1.0), + uid=[0], + enabled=lambda node: node.claheFilter.claheEnabled.value, + ), + desc.IntParam( + name="claheTileGridSize", + label="Tile Grid Size", + description="Size of the grid for histogram equalization.\n" + "Input image will be divided into equally sized rectangular tiles.", + value=8, + range=(4, 64, 4), + uid=[0], + enabled=lambda node: node.claheFilter.claheEnabled.value, + ), + ] + ), + desc.GroupAttribute( + name="noiseFilter", + label="Noise Filter", + description="Noise filter parameters.", + joinChar=":", + groupDesc=[ + desc.BoolParam( + name="noiseEnabled", + label="Enable", + description="Add noise.", + value=False, + uid=[0], + ), + desc.ChoiceParam( + name="noiseMethod", + label="Method", + description="There are several noise types to choose from:\n" + " - uniform: adds noise values uniformly distributed on range [A,B).\n" + " - gaussian: adds Gaussian (normal distribution) noise values with mean value A and standard deviation B.\n" + " - salt: changes to value A a portion of pixels given by B.\n", + value="uniform", + values=["uniform", "gaussian", "salt"], + exclusive=True, + uid=[0], + enabled=lambda node: node.noiseFilter.noiseEnabled.value, + ), + desc.FloatParam( + name="noiseA", + label="A", + description="Parameter that has a different interpretation depending on the chosen method:\n" + " - uniform: lower bound of the range on which the noise is uniformly distributed.\n" + " - gaussian: the mean value of the Gaussian noise.\n" + " - salt: the value of the specified portion of pixels.", + value=0.0, + range=(0.0, 1.0, 0.0001), + uid=[0], + enabled=lambda node: node.noiseFilter.noiseEnabled.value, + ), + desc.FloatParam( + name="noiseB", + label="B", + description="Parameter that has a different interpretation depending on the chosen method:\n" + " - uniform: higher bound of the range on which the noise is uniformly distributed.\n" + " - gaussian: the standard deviation of the Gaussian noise.\n" + " - salt: the portion of pixels to set to a specified value.", + value=1.0, + range=(0.0, 1.0, 0.0001), + uid=[0], + enabled=lambda node: node.noiseFilter.noiseEnabled.value, + ), + desc.BoolParam( + name="noiseMono", + label="Mono", + description="If selected, a single noise value will be applied to all channels.\n" + "Otherwise, a separate noise value will be computed for each channel.", + value=True, + uid=[0], + enabled=lambda node: node.noiseFilter.noiseEnabled.value, + ), + ] + ), + desc.GroupAttribute( + name="nlmFilter", + label="NL Means Denoising (8 bits)", + description="NL Means Denoising Parameters.\n" + "This implementation only works on 8-bit images, so the colors can be reduced and clamped.", + joinChar=":", + groupDesc=[ + desc.BoolParam( + name="nlmFilterEnabled", + label="Enable", + description='Use Non-Local Mean Denoising from OpenCV to denoise images.', + value=False, + uid=[0], + ), + desc.FloatParam( + name="nlmFilterH", + label="H", + description="Parameter regulating the filter strength for the luminance component.\n" + "Bigger H value perfectly removes noise but also removes image details,\n" + "smaller H value preserves details but also preserves some noise.", + value=5.0, + range=(1.0, 1000.0, 0.01), + uid=[0], + enabled=lambda node: node.nlmFilter.nlmFilterEnabled.value, + ), + desc.FloatParam( + name="nlmFilterHColor", + label="HColor", + description="Parameter regulating filter strength for color components. Not necessary for grayscale images.\n" + "Bigger HColor value perfectly removes noise but also removes image details,\n" + "smaller HColor value preserves details but also preserves some noise.", + value=10.0, + range=(0.0, 1000.0, 0.01), + uid=[0], + enabled=lambda node: node.nlmFilter.nlmFilterEnabled.value, + ), + desc.IntParam( + name="nlmFilterTemplateWindowSize", + label="Template Window Size", + description="Size in pixels of the template patch that is used to compute weights. Should be odd.", + value=7, + range=(1, 101, 2), + uid=[0], + enabled=lambda node: node.nlmFilter.nlmFilterEnabled.value, + ), + desc.IntParam( + name="nlmFilterSearchWindowSize", + label="Search Window Size", + description="Size in pixels of the window that is used to compute weighted average for a given pixel.\n" + "Should be odd. Affect performance linearly: greater searchWindowsSize - greater denoising time.", + value=21, + range=(1, 1001, 2), + uid=[0], + enabled=lambda node: node.nlmFilter.nlmFilterEnabled.value, + ), + ] + ), desc.ChoiceParam( - name='outputFormat', - label='Output Image Format', - description='Allows you to choose the format of the output image.', - value='rgba', - values=['rgba', 'rgb', 'grayscale'], - exclusive=True, - uid=[0], + name="outputFormat", + label="Output Image Format", + description="Allows you to choose the format of the output image.", + value="rgba", + values=["rgba", "rgb", "grayscale"], + exclusive=True, + uid=[0], ), desc.ChoiceParam( - name='outputColorSpace', - label='Output Color Space', - description='Allows you to choose the color space of the output image.', - value='AUTO', - values=['AUTO', 'sRGB', 'rec709', 'Linear', 'ACES2065-1', 'ACEScg', 'no_conversion'], - exclusive=True, - uid=[0], + name="outputColorSpace", + label="Output Color Space", + description="Allows you to choose the color space of the output image.", + value="AUTO", + values=["AUTO", "sRGB", "rec709", "Linear", "ACES2065-1", "ACEScg", "no_conversion"], + exclusive=True, + uid=[0], ), desc.ChoiceParam( - name='workingColorSpace', - label='Working Color Space', - description='Allows you to choose the color space in which the data are processed.', - value='Linear', - values=['sRGB', 'rec709', 'Linear', 'ACES2065-1', 'ACEScg', 'no_conversion'], - exclusive=True, - uid=[0], - enabled=lambda node: not node.applyDcpMetadata.value, + name="workingColorSpace", + label="Working Color Space", + description="Allows you to choose the color space in which the data are processed.", + value="Linear", + values=["sRGB", "rec709", "Linear", "ACES2065-1", "ACEScg", "no_conversion"], + exclusive=True, + uid=[0], + enabled=lambda node: not node.applyDcpMetadata.value, ), desc.ChoiceParam( - name='rawColorInterpretation', - label='RAW Color Interpretation', - description='Allows you to choose how raw data are color processed.', - value='DCPLinearProcessing' if os.environ.get('ALICEVISION_COLOR_PROFILE_DB', '') else 'LibRawWhiteBalancing', - values=['None', 'LibRawNoWhiteBalancing', 'LibRawWhiteBalancing', 'DCPLinearProcessing', 'DCPMetadata', 'Auto'], - exclusive=True, - uid=[0], + name="rawColorInterpretation", + label="RAW Color Interpretation", + description="Allows you to choose how RAW data are color processed.", + value="DCPLinearProcessing" if os.environ.get("ALICEVISION_COLOR_PROFILE_DB", "") else "LibRawWhiteBalancing", + values=["None", "LibRawNoWhiteBalancing", "LibRawWhiteBalancing", "DCPLinearProcessing", "DCPMetadata", "Auto"], + exclusive=True, + uid=[0], ), desc.BoolParam( - name='applyDcpMetadata', - label='Apply DCP metadata', - description='If the image contains some DCP metadata then generate a DCP profile from them and apply it on the image content', + name="applyDcpMetadata", + label="Apply DCP Metadata", + description="If the image contains some DCP metadata, then generate a DCP profile from them and apply it to the image content.", value=False, uid=[0], ), desc.File( - name='colorProfileDatabase', - label='Color Profile Database', - description='''Color Profile database directory path.''', - value='${ALICEVISION_COLOR_PROFILE_DB}', + name="colorProfileDatabase", + label="Color Profile Database", + description="Color profile database directory path.", + value="${ALICEVISION_COLOR_PROFILE_DB}", uid=[], - enabled=lambda node: (node.rawColorInterpretation.value=='DCPLinearProcessing') or (node.rawColorInterpretation.value=='DCPMetadata'), + enabled=lambda node: (node.rawColorInterpretation.value == "DCPLinearProcessing") or (node.rawColorInterpretation.value == "DCPMetadata"), ), desc.BoolParam( - name='errorOnMissingColorProfile', - label='Error On Missing DCP Color Profile', - description='If a color profile database is specified but no color profile is found for at least one image, then an error is thrown', + name="errorOnMissingColorProfile", + label="Error On Missing DCP Color Profile", + description="If a color profile database is specified but no color profile is found for at least one image, then an error is thrown.", value=True, uid=[0], - enabled=lambda node: (node.rawColorInterpretation.value=='DCPLinearProcessing') or (node.rawColorInterpretation.value=='DCPMetadata'), + enabled=lambda node: (node.rawColorInterpretation.value == "DCPLinearProcessing") or (node.rawColorInterpretation.value == "DCPMetadata"), ), desc.BoolParam( - name='useDCPColorMatrixOnly', - label='Use DCP Color Matrix Only', - description='Use only the Color Matrix information from the DCP and ignore the Forward Matrix.', + name="useDCPColorMatrixOnly", + label="Use DCP Color Matrix Only", + description="Use only the Color Matrix information from the DCP and ignore the Forward Matrix.", value=True, uid=[0], - enabled=lambda node: (node.rawColorInterpretation.value=='DCPLinearProcessing') or (node.rawColorInterpretation.value=='DCPMetadata'), + enabled=lambda node: (node.rawColorInterpretation.value == "DCPLinearProcessing") or (node.rawColorInterpretation.value == "DCPMetadata"), ), desc.BoolParam( - name='doWBAfterDemosaicing', - label='WB After Demosaicing', - description='Do White Balance after demosaicing, just before DCP profile application', + name="doWBAfterDemosaicing", + label="WB After Demosaicing", + description="Do White Balance after demosaicing, just before DCP profile application.", value=False, uid=[0], - enabled=lambda node: (node.rawColorInterpretation.value=='DCPLinearProcessing') or (node.rawColorInterpretation.value=='DCPMetadata'), + enabled=lambda node: (node.rawColorInterpretation.value == "DCPLinearProcessing") or (node.rawColorInterpretation.value == "DCPMetadata"), ), desc.ChoiceParam( - name='demosaicingAlgo', - label='Demosaicing Algorithm', - description='LibRaw Demosaicing Algorithm', - value='AHD', - values=['linear', 'VNG', 'PPG', 'AHD', 'DCB', 'AHD-Mod', 'AFD', 'VCD', 'Mixed', 'LMMSE', 'AMaZE', 'DHT', 'AAHD', 'none'], + name="demosaicingAlgo", + label="Demosaicing Algorithm", + description="LibRaw demosaicing algorithm to use.", + value="AHD", + values=["linear", "VNG", "PPG", "AHD", "DCB", "AHD-Mod", "AFD", "VCD", "Mixed", "LMMSE", "AMaZE", "DHT", "AAHD", "none"], exclusive=True, uid=[0], ), desc.ChoiceParam( - name='highlightMode', - label='Highlight Mode', - description='LibRaw highlight mode:\n' - ' * 0: Clip (default)\n' - ' * 1: Unclip\n' - ' * 2: Blend\n' - ' * 3-9: Rebuild', + name="highlightMode", + label="Highlight Mode", + description="LibRaw highlight mode:\n" + " - 0: Clip (default)\n" + " - 1: Unclip\n" + " - 2: Blend\n" + " - 3-9: Rebuild", value=0, values=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9], exclusive=True, @@ -509,62 +562,63 @@ class ImageProcessing(desc.AVCommandLineNode): ), desc.FloatParam( - name='correlatedColorTemperature', - label='Illuminant Color Temperature', - description='Scene illuminant color temperature in Kelvin. A negative or null value indicates that the metadata information will be used.', + name="correlatedColorTemperature", + label="Illuminant Color Temperature", + description="Scene illuminant color temperature in Kelvin.\n" + "A negative or null value indicates that the metadata information will be used.", value=-1.0, range=(-1.0, 10000.0, 1.0), uid=[0], ), desc.ChoiceParam( - name='storageDataType', - label='Storage Data Type For EXR Output', - description='Storage image data type:\n' - ' * float: Use full floating point (32 bits per channel)\n' - ' * half: Use half float (16 bits per channel)\n' - ' * halfFinite: Use half float, but clamp values to avoid non-finite values\n' - ' * auto: Use half float if all values can fit, else use full float\n', - value='float', - values=['float', 'half', 'halfFinite', 'auto'], + name="storageDataType", + label="Storage Data Type For EXR Output", + description="Storage image data type for EXR outputs:\n" + " - float: Use full floating point (32 bits per channel).\n" + " - half: Use half float (16 bits per channel).\n" + " - halfFinite: Use half float, but clamp values to avoid non-finite values.\n" + " - auto: Use half float if all values can fit, else use full float.", + value="float", + values=["float", "half", "halfFinite", "auto"], exclusive=True, uid=[0], ), desc.ChoiceParam( - name='exrCompressionMethod', - label='EXR Compression Method', - description='Compression method for EXR images.', - value='auto', - values=['none', 'auto', 'rle', 'zip', 'zips', 'piz', 'pxr24', 'b44', 'b44a', 'dwaa', 'dwab'], + name="exrCompressionMethod", + label="EXR Compression Method", + description="Compression method for EXR output images.", + value="auto", + values=["none", "auto", "rle", "zip", "zips", "piz", "pxr24", "b44", "b44a", "dwaa", "dwab"], exclusive=True, uid=[0], ), desc.IntParam( - name='exrCompressionLevel', - label='EXR Compression Level', - description='Level of compression for EXR images, range depends on method used.\n' - 'For zip/zips methods, values must be between 1 and 9.\n' - 'A value of 0 will be ignored, default value for the selected method will be used.', + name="exrCompressionLevel", + label="EXR Compression Level", + description="Level of compression for EXR images. The range depends on the used method.\n" + "For the zip/zips methods, values must be between 1 and 9.\n" + "A value of 0 will be ignored, and the default value for the selected method will be used.", value=0, range=(0, 500, 1), uid=[0], - enabled=lambda node: node.exrCompressionMethod.value in ['dwaa', 'dwab', 'zip', 'zips'] + enabled=lambda node: node.exrCompressionMethod.value in ["dwaa", "dwab", "zip", "zips"] ), desc.BoolParam( - name='jpegCompress', - label='JPEG Compress', - description='Enable JPEG compression.', + name="jpegCompress", + label="JPEG Compress", + description="Enable JPEG compression.", value=True, uid=[0], ), desc.IntParam( - name='jpegQuality', - label='JPEG Quality', - description='JPEG images quality after compression.', + name="jpegQuality", + label="JPEG Quality", + description="JPEG images quality after compression.", value=90, range=(0, 100, 1), uid=[0], @@ -572,11 +626,11 @@ class ImageProcessing(desc.AVCommandLineNode): ), 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=[], ) @@ -584,27 +638,27 @@ class ImageProcessing(desc.AVCommandLineNode): outputs = [ desc.File( - name='outSfMData', - label='SfMData', - description='Output SfMData.', - value=lambda attr: (desc.Node.internalFolder + os.path.basename(attr.node.input.value)) if (os.path.splitext(attr.node.input.value)[1] in ['.abc', '.sfm']) else '', + name="outSfMData", + label="SfMData", + description="Output SfMData file.", + value=lambda attr: (desc.Node.internalFolder + os.path.basename(attr.node.input.value)) if (os.path.splitext(attr.node.input.value)[1] in [".abc", ".sfm"]) else "", uid=[], - group='', # do not export on the command line + group="", # do not export on the command line ), desc.File( - name='output', - label='Folder', - description='Output Images Folder.', + name="output", + label="Folder", + description="Output images folder.", value=desc.Node.internalFolder, uid=[], ), desc.File( - name='outputImages', - label='Images', - description='Output Image Files.', - semantic='image', + name="outputImages", + label="Images", + description="Output images.", + semantic="image", value= outputImagesValueFunct, - group='', # do not export on the command line + group="", # do not export on the command line uid=[], ), ] diff --git a/meshroom/nodes/aliceVision/ImportKnownPoses.py b/meshroom/nodes/aliceVision/ImportKnownPoses.py index 2568953599..e2ad7c4b02 100644 --- a/meshroom/nodes/aliceVision/ImportKnownPoses.py +++ b/meshroom/nodes/aliceVision/ImportKnownPoses.py @@ -13,28 +13,37 @@ class ImportKnownPoses(desc.AVCommandLineNode): inputs = [ desc.File( - name='sfmData', - label='SfmData', - description='SfMData file.', - value='', + name="sfmData", + label="SfMData", + description="Input SfMData file.", + value="", uid=[0], ), desc.File( - name='knownPosesData', - label='KnownPosesData', - description='KnownPoses data in the json or xmp format', - value='', + name="knownPosesData", + label="Known Poses Data", + description="Known poses data in the JSON or XMP format.", + 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 = [ desc.File( - name='output', - label='Output', - description='Path to the output smfData file.', + name="output", + label="Output", + description="Path to the output SfMData file.", value=desc.Node.internalFolder + "/sfmData.abc", uid=[], - ), + ), ] diff --git a/meshroom/nodes/aliceVision/KeyframeSelection.py b/meshroom/nodes/aliceVision/KeyframeSelection.py index 6dc0f62916..fcc2a6a717 100644 --- a/meshroom/nodes/aliceVision/KeyframeSelection.py +++ b/meshroom/nodes/aliceVision/KeyframeSelection.py @@ -102,14 +102,14 @@ class KeyframeSelection(desc.AVCommandLineNode): desc.ListAttribute( elementDesc=desc.FloatParam( name="mmFocal", - label="mmFocal", + label="Focal", description="Focal in mm (will be used if not 0).", value=0.0, range=(0.0, 500.0, 1.0), uid=[0], ), name="mmFocals", - label="mmFocals", + label="Focals", description="Focals in mm (will be used if not 0)." ), desc.File( @@ -128,8 +128,8 @@ class KeyframeSelection(desc.AVCommandLineNode): group=None, # skip group from command line groupDesc=[ desc.BoolParam( - name='useSmartSelection', - label='Use Smart Keyframe Selection', + name="useSmartSelection", + label="Use Smart Keyframe Selection", description="Use the smart keyframe selection.", value=True, uid=[0] @@ -137,7 +137,8 @@ class KeyframeSelection(desc.AVCommandLineNode): desc.GroupAttribute( name="regularSelection", label="Regular Keyframe Selection", - description="Parameters for the regular keyframe selection.\nKeyframes are selected regularly over the sequence with respect to the set parameters.", + description="Parameters for the regular keyframe selection.\n" + "Keyframes are selected regularly over the sequence with respect to the set parameters.", group=None, # skip group from command line enabled=lambda node: node.selectionMethod.useSmartSelection.value is False, groupDesc=[ @@ -175,14 +176,15 @@ class KeyframeSelection(desc.AVCommandLineNode): desc.GroupAttribute( name="smartSelection", label="Smart Keyframe Selection", - description="Parameters for the smart keyframe selection.\nKeyframes are selected based on their sharpness and optical flow scores.", + description="Parameters for the smart keyframe selection.\n" + "Keyframes are selected based on their sharpness and optical flow scores.", group=None, # skip group from command line enabled=lambda node: node.selectionMethod.useSmartSelection.value, groupDesc=[ desc.FloatParam( name="pxDisplacement", label="Pixel Displacement", - description="The percentage of pixels in the frame that need to have moved since the last keyframe to be considered for the selection", + description="The percentage of pixels in the frame that need to have moved since the last keyframe to be considered for the selection.", value=10.0, range=(0.0, 100.0, 1.0), uid=[0], @@ -277,10 +279,10 @@ class KeyframeSelection(desc.AVCommandLineNode): name="storageDataType", label="EXR Storage Data Type", description="Storage image data type for keyframes written to EXR files:\n" - " * float: Use full floating point (32 bits per channel)\n" - " * half: Use half float (16 bits per channel)\n" - " * halfFinite: Use half float, but clamp values to avoid non-finite values\n" - " * auto: Use half float if all values can fit, else use full float\n", + " - float: Use full floating point (32 bits per channel).\n" + " - half: Use half float (16 bits per channel).\n" + " - halfFinite: Use half float, but clamp values to avoid non-finite values.\n" + " - auto: Use half float if all values can fit, else use full float.", value="float", values=["float", "half", "halfFinite", "auto"], exclusive=True, diff --git a/meshroom/nodes/aliceVision/LdrToHdrCalibration.py b/meshroom/nodes/aliceVision/LdrToHdrCalibration.py index 55e445c90d..5d1c61d469 100644 --- a/meshroom/nodes/aliceVision/LdrToHdrCalibration.py +++ b/meshroom/nodes/aliceVision/LdrToHdrCalibration.py @@ -36,76 +36,78 @@ class LdrToHdrCalibration(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='Input', - description='SfMData file.', - value='', + name="input", + label="SfMData", + description="Input SfMData file.", + value="", uid=[0], ), desc.File( - name='samples', - label='Samples folder', - description='Samples folder', + name="samples", + label="Samples Folder", + description="Samples folder.", value=desc.Node.internalFolder, uid=[0], ), desc.IntParam( - name='userNbBrackets', - label='Number of Brackets', - description='Number of exposure brackets per HDR image (0 for automatic detection).', + name="userNbBrackets", + label="Number Of Brackets", + description="Number of exposure brackets per HDR image (0 for automatic detection).", value=0, range=(0, 15, 1), uid=[], - group='user', # not used directly on the command line + group="user", # not used directly on the command line ), desc.IntParam( - name='nbBrackets', - label='Automatic Nb Brackets', - description='Number of exposure brackets used per HDR image. It is detected automatically from input Viewpoints metadata if "userNbBrackets" is 0, else it is equal to "userNbBrackets".', + name="nbBrackets", + label="Automatic Nb Brackets", + description="Number of exposure brackets used per HDR image.\n" + "It is detected automatically from input Viewpoints metadata if 'userNbBrackets' is 0,\n" + "else it is equal to 'userNbBrackets'.", value=0, range=(0, 10, 1), uid=[0], ), desc.BoolParam( - name='byPass', - label='Bypass', - description="Bypass HDR creation and use the medium bracket as the source for the next steps", + name="byPass", + label="Bypass", + description="Bypass HDR creation and use the medium bracket as the source for the next steps.", value=False, uid=[0], enabled= lambda node: node.nbBrackets.value != 1, ), desc.ChoiceParam( - name='calibrationMethod', - label='Calibration Method', - description="Method used for camera calibration \n" - " * Linear: Disable the calibration and assumes a linear Camera Response Function. If images are encoded in a known colorspace (like sRGB for JPEG), the images will be automatically converted to linear. \n" - " * Debevec: This is the standard method for HDR calibration. \n" - " * Grossberg: Based on learned database of cameras, it allows to reduce the CRF to few parameters while keeping all the precision. \n" - " * Laguerre: Simple but robust method estimating the minimal number of parameters.", - values=['linear', 'debevec', 'grossberg', 'laguerre'], - value='debevec', + name="calibrationMethod", + label="Calibration Method", + description="Method used for camera calibration:\n" + " - Linear: Disables the calibration and assumes a linear Camera Response Function. If images are encoded in a known colorspace (like sRGB for JPEG), the images will be automatically converted to linear.\n" + " - Debevec: This is the standard method for HDR calibration.\n" + " - Grossberg: Based on learned database of cameras, it allows to reduce the CRF to few parameters while keeping all the precision.\n" + " - Laguerre: Simple but robust method estimating the minimal number of parameters.", + values=["linear", "debevec", "grossberg", "laguerre"], + value="debevec", exclusive=True, uid=[0], enabled= lambda node: node.byPass.enabled and not node.byPass.value, ), desc.ChoiceParam( - name='calibrationWeight', - label='Calibration Weight', - description="Weight function used to calibrate camera response \n" - " * default (automatically selected according to the calibrationMethod) \n" - " * gaussian \n" - " * triangle \n" - " * plateau", - value='default', - values=['default', 'gaussian', 'triangle', 'plateau'], + name="calibrationWeight", + label="Calibration Weight", + description="Weight function used to calibrate camera response:\n" + " - default (automatically selected according to the calibrationMethod)\n" + " - gaussian\n" + " - triangle\n" + " - plateau", + value="default", + values=["default", "gaussian", "triangle", "plateau"], exclusive=True, uid=[0], enabled= lambda node: node.byPass.enabled and not node.byPass.value, ), desc.IntParam( - name='channelQuantizationPower', - label='Channel Quantization Power', - description='Quantization level like 8 bits or 10 bits.', + name="channelQuantizationPower", + label="Channel Quantization Power", + description="Quantization level like 8 bits or 10 bits.", value=10, range=(8, 14, 1), uid=[0], @@ -113,21 +115,22 @@ class LdrToHdrCalibration(desc.AVCommandLineNode): enabled= lambda node: node.byPass.enabled and not node.byPass.value, ), desc.ChoiceParam( - name='workingColorSpace', - label='Working Color Space', - description='Allows you to choose the color space in which the data are processed.', - value='sRGB', - values=['sRGB', 'Linear', 'ACES2065-1', 'ACEScg'], + name="workingColorSpace", + label="Working Color Space", + description="Allows you to choose the color space in which the data are processed.", + value="sRGB", + values=["sRGB", "Linear", "ACES2065-1", "ACEScg"], exclusive=True, uid=[], - group='user', # not used directly on the command line + group="user", # not used directly on the command line enabled= lambda node: node.byPass.enabled and not node.byPass.value, ), desc.IntParam( - name='maxTotalPoints', - label='Max Number of Points', - description='Max number of points used from the sampling. This ensures that the number of pixels values extracted by the sampling\n' - 'can be managed by the calibration step (in term of computation time and memory usage).', + name="maxTotalPoints", + label="Max Number Of Points", + description="Maximum number of points used from the sampling.\n" + "This ensures that the number of pixels values extracted by the sampling\n" + "can be managed by the calibration step (in term of computation time and memory usage).", value=1000000, range=(8, 10000000, 1000), uid=[0], @@ -135,11 +138,11 @@ class LdrToHdrCalibration(desc.AVCommandLineNode): enabled= lambda node: node.byPass.enabled and not node.byPass.value, ), 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=[], ) @@ -147,10 +150,10 @@ class LdrToHdrCalibration(desc.AVCommandLineNode): outputs = [ desc.File( - name='response', - label='Response File', - description='Path to the output response file', - value=desc.Node.internalFolder + 'response.csv', + name="response", + label="Response File", + description="Path to the output response file.", + value=desc.Node.internalFolder + "response.csv", uid=[], ) ] diff --git a/meshroom/nodes/aliceVision/LdrToHdrMerge.py b/meshroom/nodes/aliceVision/LdrToHdrMerge.py index 5b71849f68..ba738e7abf 100644 --- a/meshroom/nodes/aliceVision/LdrToHdrMerge.py +++ b/meshroom/nodes/aliceVision/LdrToHdrMerge.py @@ -35,94 +35,97 @@ class LdrToHdrMerge(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='Input', - description='SfMData file.', - value='', + name="input", + label="SfMData", + description="Input SfMData file.", + value="", uid=[0], ), desc.File( - name='response', - label='Response file', - description='Response file', - value='', + name="response", + label="Response File", + description="Response file.", + value="", uid=[0], ), desc.IntParam( - name='userNbBrackets', - label='Number of Brackets', - description='Number of exposure brackets per HDR image (0 for automatic detection).', + name="userNbBrackets", + label="Number Of Brackets", + description="Number of exposure brackets per HDR image (0 for automatic detection).", value=0, range=(0, 15, 1), uid=[], - group='user', # not used directly on the command line + group="user", # not used directly on the command line ), desc.IntParam( - name='nbBrackets', - label='Automatic Nb Brackets', - description='Number of exposure brackets used per HDR image. It is detected automatically from input Viewpoints metadata if "userNbBrackets" is 0, else it is equal to "userNbBrackets".', + name="nbBrackets", + label="Automatic Nb Brackets", + description="Number of exposure brackets used per HDR image.\n" + "It is detected automatically from input Viewpoints metadata if 'userNbBrackets'\n" + "is 0, else it is equal to 'userNbBrackets'.", value=0, range=(0, 10, 1), uid=[0], ), desc.BoolParam( - name='offsetRefBracketIndexEnabled', - label='Manually Specify Ref Bracket', - description='Manually specify the reference bracket index to control the exposure of the HDR image.', + name="offsetRefBracketIndexEnabled", + label="Manually Specify Ref Bracket", + description="Manually specify the reference bracket index to control the exposure of the HDR image.", value=False, uid=[0], - group='user', # not used directly on the command line + group="user", # not used directly on the command line ), desc.IntParam( - name='offsetRefBracketIndex', - label='Offset Ref Bracket Index', - description='Zero to use the center bracket. +N to use a more exposed bracket or -N to use a less exposed backet.', + name="offsetRefBracketIndex", + label="Offset Ref Bracket Index", + description="0 to use the center bracket.\n" + "+N to use a more exposed bracket or -N to use a less exposed bracket.", value=1, range=(-4, 4, 1), uid=[0], enabled= lambda node: (node.nbBrackets.value != 1 and node.offsetRefBracketIndexEnabled.value), ), desc.FloatParam( - name='meanTargetedLumaForMerging', - label='Targeted Luminance For Merging', - description='Expected mean luminance of the HDR images used to compute the final panorama', + name="meanTargetedLumaForMerging", + label="Targeted Luminance For Merging", + description="Expected mean luminance of the HDR images used to compute the final panorama.", value=0.4, range=(0.0, 1.0, 0.01), uid=[0], enabled= lambda node: (node.nbBrackets.value != 1 and not node.offsetRefBracketIndexEnabled.value), ), desc.BoolParam( - name='byPass', - label='Bypass', + name="byPass", + label="Bypass", description="Bypass HDR creation and use the medium bracket as the source for the next steps.", value=False, uid=[0], enabled= lambda node: node.nbBrackets.value != 1, ), desc.BoolParam( - name='keepSourceImageName', - label='Keep Source Image Name', + name="keepSourceImageName", + label="Keep Source Image Name", description="Keep the filename of the input image selected as central image for the output image filename.", value=False, uid=[0], ), desc.ChoiceParam( - name='fusionWeight', - label='Fusion Weight', + name="fusionWeight", + label="Fusion Weight", description="Weight function used to fuse all LDR images together:\n" - " * gaussian \n" - " * triangle \n" - " * plateau", - value='gaussian', - values=['gaussian', 'triangle', 'plateau'], + " - gaussian\n" + " - triangle\n" + " - plateau", + value="gaussian", + values=["gaussian", "triangle", "plateau"], exclusive=True, uid=[0], enabled= lambda node: node.byPass.enabled and not node.byPass.value, ), desc.IntParam( - name='channelQuantizationPower', - label='Channel Quantization Power', - description='Quantization level like 8 bits or 10 bits.', + name="channelQuantizationPower", + label="Channel Quantization Power", + description="Quantization level like 8 bits or 10 bits.", value=10, range=(8, 14, 1), uid=[0], @@ -130,79 +133,79 @@ class LdrToHdrMerge(desc.AVCommandLineNode): enabled= lambda node: node.byPass.enabled and not node.byPass.value, ), desc.ChoiceParam( - name='workingColorSpace', - label='Working Color Space', - description='Allows you to choose the color space in which the data are processed.', - value='sRGB', - values=['sRGB', 'Linear', 'ACES2065-1', 'ACEScg', 'no_conversion'], + name="workingColorSpace", + label="Working Color Space", + description="Allows you to choose the color space in which the data are processed.", + value="sRGB", + values=["sRGB", "Linear", "ACES2065-1", "ACEScg", "no_conversion"], exclusive=True, uid=[0], enabled= lambda node: node.byPass.enabled and not node.byPass.value, ), desc.BoolParam( - name='enableHighlight', - label='Enable Highlight', + name="enableHighlight", + label="Enable Highlight", description="Enable highlights correction.", value=False, uid=[0], - group='user', # not used directly on the command line + group="user", # not used directly on the command line enabled= lambda node: node.byPass.enabled and not node.byPass.value, ), desc.FloatParam( - name='highlightCorrectionFactor', - label='Highlights Correction', - description='Pixels saturated in all input images have a partial information about their real luminance.\n' - 'We only know that the value should be >= to the standard hdr fusion.\n' - 'This parameter allows to perform a post-processing step to put saturated pixels to a constant\n' - 'value defined by the `highlightsMaxLuminance` parameter.\n' - 'This parameter is float to enable to weight this correction.', + name="highlightCorrectionFactor", + label="Highlights Correction", + description="Pixels saturated in all input images have a partial information about their real luminance.\n" + "We only know that the value should be >= to the standard HDRfusion.\n" + "This parameter allows to perform a post-processing step to put saturated pixels to a constant\n" + "value defined by the `highlightsMaxLuminance` parameter.\n" + "This parameter is float to enable to weight this correction.", value=1.0, range=(0.0, 1.0, 0.01), uid=[0], enabled= lambda node: node.enableHighlight.enabled and node.enableHighlight.value, ), desc.FloatParam( - name='highlightTargetLux', - label='Highlight Target Luminance (Lux)', - description='This is an arbitrary target value (in Lux) used to replace the unknown luminance value of the saturated pixels.\n' - '\n' - 'Some Outdoor Reference Light Levels:\n' - ' * 120,000 lux: Brightest sunlight\n' - ' * 110,000 lux: Bright sunlight\n' - ' * 20,000 lux: Shade illuminated by entire clear blue sky, midday\n' - ' * 1,000 lux: Typical overcast day, midday\n' - ' * 400 lux: Sunrise or sunset on a clear day\n' - ' * 40 lux: Fully overcast, sunset/sunrise\n' - '\n' - 'Some Indoor Reference Light Levels:\n' - ' * 20000 lux: Max Usually Used Indoor\n' - ' * 750 lux: Supermarkets\n' - ' * 500 lux: Office Work\n' - ' * 150 lux: Home\n', + name="highlightTargetLux", + label="Highlight Target Luminance (Lux)", + description="This is an arbitrary target value (in Lux) used to replace the unknown luminance value of the saturated pixels.\n" + "\n" + "Some Outdoor Reference Light Levels:\n" + " - 120,000 lux: Brightest sunlight\n" + " - 110,000 lux: Bright sunlight\n" + " - 20,000 lux: Shade illuminated by entire clear blue sky, midday\n" + " - 1,000 lux: Typical overcast day, midday\n" + " - 400 lux: Sunrise or sunset on a clear day\n" + " - 40 lux: Fully overcast, sunset/sunrise\n" + "\n" + "Some Indoor Reference Light Levels:\n" + " - 20000 lux: Max Usually Used Indoor\n" + " - 750 lux: Supermarkets\n" + " - 500 lux: Office Work\n" + " - 150 lux: Home\n", value=120000.0, range=(1000.0, 150000.0, 1.0), uid=[0], enabled= lambda node: node.enableHighlight.enabled and node.enableHighlight.value and node.highlightCorrectionFactor.value != 0, ), desc.ChoiceParam( - name='storageDataType', - label='Storage Data Type', - description='Storage image data type:\n' - ' * float: Use full floating point (32 bits per channel)\n' - ' * half: Use half float (16 bits per channel)\n' - ' * halfFinite: Use half float, but clamp values to avoid non-finite values\n' - ' * auto: Use half float if all values can fit, else use full float\n', - value='float', - values=['float', 'half', 'halfFinite', 'auto'], + name="storageDataType", + label="Storage Data Type", + description="Storage image data type:\n" + " - float: Use full floating point (32 bits per channel).\n" + " - half: Use half float (16 bits per channel).\n" + " - halfFinite: Use half float, but clamp values to avoid non-finite values.\n" + " - auto: Use half float if all values can fit, else use full float.", + value="float", + values=["float", "half", "halfFinite", "auto"], exclusive=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'], + 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=[], ) @@ -210,18 +213,18 @@ class LdrToHdrMerge(desc.AVCommandLineNode): outputs = [ desc.File( - name='outputFolder', - label='Output Folder', - description='Path to the folder containing the merged HDR images.', + name="outputFolder", + label="Folder", + description="Path to the folder containing the merged HDR images.", value=desc.Node.internalFolder, uid=[], - group='', # do not export on the command line + group="", # do not export on the command line ), desc.File( - name='outSfMData', - label='SfMData File', - description='Path to the output sfmdata file', - value=desc.Node.internalFolder + 'sfmData.sfm', + name="outSfMData", + label="SfMData", + description="Path to the output SfMData file.", + value=desc.Node.internalFolder + "sfmData.sfm", uid=[], ) ] diff --git a/meshroom/nodes/aliceVision/LdrToHdrSampling.py b/meshroom/nodes/aliceVision/LdrToHdrSampling.py index 7cd19ffbac..ae2708e5db 100644 --- a/meshroom/nodes/aliceVision/LdrToHdrSampling.py +++ b/meshroom/nodes/aliceVision/LdrToHdrSampling.py @@ -53,55 +53,57 @@ class LdrToHdrSampling(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='Input', - description='SfMData file.', - value='', + name="input", + label="SfMData", + description="Input SfMData file.", + value="", uid=[0], ), desc.IntParam( - name='userNbBrackets', - label='Number of Brackets', - description='Number of exposure brackets per HDR image (0 for automatic detection).', + name="userNbBrackets", + label="Number Of Brackets", + description="Number of exposure brackets per HDR image (0 for automatic detection).", value=0, range=(0, 15, 1), uid=[], - group='user', # not used directly on the command line + group="user", # not used directly on the command line ), desc.IntParam( - name='nbBrackets', - label='Automatic Nb Brackets', - description='Number of exposure brackets used per HDR image. It is detected automatically from input Viewpoints metadata if "userNbBrackets" is 0, else it is equal to "userNbBrackets".', + name="nbBrackets", + label="Automatic Nb Brackets", + description="Number of exposure brackets used per HDR image.\n" + "It is detected automatically from input Viewpoints metadata if 'userNbBrackets'\n" + "is 0, else it is equal to 'userNbBrackets'.", value=0, range=(0, 10, 1), uid=[0], ), desc.BoolParam( - name='byPass', - label='Bypass', - description="Bypass HDR creation and use the medium bracket as the source for the next steps", + name="byPass", + label="Bypass", + description="Bypass HDR creation and use the medium bracket as the source for the next steps.", value=False, uid=[0], enabled= lambda node: node.nbBrackets.value != 1, ), desc.ChoiceParam( - name='calibrationMethod', - label='Calibration Method', - description="Method used for camera calibration \n" - " * Linear: Disable the calibration and assumes a linear Camera Response Function. If images are encoded in a known colorspace (like sRGB for JPEG), the images will be automatically converted to linear. \n" - " * Debevec: This is the standard method for HDR calibration. \n" - " * Grossberg: Based on learned database of cameras, it allows to reduce the CRF to few parameters while keeping all the precision. \n" - " * Laguerre: Simple but robust method estimating the minimal number of parameters.", - values=['linear', 'debevec', 'grossberg', 'laguerre'], - value='debevec', + name="calibrationMethod", + label="Calibration Method", + description="Method used for camera calibration:\n" + " - Linear: Disable the calibration and assumes a linear Camera Response Function. If images are encoded in a known colorspace (like sRGB for JPEG), the images will be automatically converted to linear.\n" + " - Debevec: This is the standard method for HDR calibration.\n" + " - Grossberg: Based on learned database of cameras, it allows to reduce the CRF to few parameters while keeping all the precision.\n" + " - Laguerre: Simple but robust method estimating the minimal number of parameters.", + values=["linear", "debevec", "grossberg", "laguerre"], + value="debevec", exclusive=True, uid=[0], enabled= lambda node: node.byPass.enabled and not node.byPass.value, ), desc.IntParam( - name='channelQuantizationPower', - label='Channel Quantization Power', - description='Quantization level like 8 bits or 10 bits.', + name="channelQuantizationPower", + label="Channel Quantization Power", + description="Quantization level like 8 bits or 10 bits.", value=10, range=(8, 14, 1), uid=[0], @@ -109,19 +111,19 @@ class LdrToHdrSampling(desc.AVCommandLineNode): enabled= lambda node: node.byPass.enabled and not node.byPass.value, ), desc.ChoiceParam( - name='workingColorSpace', - label='Working Color Space', - description='Allows you to choose the color space in which the data are processed.', - value='sRGB', - values=['sRGB', 'Linear', 'ACES2065-1', 'ACEScg', 'no_conversion'], + name="workingColorSpace", + label="Working Color Space", + description="Allows you to choose the color space in which the data are processed.", + value="sRGB", + values=["sRGB", "Linear", "ACES2065-1", "ACEScg", "no_conversion"], exclusive=True, uid=[0], enabled= lambda node: node.byPass.enabled and not node.byPass.value, ), desc.IntParam( - name='blockSize', - label='Block Size', - description='Size of the image tile to extract a sample.', + name="blockSize", + label="Block Size", + description="Size of the image tile to extract a sample.", value=256, range=(8, 1024, 1), uid=[0], @@ -129,9 +131,9 @@ class LdrToHdrSampling(desc.AVCommandLineNode): enabled= lambda node: node.byPass.enabled and not node.byPass.value, ), desc.IntParam( - name='radius', - label='Patch Radius', - description='Radius of the patch used to analyze the sample statistics.', + name="radius", + label="Patch Radius", + description="Radius of the patch used to analyze the sample statistics.", value=5, range=(0, 10, 1), uid=[0], @@ -139,9 +141,9 @@ class LdrToHdrSampling(desc.AVCommandLineNode): enabled= lambda node: node.byPass.enabled and not node.byPass.value, ), desc.IntParam( - name='maxCountSample', - label='Max Number of Samples', - description='Max number of samples per image group.', + name="maxCountSample", + label="Max Number Of Samples", + description="Maximum number of samples per image group.", value=200, range=(10, 1000, 10), uid=[0], @@ -149,19 +151,19 @@ class LdrToHdrSampling(desc.AVCommandLineNode): enabled= lambda node: node.byPass.enabled and not node.byPass.value, ), desc.BoolParam( - name='debug', - label='Export Debug Files', + name="debug", + label="Export Debug Files", description="Export debug files to analyze the sampling strategy.", value=False, uid=[], enabled= lambda node: node.byPass.enabled and not node.byPass.value, ), 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=[], ) @@ -169,9 +171,9 @@ class LdrToHdrSampling(desc.AVCommandLineNode): outputs = [ desc.File( - name='output', - label='Folder', - description='Output path for the samples.', + name="output", + label="Folder", + description="Output path for the samples.", value=desc.Node.internalFolder, uid=[], ), diff --git a/meshroom/nodes/aliceVision/LightingCalibration.py b/meshroom/nodes/aliceVision/LightingCalibration.py index b96a7acddb..ddeb72ec92 100644 --- a/meshroom/nodes/aliceVision/LightingCalibration.py +++ b/meshroom/nodes/aliceVision/LightingCalibration.py @@ -13,52 +13,53 @@ class LightingCalibration(desc.CommandLineNode): inputs = [ desc.File( - name='inputPath', - label='SfMData', - description='Input SfMData file.', - value='', + name="inputPath", + label="SfMData", + description="Input SfMData file.", + value="", uid=[0] ), desc.File( - name='inputJSON', - label='Sphere Detection File', - description='Input JSON file containing sphere centers and radiuses.', - value='', + name="inputJSON", + label="Sphere Detection File", + description="Input JSON file containing sphere centers and radiuses.", + value="", uid=[0] ), desc.BoolParam( - name='saveAsModel', - label='Save As Model', - description='Check if this calibration file will be used with other datasets.', + name="saveAsModel", + label="Save As Model", + description="Check if this calibration file will be used with other datasets.", value=False, uid=[0] ), desc.ChoiceParam( - name='method', - label='Calibration Method', - description='Method used for light calibration. Use "brightestPoint" for shiny spheres and "whiteSphere" for white matte spheres.', - values=['brightestPoint', 'whiteSphere'], - value='brightestPoint', + name="method", + label="Calibration Method", + description="Method used for light calibration.\n" + "Use 'brightestPoint' for shiny spheres and 'whiteSphere' for white matte spheres.", + values=["brightestPoint", "whiteSphere"], + value="brightestPoint", exclusive=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'], + 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=[] + uid=[], ) ] outputs = [ desc.File( - name='outputFile', - label='Light File', - description='Light information will be written here.', - value=desc.Node.internalFolder +'/lights.json' , + name="outputFile", + label="Light File", + description="Light information will be written here.", + value=desc.Node.internalFolder + "/lights.json", uid=[] ) ] diff --git a/meshroom/nodes/aliceVision/LightingEstimation.py b/meshroom/nodes/aliceVision/LightingEstimation.py index b55883f4e2..e7a4a8ccc6 100644 --- a/meshroom/nodes/aliceVision/LightingEstimation.py +++ b/meshroom/nodes/aliceVision/LightingEstimation.py @@ -7,84 +7,87 @@ class LightingEstimation(desc.AVCommandLineNode): commandLine = 'aliceVision_lightingEstimation {allParams}' category = 'Utils' + documentation = ''' + ''' inputs = [ desc.File( - name='input', - label='Input', - description='SfMData file.', - value='', + name="input", + label="SfMData", + description="Input SfMData file.", + value="", uid=[0], ), desc.File( name="depthMapsFilterFolder", - label='Filtered Depth Maps Folder', - description='Input filtered depth maps folder', - value='', + label="Filtered Depth Maps Folder", + description="Input filtered depth maps folder.", + value="", uid=[0], ), desc.File( - name='imagesFolder', - label='Images Folder', - description='Use images from a specific folder instead of those specify in the SfMData file.\nFilename should be the image uid.', - value='', + name="imagesFolder", + label="Images Folder", + description="Use images from a specific folder instead of those specify in the SfMData file.\n" + "Filename should be the image UID.", + value="", uid=[0], ), desc.ChoiceParam( - name='lightingEstimationMode', - label='Lighting Estimation Mode', - description='Lighting Estimation Mode.', - value='global', - values=['global', 'per_image'], + name="lightingEstimationMode", + label="Lighting Estimation Mode", + description="Lighting estimation mode.", + value="global", + values=["global", "per_image"], exclusive=True, uid=[0], advanced=True, ), desc.ChoiceParam( - name='lightingColor', - label='Lighting Color Mode', - description='Lighting Color Mode.', - value='RGB', - values=['RGB', 'Luminance'], + name="lightingColor", + label="Lighting Color Mode", + description="Lighting color mode.", + value="RGB", + values=["RGB", "Luminance"], exclusive=True, uid=[0], advanced=True, ), desc.ChoiceParam( - name='albedoEstimationName', - label='Albedo Estimation Name', - description='Albedo estimation method used for light estimation.', - value='constant', - values=['constant', 'picture', 'median_filter', 'blur_filter'], + name="albedoEstimationName", + label="Albedo Estimation Name", + description="Albedo estimation method used for light estimation.", + value="constant", + values=["constant", "picture", "median_filter", "blur_filter"], exclusive=True, uid=[0], advanced=True, ), desc.IntParam( - name='albedoEstimationFilterSize', - label='Albedo Estimation Filter Size', - description='Albedo filter size for estimation method using filter.', + name="albedoEstimationFilterSize", + label="Albedo Estimation Filter Size", + description="Albedo filter size for estimation method using filter.", value=3, range=(0, 100, 1), uid=[0], advanced=True, ), 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=[], - ), + ) ] outputs = [ desc.File( - name='output', - label='Folder', - description='Folder for output lighting vector files.', + name="output", + label="Folder", + description="Folder for output lighting vector files.", value=desc.Node.internalFolder, uid=[], ), From 41280dc22a31acec5e1fb57faf05075ebbe95a20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= Date: Fri, 16 Jun 2023 10:31:42 +0200 Subject: [PATCH 4/5] [nodes] M-P: Harmonize and improve labels and descriptions Use CamelCase for all labels, always end descriptions with periods, and replace the mixed use of single and double quotes with double quotes only. --- meshroom/nodes/aliceVision/MergeMeshes.py | 60 ++-- meshroom/nodes/aliceVision/MeshDecimate.py | 60 ++-- meshroom/nodes/aliceVision/MeshDenoising.py | 96 +++--- meshroom/nodes/aliceVision/MeshFiltering.py | 129 +++---- meshroom/nodes/aliceVision/MeshMasking.py | 88 ++--- meshroom/nodes/aliceVision/MeshResampling.py | 59 ++-- meshroom/nodes/aliceVision/Meshing.py | 323 +++++++++--------- .../nodes/aliceVision/NormalIntegration.py | 40 +-- .../nodes/aliceVision/PanoramaCompositing.py | 114 +++---- .../nodes/aliceVision/PanoramaEstimation.py | 164 ++++----- meshroom/nodes/aliceVision/PanoramaInit.py | 138 ++++---- meshroom/nodes/aliceVision/PanoramaMerging.py | 72 ++-- .../aliceVision/PanoramaPostProcessing.py | 85 +++-- .../aliceVision/PanoramaPrepareImages.py | 26 +- meshroom/nodes/aliceVision/PanoramaSeams.py | 56 +-- meshroom/nodes/aliceVision/PanoramaWarping.py | 90 ++--- .../nodes/aliceVision/PhotometricStereo.py | 142 ++++---- .../nodes/aliceVision/PrepareDenseScene.py | 70 ++-- meshroom/nodes/aliceVision/Publish.py | 14 +- 19 files changed, 920 insertions(+), 906 deletions(-) diff --git a/meshroom/nodes/aliceVision/MergeMeshes.py b/meshroom/nodes/aliceVision/MergeMeshes.py index 2aef0ea659..3c84420351 100644 --- a/meshroom/nodes/aliceVision/MergeMeshes.py +++ b/meshroom/nodes/aliceVision/MergeMeshes.py @@ -19,59 +19,59 @@ class MergeMeshes(desc.AVCommandLineNode): inputs = [ desc.File( - name='inputFirstMesh', - label='Input First Mesh', - description='Input First Mesh (*.obj, *.mesh, *.meshb, *.ply, *.off, *.stl).', - value='', + name="inputFirstMesh", + label="First Mesh", + description="Input first mesh (*.obj, *.mesh, *.meshb, *.ply, *.off, *.stl).", + value="", uid=[0], ), desc.File( - name='inputSecondMesh', - label='Input Second Mesh', - description='Input Second Mesh (*.obj, *.mesh, *.meshb, *.ply, *.off, *.stl).', - value='', + name="inputSecondMesh", + label="Second Mesh", + description="Input second mesh (*.obj, *.mesh, *.meshb, *.ply, *.off, *.stl).", + value="", uid=[0], ), desc.ChoiceParam( - name='mergeOperation', - label='Merge Operation', - description='''Operation types used to merge two meshes.''', - value='boolean_union', - values=['boolean_union', 'boolean_intersection', 'boolean_difference'], + name="mergeOperation", + label="Merge Operation", + description="Operation types used to merge two meshes.", + value="boolean_union", + values=["boolean_union", "boolean_intersection", "boolean_difference"], exclusive=True, uid=[0], ), desc.BoolParam( - name='preProcess', - label='Pre-Process', - description='''Pre-process input meshes in order to avoid geometric errors in the merging process''', + name="preProcess", + label="Pre-Process", + description="Pre-process the input meshes in order to avoid geometric errors in the merging process.", value=True, uid=[0], ), desc.BoolParam( - name='postProcess', - label='Post-Process', - description='''Post-process output mesh in order to avoid future geometric errors.''', + name="postProcess", + label="Post-Process", + description="Post-process the output mesh in order to avoid future geometric errors.", value=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'], + 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='Mesh', - description='''Output mesh (*.obj, *.mesh, *.meshb, *.ply, *.off, *.stl).''', - value=desc.Node.internalFolder + 'mesh.stl', + name="output", + label="Mesh", + description="Output mesh (*.obj, *.mesh, *.meshb, *.ply, *.off, *.stl).", + value=desc.Node.internalFolder + "mesh.stl", uid=[], - ), + ), ] diff --git a/meshroom/nodes/aliceVision/MeshDecimate.py b/meshroom/nodes/aliceVision/MeshDecimate.py index 2c42e401dc..824cc85e75 100644 --- a/meshroom/nodes/aliceVision/MeshDecimate.py +++ b/meshroom/nodes/aliceVision/MeshDecimate.py @@ -16,70 +16,70 @@ class MeshDecimate(desc.AVCommandLineNode): inputs = [ desc.File( name="input", - label='Input Mesh (OBJ file format).', - description='', - value='', + label="Mesh", + description="Input mesh in the OBJ format.", + value="", uid=[0], - ), + ), desc.FloatParam( - name='simplificationFactor', - label='Simplification factor', - description='Simplification factor', + name="simplificationFactor", + label="Simplification Factor", + description="Simplification factor for the decimation.", value=0.5, range=(0.0, 1.0, 0.01), uid=[0], ), desc.IntParam( - name='nbVertices', - label='Fixed Number of Vertices', - description='Fixed number of output vertices.', + name="nbVertices", + label="Fixed Number of Vertices", + description="Fixed number of output vertices.", value=0, range=(0, 1000000, 1), uid=[0], ), desc.IntParam( - name='minVertices', - label='Min Vertices', - description='Min number of output vertices.', + name="minVertices", + label="Min Vertices", + description="Minimum number of output vertices.", value=0, range=(0, 1000000, 1), uid=[0], ), desc.IntParam( - name='maxVertices', - label='Max Vertices', - description='Max number of output vertices.', + name="maxVertices", + label="Max Vertices", + description="Maximum number of output vertices.", value=0, range=(0, 1000000, 1), uid=[0], ), desc.BoolParam( - name='flipNormals', - label='Flip Normals', - description='Option to flip face normals.\n' - 'It can be needed as it depends on the vertices order in triangles\n' - 'and the convention change from one software to another.', + name="flipNormals", + label="Flip Normals", + description="Option to flip face normals.\n" + "It can be needed as it depends on the vertices order in triangles\n" + "and the convention changes from one software to another.", value=False, uid=[0], advanced=True, ), 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=[], - ), + ) ] outputs = [ desc.File( name="output", label="Mesh", - description="Output mesh (OBJ file format).", - value=desc.Node.internalFolder + 'mesh.obj', + description="Output mesh in the OBJ file format.", + value=desc.Node.internalFolder + "mesh.obj", uid=[], - ), + ), ] diff --git a/meshroom/nodes/aliceVision/MeshDenoising.py b/meshroom/nodes/aliceVision/MeshDenoising.py index 3fbf3592a6..f85a30f635 100644 --- a/meshroom/nodes/aliceVision/MeshDenoising.py +++ b/meshroom/nodes/aliceVision/MeshDenoising.py @@ -14,90 +14,90 @@ class MeshDenoising(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='Input', - description='''Input Mesh (OBJ file format).''', - value='', + name="input", + label="Mesh", + description="Input mesh in the OBJ file format.", + value="", uid=[0], - ), + ), desc.IntParam( - name='denoisingIterations', - label='Denoising Iterations', - description='''Number of denoising iterations.''', + name="denoisingIterations", + label="Denoising Iterations", + description="Number of denoising iterations.", value=5, range=(0, 30, 1), uid=[0], - ), + ), desc.FloatParam( - name='meshUpdateClosenessWeight', - label='Mesh Update Closeness Weight', - description='''Closeness weight for mesh update, must be positive.''', + name="meshUpdateClosenessWeight", + label="Mesh Update Closeness Weight", + description="Closeness weight for mesh update. Must be positive.", value=0.001, range=(0.0, 0.1, 0.001), uid=[0], - ), + ), desc.FloatParam( - name='lambda', - label='Lambda', - description='''Regularization weight.''', + name="lambda", + label="Lambda", + description="Regularization weight.", value=2.0, range=(0.0, 10.0, 0.01), uid=[0], - ), + ), desc.FloatParam( - name='eta', - label='Eta', - description='Gaussian standard deviation for spatial weight, ' - 'scaled by the average distance between adjacent face centroids.\n' - 'Must be positive.', + name="eta", + label="Eta", + description="Gaussian standard deviation for spatial weight, \n" + "scaled by the average distance between adjacent face centroids.\n" + "Must be positive.", value=1.5, range=(0.0, 20.0, 0.01), uid=[0], - ), + ), desc.FloatParam( - name='mu', - label='Mu', - description='''Gaussian standard deviation for guidance weight.''', + name="mu", + label="Mu", + description="Gaussian standard deviation for guidance weight.", value=1.5, range=(0.0, 10.0, 0.01), uid=[0], - ), + ), desc.FloatParam( - name='nu', - label='Nu', - description='''Gaussian standard deviation for signal weight.''', + name="nu", + label="Nu", + description="Gaussian standard deviation for signal weight.", value=0.3, range=(0.0, 5.0, 0.01), uid=[0], - ), + ), desc.ChoiceParam( - name='meshUpdateMethod', - label='Mesh Update Method', - description='Mesh Update Method\n' - ' * ITERATIVE_UPDATE (default): ShapeUp styled iterative solver \n' - ' * POISSON_UPDATE: Poisson-based update from [Wang et al. 2015] "Rolling guidance normal filter for geometric processing"', + name="meshUpdateMethod", + label="Mesh Update Method", + description="Mesh ppdate method:\n" + " - ITERATIVE_UPDATE (default): ShapeUp styled iterative solver.\n" + " - POISSON_UPDATE: Poisson-based update from [Wang et al. 2015] 'Rolling guidance normal filter for geometric processing'.", value=0, - values=(0, 1), + values=[0, 1], exclusive=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'], + 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 mesh (OBJ file format).''', - value=desc.Node.internalFolder + 'mesh.obj', + name="output", + label="Output", + description="Output mesh in the OBJ file format.", + value=desc.Node.internalFolder + "mesh.obj", uid=[], - ), + ), ] diff --git a/meshroom/nodes/aliceVision/MeshFiltering.py b/meshroom/nodes/aliceVision/MeshFiltering.py index c17e666eeb..56369f39a6 100644 --- a/meshroom/nodes/aliceVision/MeshFiltering.py +++ b/meshroom/nodes/aliceVision/MeshFiltering.py @@ -13,118 +13,121 @@ class MeshFiltering(desc.AVCommandLineNode): inputs = [ desc.File( - name='inputMesh', - label='Mesh', - description='''Input Mesh''', - value='', + name="inputMesh", + label="Mesh", + description="Input mesh file.", + value="", uid=[0], - ), + ), desc.ChoiceParam( - name='outputMeshFileType', - label='File Type', - description='Output Mesh File Type', - value='obj', - values=('gltf', 'obj', 'fbx', 'stl'), + name="outputMeshFileType", + label="Mesh Type", + description="File type for the output mesh.", + value="obj", + values=("gltf", "obj", "fbx", "stl"), exclusive=True, uid=[0], - group='', - ), + group="", + ), desc.BoolParam( - name='keepLargestMeshOnly', - label='Keep Only the Largest Mesh', - description='Keep only the largest connected triangles group.', + name="keepLargestMeshOnly", + label="Keep Only The Largest Mesh", + description="Keep only the largest connected triangles group.", value=False, uid=[0], - ), + ), desc.ChoiceParam( - name='smoothingSubset', - label='Smoothing Subset', - description='Subset for smoothing (all, surface_boundaries, surface_inner_part).', - value='all', - values=['all', 'surface_boundaries', 'surface_inner_part'], + name="smoothingSubset", + label="Smoothing Subset", + description="Subset for smoothing (all, surface_boundaries, surface_inner_part).", + value="all", + values=["all", "surface_boundaries", "surface_inner_part"], exclusive=True, uid=[0], advanced=True, - ), + ), desc.IntParam( - name='smoothingBoundariesNeighbours', - label='Smoothing Boundaries Neighbours', - description='Neighbours of the boundaries to consider.', + name="smoothingBoundariesNeighbours", + label="Smoothing Boundaries Neighbours", + description="Neighbours of the boundaries to consider.", value=0, range=(0, 20, 1), uid=[0], advanced=True, - ), + ), desc.IntParam( - name='smoothingIterations', - label='Smoothing Iterations', - description='Number of smoothing iterations', + name="smoothingIterations", + label="Smoothing Iterations", + description="Number of smoothing iterations.", value=5, range=(0, 50, 1), uid=[0], - ), + ), desc.FloatParam( - name='smoothingLambda', - label='Smoothing Lambda', - description='Smoothing size.', + name="smoothingLambda", + label="Smoothing Lambda", + description="Smoothing size.", value=1.0, range=(0.0, 10.0, 0.1), uid=[0], advanced=True, - ), + ), desc.ChoiceParam( - name='filteringSubset', - label='Filtering Subset', - description='Subset for filtering (all, surface_boundaries, surface_inner_part).', - value='all', - values=['all', 'surface_boundaries', 'surface_inner_part'], + name="filteringSubset", + label="Filtering Subset", + description="Subset for filtering (all, surface_boundaries, surface_inner_part).", + value="all", + values=["all", "surface_boundaries", "surface_inner_part"], exclusive=True, uid=[0], advanced=True, - ), + ), desc.IntParam( - name='filteringIterations', - label='Filtering Iterations', - description='Number of filtering iterations.', + name="filteringIterations", + label="Filtering Iterations", + description="Number of filtering iterations.", value=1, range=(0, 20, 1), uid=[0], advanced=True, - ), + ), desc.FloatParam( - name='filterLargeTrianglesFactor', - label='Filter Large Triangles Factor', - description='Remove all large triangles. We consider a triangle as large if one edge is bigger than N times the average edge length. Put zero to disable it.', + name="filterLargeTrianglesFactor", + label="Filter Large Triangles Factor", + description="Remove all large triangles.\n" + "We consider a triangle as large if one edge is bigger than N times the average edge length.\n" + "0 disables the filtering.", value=60.0, range=(0.0, 100.0, 0.1), uid=[0], - ), + ), desc.FloatParam( - name='filterTrianglesRatio', - label='Filter Triangles Ratio', - description='Remove all triangles by ratio (largest edge /smallest edge). Put zero to disable it.', + name="filterTrianglesRatio", + label="Filter Triangles Ratio", + description="Remove all triangles by ratio (largest edge /smallest edge).\n" + "0 disables the filtering.", value=0.0, range=(1.0, 50.0, 0.1), uid=[0], advanced=True, - ), + ), 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=[], - ), + ) ] outputs = [ desc.File( - name='outputMesh', - label='Mesh', - description='''Output mesh.''', - value=desc.Node.internalFolder + 'mesh.{outputMeshFileTypeValue}', + name="outputMesh", + label="Mesh", + description="Output mesh file.", + value=desc.Node.internalFolder + "mesh.{outputMeshFileTypeValue}", uid=[], - ), + ), ] diff --git a/meshroom/nodes/aliceVision/MeshMasking.py b/meshroom/nodes/aliceVision/MeshMasking.py index 5cbe4b864e..193d23610c 100644 --- a/meshroom/nodes/aliceVision/MeshMasking.py +++ b/meshroom/nodes/aliceVision/MeshMasking.py @@ -12,97 +12,97 @@ class MeshMasking(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='Dense SfMData', - description='SfMData file.', - value='', + name="input", + label="Dense SfMData", + description="Dense SfMData file.", + value="", uid=[0], ), desc.File( - name='inputMesh', - label='Input Mesh', - description='''Input Mesh''', - value='', + name="inputMesh", + label="Input Mesh", + description="Input mesh.", + value="", uid=[0], ), desc.ChoiceParam( - name='outputMeshFileType', - label='Output File Type', - description='File Type', - value='obj', - values=('obj', 'gltf', 'fbx', 'stl'), + name="outputMeshFileType", + label="Output Mesh Type", + description="File type of the output mesh.", + value="obj", + values=("obj", "gltf", "fbx", "stl"), exclusive=True, uid=[0], - group='', + group="", ), desc.ListAttribute( elementDesc=desc.File( name="masksFolder", label="Masks Folder", - description="", + description="Folder containing some masks.", value="", uid=[0], ), name="masksFolders", label="Masks Folders", - description='Use masks from specific folder(s). Filename should be the same or the image uid.', + description="Use masks from specific folder(s). Filename should be the same or the image UID.", ), desc.IntParam( - name='threshold', - label='Threshold', - description='The minimum number of visibility to keep a vertex.', + name="threshold", + label="Threshold", + description="The minimum number of visibilities to keep a vertex.", value=1, range=(1, 100, 1), uid=[0] ), desc.BoolParam( - name='smoothBoundary', - label='Smooth Boundary', - description='Modify the triangles at the boundary to fit the masks.', + name="smoothBoundary", + label="Smooth Boundary", + description="Modify the triangles at the boundary to fit the masks.", value=False, uid=[0] ), desc.BoolParam( - name='invert', - label='Invert', - description='''If ticked, the selected area is ignored. - If not, only the selected area is considered.''', + name="invert", + label="Invert", + description="If ticked, the selected area is ignored.\n" + "If not, only the selected area is considered.", value=False, uid=[0] ), desc.BoolParam( - name='undistortMasks', - label='Undistort Masks', - description='''Undistort the masks with the same parameters as the matching image. - Tick it if the masks are drawn on the original images.''', + name="undistortMasks", + label="Undistort Masks", + description="Undistort the masks with the same parameters as the matching image.\n" + "Select it if the masks are drawn on the original images.", value=False, uid=[0] ), desc.BoolParam( - name='usePointsVisibilities', - label='Use points visibilities', - description='''Use the points visibilities from the meshing to filter triangles. - Example: when they are occluded, back-face, etc.''', + name="usePointsVisibilities", + label="Use Points visibilities", + description="Use the points visibilities from the meshing to filter triangles.\n" + "Example: when they are occluded, back-face, etc.", 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'], + 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='outputMesh', - label='Mesh', - description='''Output mesh.''', - value=desc.Node.internalFolder + 'mesh.{outputMeshFileTypeValue}', + name="outputMesh", + label="Mesh", + description="Output mesh file.", + value=desc.Node.internalFolder + "mesh.{outputMeshFileTypeValue}", uid=[], ), ] diff --git a/meshroom/nodes/aliceVision/MeshResampling.py b/meshroom/nodes/aliceVision/MeshResampling.py index b9bbeed491..5e9eda6fab 100644 --- a/meshroom/nodes/aliceVision/MeshResampling.py +++ b/meshroom/nodes/aliceVision/MeshResampling.py @@ -16,75 +16,76 @@ class MeshResampling(desc.AVCommandLineNode): inputs = [ desc.File( name="input", - label='Input Mesh (OBJ file format).', - description='', - value='', + label="Input Mesh", + description="Input mesh in the OBJ file format.", + value="", uid=[0], ), desc.FloatParam( - name='simplificationFactor', - label='Simplification factor', - description='Simplification factor', + name="simplificationFactor", + label="Simplification Factor", + description="Simplification factor for the resampling.", value=0.5, range=(0.0, 1.0, 0.01), uid=[0], ), desc.IntParam( - name='nbVertices', - label='Fixed Number of Vertices', - description='Fixed number of output vertices.', + name="nbVertices", + label="Fixed Number Of Vertices", + description="Fixed number of output vertices.", value=0, range=(0, 1000000, 1), uid=[0], ), desc.IntParam( - name='minVertices', + name="minVertices", label='Min Vertices', - description='Min number of output vertices.', + description="Minimum number of output vertices.", value=0, range=(0, 1000000, 1), uid=[0], ), desc.IntParam( - name='maxVertices', - label='Max Vertices', - description='Max number of output vertices.', + name="maxVertices", + label="Max Vertices", + description="Maximum number of output vertices.", value=0, range=(0, 1000000, 1), uid=[0], ), desc.IntParam( - name='nbLloydIter', - label='Number of Pre-Smoothing Iteration', - description='Number of iterations for Lloyd pre-smoothing.', + name="nbLloydIter", + label="Number Of Pre-Smoothing Iteration", + description="Number of iterations for Lloyd pre-smoothing.", value=40, range=(0, 100, 1), uid=[0], ), desc.BoolParam( - name='flipNormals', - label='Flip Normals', - description='''Option to flip face normals. It can be needed as it depends on the vertices order in triangles and the convention change from one software to another.''', + name="flipNormals", + label="Flip Normals", + description="Option to flip face normals.\n" + "It can be needed as it depends on the vertices order in triangles and the convention changes from one software to another.", 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'], + 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="Mesh", - description="Output mesh (OBJ file format).", - value=desc.Node.internalFolder + 'mesh.obj', + description="Output mesh in the OBJ file format.", + value=desc.Node.internalFolder + "mesh.obj", uid=[], - ), + ), ] diff --git a/meshroom/nodes/aliceVision/Meshing.py b/meshroom/nodes/aliceVision/Meshing.py index 364b25145f..7fb7406c9e 100644 --- a/meshroom/nodes/aliceVision/Meshing.py +++ b/meshroom/nodes/aliceVision/Meshing.py @@ -23,36 +23,38 @@ class Meshing(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='SfmData', - description='SfMData file.', - value='', + name="input", + label="SfmData", + description="Input SfMData file.", + value="", uid=[0], ), desc.File( name="depthMapsFolder", - label='Depth Maps Folder', - description='Input depth maps folder.', - value='', + label="Depth Maps Folder", + description="Input depth maps folder.", + value="", uid=[0], ), desc.ChoiceParam( - name='outputMeshFileType', - label='File Type', - description='Output Mesh File Type', - value='obj', - values=('gltf', 'obj', 'fbx', 'stl'), + name="outputMeshFileType", + label="Mesh Type", + description="File type for the output mesh.", + value="obj", + values=["gltf", "obj", "fbx", "stl"], exclusive=True, uid=[0], - group='', + group="", ), desc.BoolParam( - name='useBoundingBox', - label='Custom Bounding Box', - description='Edit the meshing bounding box. If enabled, it takes priority over the Estimate From SfM option. Parameters can be adjusted in advanced settings.', + name="useBoundingBox", + label="Custom Bounding Box", + description="Edit the meshing bounding box.\n" + "If enabled, it takes priority over the 'Estimate Space From SfM' option.\n" + "Parameters can be adjusted in advanced settings.", value=False, uid=[0], - group='' + group="" ), desc.GroupAttribute( name="boundingBox", @@ -65,19 +67,19 @@ class Meshing(desc.AVCommandLineNode): description="Position in space.", groupDesc=[ desc.FloatParam( - name="x", label="x", description="X Offset", + name="x", label="x", description="X offset.", value=0.0, uid=[0], range=(-20.0, 20.0, 0.01) ), desc.FloatParam( - name="y", label="y", description="Y Offset", + name="y", label="y", description="Y offset.", value=0.0, uid=[0], range=(-20.0, 20.0, 0.01) ), desc.FloatParam( - name="z", label="z", description="Z Offset", + name="z", label="z", description="Z offset.", value=0.0, uid=[0], range=(-20.0, 20.0, 0.01) @@ -91,19 +93,19 @@ class Meshing(desc.AVCommandLineNode): description="Rotation in Euler degrees.", groupDesc=[ desc.FloatParam( - name="x", label="x", description="Euler X Rotation", + name="x", label="x", description="Euler X rotation.", value=0.0, uid=[0], range=(-90.0, 90.0, 1.0) ), desc.FloatParam( - name="y", label="y", description="Euler Y Rotation", + name="y", label="y", description="Euler Y rotation.", value=0.0, uid=[0], range=(-180.0, 180.0, 1.0) ), desc.FloatParam( - name="z", label="z", description="Euler Z Rotation", + name="z", label="z", description="Euler Z rotation.", value=0.0, uid=[0], range=(-180.0, 180.0, 1.0) @@ -117,19 +119,19 @@ class Meshing(desc.AVCommandLineNode): description="Scale of the bounding box.", groupDesc=[ desc.FloatParam( - name="x", label="x", description="X Scale", + name="x", label="x", description="X scale.", value=1.0, uid=[0], range=(0.0, 20.0, 0.01) ), desc.FloatParam( - name="y", label="y", description="Y Scale", + name="y", label="y", description="Y scale.", value=1.0, uid=[0], range=(0.0, 20.0, 0.01) ), desc.FloatParam( - name="z", label="z", description="Z Scale", + name="z", label="z", description="Z scale.", value=1.0, uid=[0], range=(0.0, 20.0, 0.01) @@ -142,17 +144,17 @@ class Meshing(desc.AVCommandLineNode): enabled=lambda node: node.useBoundingBox.value, ), desc.BoolParam( - name='estimateSpaceFromSfM', - label='Estimate Space From SfM', - description='Estimate the 3d space from the SfM', + name="estimateSpaceFromSfM", + label="Estimate Space From SfM", + description="Estimate the 3D space from the SfM.", value=True, uid=[0], advanced=True, ), desc.IntParam( - name='estimateSpaceMinObservations', - label='Min Observations For SfM Space Estimation', - description='Minimum number of observations for SfM space estimation.', + name="estimateSpaceMinObservations", + label="Min Observations For SfM Space Estimation", + description="Minimum number of observations for the space estimation from the SfM.", value=3, range=(0, 100, 1), uid=[0], @@ -160,181 +162,181 @@ class Meshing(desc.AVCommandLineNode): enabled=lambda node: node.estimateSpaceFromSfM.value, ), desc.FloatParam( - name='estimateSpaceMinObservationAngle', - label='Min Observations Angle For SfM Space Estimation', - description='Minimum angle between two observations for SfM space estimation.', + name="estimateSpaceMinObservationAngle", + label="Min Observations Angle For SfM Space Estimation", + description="Minimum angle between two observations for the space estimation from the SfM.", value=10.0, range=(0.0, 120.0, 1.0), uid=[0], enabled=lambda node: node.estimateSpaceFromSfM.value, ), desc.IntParam( - name='maxInputPoints', - label='Max Input Points', - description='Max input points loaded from depth map images.', + name="maxInputPoints", + label="Max Input Points", + description="Maximum input points loaded from depth map images.", value=50000000, range=(500000, 500000000, 1000), uid=[0], ), desc.IntParam( - name='maxPoints', - label='Max Points', - description='Max points at the end of the depth maps fusion.', + name="maxPoints", + label="Max Points", + description="Maximum points at the end of the depth maps fusion.", value=5000000, range=(100000, 10000000, 1000), uid=[0], ), desc.IntParam( - name='maxPointsPerVoxel', - label='Max Points Per Voxel', - description='Max points per voxel', + name="maxPointsPerVoxel", + label="Max Points Per Voxel", + description="Maximum points per voxel.", value=1000000, range=(500000, 30000000, 1000), uid=[0], advanced=True, ), desc.IntParam( - name='minStep', - label='Min Step', - description='The step used to load depth values from depth maps is computed from maxInputPts. ' - 'Here we define the minimal value for this step, so on small datasets we will not spend ' - 'too much time at the beginning loading all depth values.', + name="minStep", + label="Min Step", + description="The step used to load depth values from depth maps is computed from 'maxInputPoints'.\n" + "Here we define the minimum value for this step, so on small datasets we will not spend " + "too much time at the beginning loading all the depth values.", value=2, range=(1, 20, 1), uid=[0], advanced=True, ), desc.ChoiceParam( - name='partitioning', - label='Partitioning', - description='', - value='singleBlock', - values=('singleBlock', 'auto'), + name="partitioning", + label="Partitioning", + description="Single block or auto partitioning.", + value="singleBlock", + values=("singleBlock", "auto"), exclusive=True, uid=[0], advanced=True, ), desc.ChoiceParam( - name='repartition', - label='Repartition', - description='', - value='multiResolution', - values=('multiResolution', 'regularGrid'), + name="repartition", + label="Repartition", + description="Multi-resolution or regular grid-based repartition.", + value="multiResolution", + values=("multiResolution", "regularGrid"), exclusive=True, uid=[0], advanced=True, ), desc.FloatParam( - name='angleFactor', - label='angleFactor', - description='angleFactor', + name="angleFactor", + label="Angle Factor", + description="Angle factor.", value=15.0, range=(0.0, 200.0, 1.0), uid=[0], advanced=True, ), desc.FloatParam( - name='simFactor', - label='simFactor', - description='simFactor', + name="simFactor", + label="Sim Factor", + description="Sim factor.", value=15.0, range=(0.0, 200.0, 1.0), uid=[0], advanced=True, ), desc.FloatParam( - name='pixSizeMarginInitCoef', - label='pixSizeMarginInitCoef', - description='pixSizeMarginInitCoef', + name="pixSizeMarginInitCoef", + label="Pix Size Margin Init Coef", + description="Size of the margin init coefficient, in pixels.", value=2.0, range=(0.0, 10.0, 0.1), uid=[0], advanced=True, ), desc.FloatParam( - name='pixSizeMarginFinalCoef', - label='pixSizeMarginFinalCoef', - description='pixSizeMarginFinalCoef', + name="pixSizeMarginFinalCoef", + label="Pix Size Margin Final Coef", + description="Size of the margin final coefficient, in pixels.", value=4.0, range=(0.0, 10.0, 0.1), uid=[0], advanced=True, ), desc.FloatParam( - name='voteMarginFactor', - label='voteMarginFactor', - description='voteMarginFactor', + name="voteMarginFactor", + label="Vote Margin Factor", + description="Vote margin factor.", value=4.0, range=(0.1, 10.0, 0.1), uid=[0], advanced=True, ), desc.FloatParam( - name='contributeMarginFactor', - label='contributeMarginFactor', - description='contributeMarginFactor', + name="contributeMarginFactor", + label="Contribute Margin Factor", + description="Contribute margin factor.", value=2.0, range=(0.0, 10.0, 0.1), uid=[0], advanced=True, ), desc.FloatParam( - name='simGaussianSizeInit', - label='simGaussianSizeInit', - description='simGaussianSizeInit', + name="simGaussianSizeInit", + label="Sim Gaussian Size Init", + description="Sim Gaussian size init.", value=10.0, range=(0.0, 50.0, 0.1), uid=[0], advanced=True, ), desc.FloatParam( - name='simGaussianSize', - label='simGaussianSize', - description='simGaussianSize', + name="simGaussianSize", + label="Sim Gaussian Size", + description="Sim Gaussian size.", value=10.0, range=(0.0, 50.0, 0.1), uid=[0], advanced=True, ), desc.FloatParam( - name='minAngleThreshold', - label='minAngleThreshold', - description='minAngleThreshold', + name="minAngleThreshold", + label="Min Angle Threshold", + description="Minimum angle threshold.", value=1.0, range=(0.0, 10.0, 0.01), uid=[0], advanced=True, ), desc.BoolParam( - name='refineFuse', - label='Refine Fuse', - description='Refine depth map fusion with the new pixels size defined by angle and similarity scores.', + name="refineFuse", + label="Refine Fuse", + description="Refine depth map fusion with the new pixels size defined by angle and similarity scores.", value=True, uid=[0], advanced=True, ), desc.IntParam( - name='helperPointsGridSize', + name="helperPointsGridSize", label='Helper Points Grid Size', - description='Grid Size for the helper points.', + description="Grid size for the helper points.", value=10, range=(0, 50, 1), uid=[0], advanced=True, ), desc.BoolParam( - name='densify', - label='Densify', - description='Densify scene with helper points around vertices.', + name="densify", + label="Densify", + description="Densify scene with helper points around vertices.", value=False, uid=[], advanced=True, - group='', + group="", ), desc.IntParam( - name='densifyNbFront', - label='Densify: Front', - description='Densify vertices: front.', + name="densifyNbFront", + label="Densify: Front", + description="Densify vertices: front.", value=1, range=(0, 5, 1), uid=[0], @@ -342,9 +344,9 @@ class Meshing(desc.AVCommandLineNode): enabled=lambda node: node.densify.value, ), desc.IntParam( - name='densifyNbBack', - label='Densify: Back', - description='Densify vertices: back.', + name="densifyNbBack", + label="Densify: Back", + description="Densify vertices: back.", value=1, range=(0, 5, 1), uid=[0], @@ -352,9 +354,9 @@ class Meshing(desc.AVCommandLineNode): enabled=lambda node: node.densify.value, ), desc.FloatParam( - name='densifyScale', - label='Densify Scale', - description='Scale between points used to densify the scene.', + name="densifyScale", + label="Densify Scale", + description="Scale between points used to densify the scene.", value=20.0, range=(0.0, 10.0, 0.1), uid=[0], @@ -362,85 +364,88 @@ class Meshing(desc.AVCommandLineNode): enabled=lambda node: node.densify.value, ), desc.FloatParam( - name='nPixelSizeBehind', - label='Nb Pixel Size Behind', - description='Number of pixel size units to vote behind the vertex as FULL status.', + name="nPixelSizeBehind", + label="Nb Pixel Size Behind", + description="Number of pixel size units to vote behind the vertex as FULL status.", value=4.0, range=(0.0, 10.0, 0.1), uid=[0], advanced=True, ), desc.FloatParam( - name='fullWeight', - label='Full Weight', - description='Weighting for full status.', + name="fullWeight", + label="Full Weight", + description="Weighting for full status.", value=1.0, range=(0.0, 10.0, 0.1), uid=[0], advanced=True, ), desc.BoolParam( - name='voteFilteringForWeaklySupportedSurfaces', - label='Weakly Supported Surface Support', - description='Improve support of weakly supported surfaces with a tetrahedra fullness score filtering.', + name="voteFilteringForWeaklySupportedSurfaces", + label="Weakly Supported Surface Support", + description="Improve support of weakly supported surfaces with a tetrahedra fullness score filtering.", value=True, uid=[0], ), desc.BoolParam( - name='addLandmarksToTheDensePointCloud', - label='Add Landmarks To The Dense Point Cloud', - description='Add SfM Landmarks to the dense point cloud.', + name="addLandmarksToTheDensePointCloud", + label="Add Landmarks To The Dense Point Cloud", + description="Add SfM landmarks to the dense point cloud.", value=False, uid=[0], advanced=True, ), desc.IntParam( - name='invertTetrahedronBasedOnNeighborsNbIterations', - label='Tretrahedron Neighbors Coherency Nb Iterations', - description='Invert cells status around surface to improve smoothness. Zero to disable.', + name="invertTetrahedronBasedOnNeighborsNbIterations", + label="Tretrahedron Neighbors Coherency Nb Iterations", + description="Invert cells status around surface to improve smoothness.\n" + "Set to 0 to disable.", value=10, range=(0, 30, 1), uid=[0], advanced=True, ), desc.FloatParam( - name='minSolidAngleRatio', - label='minSolidAngleRatio', - description='Change cells status on surface around vertices to improve smoothness using solid angle ratio between full/empty parts. Zero to disable.', + name="minSolidAngleRatio", + label="Min Solid Angle Ratio", + description="Change cells status on surface around vertices to improve smoothness using solid angle \n" + "ratio between full/empty parts. Set to 0 to disable.", value=0.2, range=(0.0, 0.5, 0.01), uid=[0], advanced=True, ), desc.IntParam( - name='nbSolidAngleFilteringIterations', - label='Nb Solid Angle Filtering Iterations', - description='Filter cells status on surface around vertices to improve smoothness using solid angle ratio between full/empty parts. Zero to disable.', + name="nbSolidAngleFilteringIterations", + label="Nb Solid Angle Filtering Iterations", + description="Filter cells status on surface around vertices to improve smoothness using solid angle ratio \n" + "between full/empty parts. Set to 0 to disable.", value=2, range=(0, 30, 1), uid=[0], advanced=True, ), desc.BoolParam( - name='colorizeOutput', - label='Colorize Output', - description='Whether to colorize output dense point cloud and mesh.', + name="colorizeOutput", + label="Colorize Output", + description="Whether to colorize output dense point cloud and mesh.", value=False, uid=[0], ), desc.BoolParam( - name='addMaskHelperPoints', - label='Add Mask Helper Points', - description='Add Helper points on the outline of the depth maps masks.', + name="addMaskHelperPoints", + label="Add Mask Helper Points", + description="Add Helper points on the outline of the depth maps masks.", value=False, uid=[], advanced=True, - group='', + group="", ), desc.FloatParam( - name='maskHelperPointsWeight', - label='Mask Helper Points Weight', - description='Weight value for mask helper points. Zero means no helper point.', + name="maskHelperPointsWeight", + label="Mask Helper Points Weight", + description="Weight value for mask helper points. 0 means no helper point.", value=1.0, range=(0.0, 20.0, 1.0), uid=[0], @@ -448,9 +453,9 @@ class Meshing(desc.AVCommandLineNode): enabled=lambda node: node.addMaskHelperPoints.value, ), desc.IntParam( - name='maskBorderSize', - label='Mask Border Size', - description='How many pixels on mask borders?', + name="maskBorderSize", + label="Mask Border Size", + description="Number of pixels on mask borders.", value=4, range=(0, 20, 1), uid=[0], @@ -458,55 +463,59 @@ class Meshing(desc.AVCommandLineNode): enabled=lambda node: node.addMaskHelperPoints.value, ), desc.IntParam( - name='maxNbConnectedHelperPoints', - label='Helper Points: Max Segment Size', - description='Maximum size of a segment of connected helper points before we remove it. Small segments of helper points can be on the real surface and should not be removed to avoid the creation of holes. 0 means that we remove all helper points. -1 means that we do not filter helper points at all.', + name="maxNbConnectedHelperPoints", + label="Helper Points: Max Segment Size", + description="Maximum size of a segment of connected helper points before we remove it.\n" + "Small segments of helper points can be on the real surface and should not be removed to avoid the creation of holes.\n" + "0 means that all helper points are removed. -1 means that helper points are not filtered at all.", value=50, range=(-1, 100, 1), uid=[0], advanced=True, ), desc.BoolParam( - name='saveRawDensePointCloud', - label='Save Raw Dense Point Cloud', - description='Save dense point cloud before cut and filtering.', + name="saveRawDensePointCloud", + label="Save Raw Dense Point Cloud", + description="Save dense point cloud before cut and filtering.", value=False, uid=[], advanced=True, ), desc.BoolParam( - name='exportDebugTetrahedralization', - label='Export DEBUG Tetrahedralization', - description='Export debug cells score as tetrahedral mesh.\nWARNING: Could create HUGE meshes, only use on very small datasets.', + name="exportDebugTetrahedralization", + label="Export Debug Tetrahedralization", + description="Export debug cells score as tetrahedral mesh.\n" + "WARNING: Could create HUGE meshes, only use on very small datasets.", value=False, uid=[], advanced=True, ), desc.IntParam( - name='seed', - label='Seed', - description='Seed used for random operations. Zero means use of random device instead of a fixed seed.', + name="seed", + label="Seed", + description="Seed used for random operations.\n" + "0 means use of random device instead of a fixed seed.", value=0, range=(0, 10000, 1), uid=[0], advanced=True, ), 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=[], - ), + ) ] outputs = [ desc.File( name="outputMesh", label="Mesh", - description="Output mesh", + description="Output mesh.", value="{cache}/{nodeType}/{uid0}/mesh.{outputMeshFileTypeValue}", uid=[], ), diff --git a/meshroom/nodes/aliceVision/NormalIntegration.py b/meshroom/nodes/aliceVision/NormalIntegration.py index 6fbe440742..be909bb645 100644 --- a/meshroom/nodes/aliceVision/NormalIntegration.py +++ b/meshroom/nodes/aliceVision/NormalIntegration.py @@ -11,44 +11,44 @@ class NormalIntegration(desc.CommandLineNode): inputs = [ desc.File( - name='inputPath', - label='Normal Maps Folder', - description='Path to the folder containing the normal maps and the masks.', - value='', + name="inputPath", + label="Normal Maps Folder", + description="Path to the folder containing the normal maps and the masks.", + value="", uid=[0] ), desc.File( - name='sfmDataFile', - label='SfMData', - description='Input SfMData file.', - value='', + name="sfmDataFile", + label="SfMData", + description="Input SfMData file.", + value="", uid=[0], ), desc.IntParam( - name='downscale', - label='Downscale Factor', - description='Downscale factor for faster results.', + 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'], + 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=[] + uid=[], ) ] outputs = [ desc.File( - name='outputPath', - label='Output Path', - description='Path to the output folder.', + name="outputPath", + label="Output Path", + description="Path to the output folder.", value=desc.Node.internalFolder, uid=[] ) diff --git a/meshroom/nodes/aliceVision/PanoramaCompositing.py b/meshroom/nodes/aliceVision/PanoramaCompositing.py index 77abd49805..1076cab657 100644 --- a/meshroom/nodes/aliceVision/PanoramaCompositing.py +++ b/meshroom/nodes/aliceVision/PanoramaCompositing.py @@ -24,106 +24,106 @@ class PanoramaCompositing(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='Input SfMData', - description="Input SfMData.", - value='', + name="input", + label="Input SfMData", + description="Input SfMData file.", + value="", uid=[0], ), desc.File( - name='warpingFolder', - label='Warping Folder', - description="Panorama Warping results", - value='', + name="warpingFolder", + label="Warping Folder", + description="Panorama warping results folder.", + value="", uid=[0], ), desc.File( - name='labels', - label='Labels image', - description="Panorama Seams results", - value='', + name="labels", + label="Labels Images", + description="Panorama seams results images.", + value="", uid=[0], ), desc.ChoiceParam( - name='compositerType', - label='Compositer Type', - description='Which compositer should be used to blend images:\n' - ' * multiband: high quality transition by fusing images by frequency bands\n' - ' * replace: debug option with straight transitions\n' - ' * alpha: debug option with linear transitions\n', - value='multiband', - values=['replace', 'alpha', 'multiband'], + name="compositerType", + label="Compositer Type", + description="Which compositer should be used to blend images:\n" + " - multiband: high quality transition by fusing images by frequency bands.\n" + " - replace: debug option with straight transitions.\n" + " - alpha: debug option with linear transitions.", + value="multiband", + values=["replace", "alpha", "multiband"], exclusive=True, uid=[0] ), desc.IntParam( - name='forceMinPyramidLevels', - label='Min Pyramid Levels', - description='Force the minimal number of levels in the pyramid for multiband compositer.', + name="forceMinPyramidLevels", + label="Min Pyramid Levels", + description="Force the minimal number of levels in the pyramid for multiband compositer.", value=0, range=(0, 16, 1), uid=[0], - enabled=lambda node: node.compositerType.value and node.compositerType.value == 'multiband', + enabled=lambda node: node.compositerType.value and node.compositerType.value == "multiband", ), desc.IntParam( - name='maxThreads', - label='Max Nb Threads', - description='Specifies the maximum number of threads to run simultaneously.', + name="maxThreads", + label="Max Nb Threads", + description="Specifies the maximum number of threads to run simultaneously.", value=4, range=(0, 48, 1), uid=[], advanced=True, ), desc.BoolParam( - name='useTiling', - label='Use tiling', - description='''Enable tiling mode for parallelization''', + name="useTiling", + label="Use Tiling", + description="Enable tiling mode for parallelization.", value=True, uid=[0], ), desc.ChoiceParam( - name='storageDataType', - label='Storage Data Type', - description='Storage image data type:\n' - ' * float: Use full floating point (32 bits per channel)\n' - ' * half: Use half float (16 bits per channel)\n' - ' * halfFinite: Use half float, but clamp values to avoid non-finite values\n' - ' * auto: Use half float if all values can fit, else use full float\n', - value='float', - values=['float', 'half', 'halfFinite', 'auto'], + name="storageDataType", + label="Storage Data Type", + description="Storage image data type:\n" + " - float: Use full floating point (32 bits per channel).\n" + " - half: Use half float (16 bits per channel).\n" + " - halfFinite: Use half float, but clamp values to avoid non-finite values.\n" + " - auto: Use half float if all values can fit, else use full float.", + value="float", + values=["float", "half", "halfFinite", "auto"], exclusive=True, uid=[0], ), desc.ChoiceParam( - name='overlayType', - label='Overlay Type', - description='Overlay on top of panorama to analyze transitions:\n' - ' * none: no overlay\n' - ' * borders: display image borders\n' - ' * seams: display transitions between images\n' - ' * all: display borders and seams\n', - value='none', - values=['none', 'borders', 'seams', 'all'], + name="overlayType", + label="Overlay Type", + description="Overlay on top of panorama to analyze transitions:\n" + " - none: no overlay.\n" + " - borders: display image borders.\n" + " - seams: display transitions between images.\n" + " - all: display borders and seams.", + value="none", + values=["none", "borders", "seams", "all"], exclusive=True, 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'], + 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='Folder', - description='', + name="output", + label="Folder", + description="Output folder containing the composited panorama.", value=desc.Node.internalFolder, uid=[], ) diff --git a/meshroom/nodes/aliceVision/PanoramaEstimation.py b/meshroom/nodes/aliceVision/PanoramaEstimation.py index 2882d37a18..fb1de15af8 100644 --- a/meshroom/nodes/aliceVision/PanoramaEstimation.py +++ b/meshroom/nodes/aliceVision/PanoramaEstimation.py @@ -17,177 +17,177 @@ class PanoramaEstimation(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='Input', - description="SfM Data File", - value='', + name="input", + label="SfMData", + description="Input SfMData file.", + value="", uid=[0], ), desc.ListAttribute( elementDesc=desc.File( - name='featuresFolder', - label='Features Folder', - description="", - value='', + name="featuresFolder", + label="Features Folder", + description="Folder containing some extracted features.", + value="", uid=[0], ), - name='featuresFolders', - label='Features Folders', + name="featuresFolders", + label="Features Folders", description="Folder(s) containing the extracted features." ), desc.ListAttribute( elementDesc=desc.File( - name='matchesFolder', - label='Matches Folder', - description="", - value='', + name="matchesFolder", + label="Matches Folder", + description="Folder containing some matches.", + value="", uid=[0], ), - name='matchesFolders', - label='Matches Folders', + name="matchesFolders", + label="Matches Folders", description="Folder(s) in which computed matches are stored." ), desc.ChoiceParam( - name='describerTypes', - label='Describer Types', - description='Describer types used to describe an image.', - value=['sift'], - values=['sift', 'sift_float', 'sift_upright', 'dspsift', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', - 'sift_ocv', 'akaze_ocv'], + name="describerTypes", + label="Describer Types", + description="Describer types used to describe an image.", + value=["sift"], + values=["sift", "sift_float", "sift_upright", "dspsift", "akaze", "akaze_liop", "akaze_mldb", "cctag3", "cctag4", + "sift_ocv", "akaze_ocv"], exclusive=False, uid=[0], - joinChar=',', + joinChar=",", ), desc.FloatParam( - name='offsetLongitude', - label='Longitude offset (deg.)', - description='''Offset to the panorama longitude''', + name="offsetLongitude", + label="Longitude Offset", + description="Offset to the panorama longitude (in degrees).", value=0.0, range=(-180.0, 180.0, 1.0), uid=[0], ), desc.FloatParam( - name='offsetLatitude', - label='Latitude offset (deg.)', - description='''Offset to the panorama latitude''', + name="offsetLatitude", + label="Latitude Offset", + description="Offset to the panorama latitude (in degrees).", value=0.0, range=(-90.0, 90.0, 1.0), uid=[0], ), desc.ChoiceParam( - name='rotationAveraging', - label='Rotation Averaging Method', + name="rotationAveraging", + label="Rotation Averaging Method", description="Method for rotation averaging :\n" - " * L1 minimization\n" - " * L2 minimization\n", - values=['L1_minimization', 'L2_minimization'], - value='L2_minimization', + " - L1 minimization\n" + " - L2 minimization", + values=["L1_minimization", "L2_minimization"], + value="L2_minimization", exclusive=True, uid=[0], advanced=True, ), desc.ChoiceParam( - name='relativeRotation', - label='Relative Rotation Method', + name="relativeRotation", + label="Relative Rotation Method", description="Method for relative rotation :\n" - " * from essential matrix\n" - " * from homography matrix\n" - " * from rotation matrix", - values=['essential_matrix', 'homography_matrix', 'rotation_matrix'], - value='rotation_matrix', + " - from essential matrix\n" + " - from homography matrix\n" + " - from rotation matrix", + values=["essential_matrix", "homography_matrix", "rotation_matrix"], + value="rotation_matrix", exclusive=True, uid=[0], advanced=True, ), desc.BoolParam( - name='rotationAveragingWeighting', - label='Rotation Averaging Weighting', - description='Rotation averaging weighting based on the number of feature matches.', + name="rotationAveragingWeighting", + label="Rotation Averaging Weighting", + description="Rotation averaging weighting based on the number of feature matches.", value=True, uid=[0], advanced=True, ), desc.BoolParam( - name='filterMatches', - label='Filter Matches', - description='Filter Matches', + name="filterMatches", + label="Filter Matches", + description="Filter the matches.", value=False, uid=[0], ), desc.BoolParam( - name='refine', - label='Refine', - description='Refine camera relative poses, points and optionally internal camera parameter', + name="refine", + label="Refine", + description="Refine camera relative poses, points and optionally internal camera parameters.", value=True, uid=[0], ), desc.BoolParam( - name='lockAllIntrinsics', - label='Force Lock of All Intrinsics', - description='Force to keep constant all the intrinsics parameters of the cameras (focal length, \n' - 'principal point, distortion if any) during the reconstruction.\n' - 'This may be helpful if the input cameras are already fully calibrated.', + name="lockAllIntrinsics", + label="Lock All Intrinsics", + description="Force to keep all the intrinsics parameters of the cameras (focal length, \n" + "principal point, distortion if any) constant during the reconstruction.\n" + "This may be helpful if the input cameras are already fully calibrated.", value=False, uid=[0], ), desc.FloatParam( - name='maxAngleToPrior', - label='Max Angle To Priors (deg.)', - description='''Maximal angle allowed regarding the input prior (in degrees).''', + name="maxAngleToPrior", + label="Max Angle To Priors", + description="Maximum angle allowed regarding the input prior (in degrees).", value=20.0, range=(0.0, 360.0, 1.0), uid=[0], advanced=True, ), desc.FloatParam( - name='maxAngularError', - label='Max Angular Error (deg.)', - description='''Maximal angular error in global rotation averging (in degrees).''', + name="maxAngularError", + label="Max Angular Error", + description="Maximum angular error in global rotation averging (in degrees).", value=100.0, range=(0.0, 360.0, 1.0), uid=[0], advanced=True, ), desc.BoolParam( - name='intermediateRefineWithFocal', - label='Intermediate Refine: Focal', - description='Intermediate refine with rotation and focal length only.', + name="intermediateRefineWithFocal", + label="Intermediate Refine: Focal", + description="Intermediate refine with rotation and focal length only.", value=False, uid=[0], advanced=True, ), desc.BoolParam( - name='intermediateRefineWithFocalDist', - label='Intermediate Refine: Focal And Distortion', - description='Intermediate refine with rotation, focal length and distortion.', + name="intermediateRefineWithFocalDist", + label="Intermediate Refine: Focal And Distortion", + description="Intermediate refine with rotation, focal length and distortion.", value=False, uid=[0], advanced=True, ), 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=[], - ), + ) ] outputs = [ desc.File( - name='output', - label='SfMData File', - description='Path to the output sfmdata file', - value=desc.Node.internalFolder + 'panorama.abc', + name="output", + label="SfM File", + description="Path to the output SfM file.", + value=desc.Node.internalFolder + "panorama.abc", uid=[], ), desc.File( - name='outputViewsAndPoses', - label='Poses', - description='''Path to the output sfmdata file with cameras (views and poses).''', - value=desc.Node.internalFolder + 'cameras.sfm', + name="outputViewsAndPoses", + label="Views And Poses", + description="Path to the output SfMData file with cameras (views and poses).", + value=desc.Node.internalFolder + "cameras.sfm", uid=[], ), ] diff --git a/meshroom/nodes/aliceVision/PanoramaInit.py b/meshroom/nodes/aliceVision/PanoramaInit.py index 08894c64bf..e9527f24f6 100644 --- a/meshroom/nodes/aliceVision/PanoramaInit.py +++ b/meshroom/nodes/aliceVision/PanoramaInit.py @@ -22,85 +22,87 @@ class PanoramaInit(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='Input', - description="SfM Data File", - value='', + name="input", + label="SfMData", + description="Input SfMData file.", + value="", uid=[0], ), desc.ChoiceParam( - name='initializeCameras', - label='Initialize Cameras', - description='Initialize cameras.', - value='No', - values=['No', 'File', 'Horizontal', 'Horizontal+Zenith', 'Zenith+Horizontal', 'Spherical'], + name="initializeCameras", + label="Initialize Cameras", + description="Initialize cameras.", + value="No", + values=["No", "File", "Horizontal", "Horizontal+Zenith", "Zenith+Horizontal", "Spherical"], exclusive=True, uid=[0], ), desc.File( - name='config', - label='Xml Config', - description="XML Data File", - value='', + name="config", + label="XML Config", + description="XML data file.", + value="", uid=[0], - enabled=lambda node: node.initializeCameras.value == 'File', + enabled=lambda node: node.initializeCameras.value == "File", ), desc.BoolParam( - name='yawCW', - label='Yaw CW', - description="Yaw ClockWise or CounterClockWise", + name="yawCW", + label="Yaw CW", + description="If selected, the yaw rotation will be clockwise. Otherwise, it will be counter-clockwise.", value=True, uid=[0], - enabled=lambda node: ('Horizontal' in node.initializeCameras.value) or (node.initializeCameras.value == "Spherical"), + enabled=lambda node: ("Horizontal" in node.initializeCameras.value) or (node.initializeCameras.value == "Spherical"), ), desc.BoolParam( - name='buildContactSheet', - label='Build Contact Sheet', - description='Build the contact sheet for the panorama if an XML data file is provided.\n' - 'The contact sheet consists in a preview of the panorama using the input images.', + name="buildContactSheet", + label="Build Contact Sheet", + description="Build the contact sheet for the panorama if an XML data file is provided.\n" + "The contact sheet consists in a preview of the panorama using the input images.", value=True, uid=[0], - enabled=lambda node: node.config.enabled and node.config.value != '' + enabled=lambda node: node.config.enabled and node.config.value != "" ), desc.ListAttribute( elementDesc=desc.IntParam( - name='nbViews', - label='', - description='', + name="nbViews", + label="Number of Views", + description="Number of views for a line.", value=-1, - range=[-1, 20], + range=(-1, 20, 1), uid=[0], ), - name='nbViewsPerLine', - label='Spherical: Nb Views Per Line', - description='Number of views per line in Spherical acquisition. Assumes angles from [-90,+90deg] for pitch and [-180,+180deg] for yaw. Use -1 to estimate the number of images automatically.', - joinChar=',', - enabled=lambda node: node.initializeCameras.value == 'Spherical', + name="nbViewsPerLine", + label="Spherical: Nb Views Per Line", + description="Number of views per line in Spherical acquisition.\n" + "Assumes angles from [-90,+90deg] for pitch and [-180,+180deg] for yaw.\n" + "Use -1 to estimate the number of images automatically.", + joinChar=",", + enabled=lambda node: node.initializeCameras.value == "Spherical", ), desc.ListAttribute( elementDesc=desc.File( - name='dependency', - label='', + name="dependency", + label="", description="", - value='', + value="", uid=[], ), - name='dependency', - label='Dependency', + name="dependency", + label="Dependency", description="Folder(s) in which computed features are stored. (WORKAROUND for valid Tractor graph submission)", - group='forDependencyOnly', # not a command line argument + group="forDependencyOnly", # not a command line argument ), desc.BoolParam( - name='useFisheye', - label='Full Fisheye', - description='To declare a full fisheye panorama setup', + name="useFisheye", + label="Full Fisheye", + description="Set this option to declare a full fisheye panorama setup.", value=False, uid=[0], ), desc.BoolParam( - name='estimateFisheyeCircle', - label='Estimate Fisheye Circle', - description='Automatically estimate the Fisheye Circle center and radius instead of using user values.', + name="estimateFisheyeCircle", + label="Estimate Fisheye Circle", + description="Automatically estimate the fisheye circle center and radius instead of using user values.", value=True, uid=[0], enabled=lambda node: node.useFisheye.value, @@ -108,15 +110,15 @@ class PanoramaInit(desc.AVCommandLineNode): desc.GroupAttribute( name="fisheyeCenterOffset", label="Fisheye Center", - description="Center of the Fisheye circle (XY offset to the center in pixels).", + description="Center of the fisheye circle (XY offset to the center in pixels).", groupDesc=[ desc.FloatParam( - name="fisheyeCenterOffset_x", label="x", description="X Offset in pixels", + name="fisheyeCenterOffset_x", label="x", description="X offset in pixels.", value=0.0, uid=[0], range=(-1000.0, 10000.0, 1.0)), desc.FloatParam( - name="fisheyeCenterOffset_y", label="y", description="Y Offset in pixels", + name="fisheyeCenterOffset_y", label="y", description="Y offset in pixels.", value=0.0, uid=[0], range=(-1000.0, 10000.0, 1.0)), @@ -125,49 +127,49 @@ class PanoramaInit(desc.AVCommandLineNode): enabled=lambda node: node.useFisheye.value and not node.estimateFisheyeCircle.value, ), desc.FloatParam( - name='fisheyeRadius', - label='Radius', - description='Fisheye visibillity circle radius (% of image shortest side).', + name="fisheyeRadius", + label="Fisheye Radius", + description="Fisheye visibillity circle radius (in % of image's shortest side).", value=96.0, range=(0.0, 150.0, 0.01), uid=[0], enabled=lambda node: node.useFisheye.value and not node.estimateFisheyeCircle.value, ), desc.ChoiceParam( - name='inputAngle', - label='input Angle offset', - description='Add a rotation to the input XML given poses (CCW).', - value='None', - values=['None', 'rotate90', 'rotate180', 'rotate270'], + name="inputAngle", + label="Input Angle Offset", + description="Add a rotation to the input XML given poses (CCW).", + value="None", + values=["None", "rotate90", "rotate180", "rotate270"], exclusive=True, uid=[0] ), desc.BoolParam( - name='debugFisheyeCircleEstimation', - label='Debug Fisheye Circle Detection', - description='Debug fisheye circle detection.', + name="debugFisheyeCircleEstimation", + label="Debug Fisheye Circle Detection", + description="Debug fisheye circle detection.", value=False, uid=[0], enabled=lambda node: node.useFisheye.value, advanced=True, ), 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=[], - ), + ) ] outputs = [ desc.File( - name='outSfMData', - label='SfMData File', - description='Path to the output sfmdata file', - value=desc.Node.internalFolder + 'sfmData.sfm', + name="outSfMData", + label="SfMData File", + description="Path to the output SfMData file.", + value=desc.Node.internalFolder + "sfmData.sfm", uid=[], ) ] diff --git a/meshroom/nodes/aliceVision/PanoramaMerging.py b/meshroom/nodes/aliceVision/PanoramaMerging.py index 2f1721ecb4..3e12c4e2cd 100644 --- a/meshroom/nodes/aliceVision/PanoramaMerging.py +++ b/meshroom/nodes/aliceVision/PanoramaMerging.py @@ -19,67 +19,67 @@ class PanoramaMerging(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='Input SfMData', - description="Input SfMData.", + name="input", + label="Input SfMData", + description="Input SfMData file.", value='', uid=[0], ), desc.File( - name='compositingFolder', - label='compositing Folder', - description="Panorama Compositing results", - value='', + name="compositingFolder", + label="Compositing Folder", + description="Panorama compositing results.", + value="", uid=[0], ), desc.ChoiceParam( - name='outputFileType', - label='Output File Type', - description='Output file type for the undistorted images.', - value='exr', - values=['jpg', 'png', 'tif', 'exr'], + name="outputFileType", + label="Output File Type", + description="Output file type for the merged panorama.", + value="exr", + values=["jpg", "png", "tif", "exr"], exclusive=True, uid=[0], - group='', # not part of allParams, as this is not a parameter for the command line + group="", # not part of allParams, as this is not a parameter for the command line ), desc.BoolParam( - name='useTiling', - label='Use tiling', - description='''Enable tiling mode for parallelization''', + name="useTiling", + label="Use Tiling", + description="Enable tiling mode for parallelization.", value=True, uid=[0], ), desc.ChoiceParam( - name='storageDataType', - label='Storage Data Type', - description='Storage image data type:\n' - ' * float: Use full floating point (32 bits per channel)\n' - ' * half: Use half float (16 bits per channel)\n' - ' * halfFinite: Use half float, but clamp values to avoid non-finite values\n' - ' * auto: Use half float if all values can fit, else use full float\n', - value='float', - values=['float', 'half', 'halfFinite', 'auto'], + name="storageDataType", + label="Storage Data Type", + description="Storage image data type:\n" + " - float: Use full floating point (32 bits per channel).\n" + " - half: Use half float (16 bits per channel).\n" + " - halfFinite: Use half float, but clamp values to avoid non-finite values.\n" + " - auto: Use half float if all values can fit, else use full float.\n", + value="float", + values=["float", "half", "halfFinite", "auto"], exclusive=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'], + 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='outputPanorama', - label='Panorama', - description='', - semantic='image', - value=desc.Node.internalFolder + 'panorama.{outputFileTypeValue}', + name="outputPanorama", + label="Panorama", + description="Output merged panorama image.", + semantic="image", + value=desc.Node.internalFolder + "panorama.{outputFileTypeValue}", uid=[], ), ] diff --git a/meshroom/nodes/aliceVision/PanoramaPostProcessing.py b/meshroom/nodes/aliceVision/PanoramaPostProcessing.py index 0f105104e2..a85d76092d 100644 --- a/meshroom/nodes/aliceVision/PanoramaPostProcessing.py +++ b/meshroom/nodes/aliceVision/PanoramaPostProcessing.py @@ -18,83 +18,82 @@ class PanoramaPostProcessing(desc.CommandLineNode): inputs = [ desc.File( - name='inputPanorama', - label='Input Panorama', - description="Input Panorama.", - value='', + name="inputPanorama", + label="Input Panorama", + description="Input panorama image.", + value="", uid=[0], ), desc.BoolParam( - name='fillHoles', - label='Use fill holes algorithm', - description='Fill the non attributed pixels with push pull algorithm.', + name="fillHoles", + label="Fill Holes Algorithm", + description="Fill the non attributed pixels with push pull algorithm if set.", value=False, uid=[0], ), desc.IntParam( - name='previewSize', - label='Panorama Preview Width', - description='The width (in pixels) of the output panorama preview.', + name="previewSize", + label="Panorama Preview Width", + description="The width (in pixels) of the output panorama preview.", value=1000, range=(0, 5000, 100), uid=[0] ), desc.ChoiceParam( - name='outputColorSpace', - label='Output Color Space', - description='Allows you to choose the color space of the output image.', - value='Linear', - values=['sRGB', 'rec709', 'Linear', 'ACES2065-1', 'ACEScg'], + name="outputColorSpace", + label="Output Color Space", + description="The color space of the output image.", + value="Linear", + values=["sRGB", "rec709", "Linear", "ACES2065-1", "ACEScg"], exclusive=True, uid=[0], ), desc.ChoiceParam( - name='compressionMethod', - label='Compression Method', - description='Compression method for output EXR image.', - value='auto', - values=['none', 'auto', 'rle', 'zip', 'zips', 'piz', 'pxr24', 'b44', 'b44a', 'dwaa', 'dwab'], + name="compressionMethod", + label="Compression Method", + description="Compression method for output EXR image.", + value="auto", + values=["none", "auto", "rle", "zip", "zips", "piz", "pxr24", "b44", "b44a", "dwaa", "dwab"], exclusive=True, uid=[0], ), desc.IntParam( - name='compressionLevel', - label='Compression Level', - description='Level of compression for output EXR image, range depends on method used.\n' - 'For zip/zips methods, values must be between 1 and 9.\n' - 'A value of 0 will be ignored, default value for the selected method will be used.', + name="compressionLevel", + label="Compression Level", + description="Level of compression for the output EXR image. The range depends on method used.\n" + "For zip/zips methods, values must be between 1 and 9.\n" + "A value of 0 will be ignored, default value for the selected method will be used.", value=0, range=(0, 500, 1), uid=[0], - enabled=lambda node: node.compressionMethod.value in ['dwaa', 'dwab', 'zip', 'zips'] + enabled=lambda node: node.compressionMethod.value in ["dwaa", "dwab", "zip", "zips"] ), - 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=[], - ), + ) ] outputs = [ desc.File( - name='outputPanorama', - label='Output Panorama', - description='Generated panorama in EXR format.', - semantic='image', - value=desc.Node.internalFolder + 'panorama.exr', + name="outputPanorama", + label="Output Panorama", + description="Generated panorama in EXR format.", + semantic="image", + value=desc.Node.internalFolder + "panorama.exr", uid=[], ), desc.File( - name='outputPanoramaPreview', - label='Output Panorama Preview', - description='Preview of the generated panorama in JPG format.', - semantic='image', - value=desc.Node.internalFolder + 'panoramaPreview.jpg', + name="outputPanoramaPreview", + label="Output Panorama Preview", + description="Preview of the generated panorama in JPG format.", + semantic="image", + value=desc.Node.internalFolder + "panoramaPreview.jpg", uid=[], ), ] diff --git a/meshroom/nodes/aliceVision/PanoramaPrepareImages.py b/meshroom/nodes/aliceVision/PanoramaPrepareImages.py index e738e9c0c8..0c709a4295 100644 --- a/meshroom/nodes/aliceVision/PanoramaPrepareImages.py +++ b/meshroom/nodes/aliceVision/PanoramaPrepareImages.py @@ -16,28 +16,28 @@ class PanoramaPrepareImages(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='Input', - description='SfMData file.', - value='', + name="input", + label="Input", + description="SfMData file.", + 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'], + 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='Output sfmData.', + name="output", + label="SfMData", + description="Output SfMData file.", value=lambda attr: desc.Node.internalFolder + os.path.basename(attr.node.input.value), uid=[], ), diff --git a/meshroom/nodes/aliceVision/PanoramaSeams.py b/meshroom/nodes/aliceVision/PanoramaSeams.py index 27e01369ad..4bc35453c3 100644 --- a/meshroom/nodes/aliceVision/PanoramaSeams.py +++ b/meshroom/nodes/aliceVision/PanoramaSeams.py @@ -19,40 +19,40 @@ class PanoramaSeams(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='Input SfMData', - description="Input SfMData.", - value='', + name="input", + label="Input SfMData", + description="Input SfMData file.", + value="", uid=[0], ), desc.File( - name='warpingFolder', - label='Warping Folder', - description="Panorama Warping results", - value='', + name="warpingFolder", + label="Warping Folder", + description="Panorama warping results.", + value="", uid=[0], ), desc.IntParam( - name='maxWidth', - label='Max Resolution', - description='Maximal resolution for the panorama seams estimation.', + name="maxWidth", + label="Max Resolution", + description="Maximal resolution for the panorama seams estimation.", value=5000, range=(0, 100000, 1), uid=[0], ), desc.BoolParam( - name='useGraphCut', - label='Use Smart Seams', - description='Use a graphcut algorithm to optimize seams for better transitions between images.', + name="useGraphCut", + label="Use Smart Seams", + description="Use a graphcut algorithm to optimize seams for better transitions between images.", value=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'], + 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=[], ) @@ -60,18 +60,18 @@ class PanoramaSeams(desc.AVCommandLineNode): outputs = [ desc.File( - name='output', - label='Labels', - description='', - semantic='image', - value=desc.Node.internalFolder + 'labels.exr', + name="output", + label="Labels", + description="", + semantic="image", + value=desc.Node.internalFolder + "labels.exr", uid=[], ), desc.File( - name='outputSfm', - label='Output SfMData File', - description='Path to the output sfmdata file', - value=desc.Node.internalFolder + 'panorama.sfm', + name="outputSfm", + label="Output SfMData File", + description="Path to the output SfMData file.", + value=desc.Node.internalFolder + "panorama.sfm", uid=[], ) ] diff --git a/meshroom/nodes/aliceVision/PanoramaWarping.py b/meshroom/nodes/aliceVision/PanoramaWarping.py index 2d09e69c86..cc29771d9b 100644 --- a/meshroom/nodes/aliceVision/PanoramaWarping.py +++ b/meshroom/nodes/aliceVision/PanoramaWarping.py @@ -19,80 +19,80 @@ class PanoramaWarping(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='Input', - description="SfM Data File", - value='', + name="input", + label="SfMData", + description="Input SfMData file.", + value="", uid=[0], ), desc.BoolParam( - name='estimateResolution', - label='Estimate Resolution', - description='Estimate output panorama resolution automatically based on the input images resolution.', + name="estimateResolution", + label="Estimate Resolution", + description="Estimate output panorama resolution automatically based on the resolution of input images.", value=True, uid=[0], group=None, # skip group from command line ), desc.IntParam( - name='panoramaWidth', - label='Panorama Width', - description='Choose the output panorama width (in pixels).', + name="panoramaWidth", + label="Panorama Width", + description="Choose the output panorama width (in pixels).", value=10000, range=(0, 50000, 1000), uid=[0], enabled=lambda node: (not node.estimateResolution.value), ), desc.IntParam( - name='percentUpscale', - label='Upscale Ratio', - description='Percentage of upscaled pixels.\n' - '\n' - 'How many percent of the pixels will be upscaled (compared to its original resolution):\n' - ' * 0: all pixels will be downscaled\n' - ' * 50: on average the input resolution is kept (optimal to reduce over/under-sampling)\n' - ' * 100: all pixels will be upscaled\n', + name="percentUpscale", + label="Upscale Ratio", + description="Percentage of upscaled pixels.\n" + "\n" + "How many percent of the pixels will be upscaled (compared to its original resolution):\n" + " - 0: all pixels will be downscaled.\n" + " - 50: on average, the input resolution is kept (optimal to reduce over/under-sampling).\n" + " - 100: all pixels will be upscaled.\n", value=50, range=(0, 100, 1), enabled=lambda node: (node.estimateResolution.value), uid=[0] ), desc.IntParam( - name='maxPanoramaWidth', - label='Max Panorama Width', - description='Choose the maximal output panorama width (in pixels). Zero means no limit.', + name="maxPanoramaWidth", + label="Max Panorama Width", + description="Choose the maximum width for the output panorama (in pixels). 0 means no limit.", value=70000, range=(0, 100000, 1000), uid=[0], enabled=lambda node: (node.estimateResolution.value), ), desc.ChoiceParam( - name='workingColorSpace', - label='Working Color Space', - description='Colorspace in which the panorama warping will be performed.', - value='Linear', - values=['Linear', 'ACES2065-1', 'ACEScg', 'no_conversion'], - exclusive=True, - uid=[0], + name="workingColorSpace", + label="Working Color Space", + description="Colorspace in which the panorama warping will be performed.", + value="Linear", + values=["Linear", "ACES2065-1", "ACEScg", "no_conversion"], + exclusive=True, + uid=[0], ), desc.ChoiceParam( - name='storageDataType', - label='Storage Data Type', - description='Storage image data type:\n' - ' * float: Use full floating point (32 bits per channel)\n' - ' * half: Use half float (16 bits per channel)\n' - ' * halfFinite: Use half float, but clamp values to avoid non-finite values\n' - ' * auto: Use half float if all values can fit, else use full float\n', - value='float', - values=['float', 'half', 'halfFinite', 'auto'], + name="storageDataType", + label="Storage Data Type", + description="Storage image data type:\n" + " - float: Use full floating point (32 bits per channel).\n" + " - half: Use half float (16 bits per channel).\n" + " - halfFinite: Use half float, but clamp values to avoid non-finite values.\n" + " - auto: Use half float if all values can fit, else use full float.", + value="float", + values=["float", "half", "halfFinite", "auto"], exclusive=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'], + 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=[], ), @@ -100,9 +100,9 @@ class PanoramaWarping(desc.AVCommandLineNode): outputs = [ desc.File( - name='output', - label='Folder', - description='', + name="output", + label="Folder", + description="Output folder.", value=desc.Node.internalFolder, uid=[], ), diff --git a/meshroom/nodes/aliceVision/PhotometricStereo.py b/meshroom/nodes/aliceVision/PhotometricStereo.py index 33c753a2ba..047865bc14 100644 --- a/meshroom/nodes/aliceVision/PhotometricStereo.py +++ b/meshroom/nodes/aliceVision/PhotometricStereo.py @@ -12,71 +12,71 @@ class PhotometricStereo(desc.CommandLineNode): inputs = [ desc.File( - name='inputPath', - label='SfMData', - description='Input file. Could be an SfMData file or folder containing images.', - value='', + name="inputPath", + label="SfMData", + description="Input SfMData file.", + value="", uid=[0] ), desc.File( - name='pathToJSONLightFile', - label='Light File', - description='Path to a JSON file containing the lighting information.\n' - 'If empty, .txt files are expected in the image folder.', - value='defaultJSON.txt', + name="pathToJSONLightFile", + label="Light File", + description="Path to a JSON file containing the lighting information.\n" + "If empty, .txt files are expected in the image folder.", + value="defaultJSON.txt", uid=[0] ), desc.File( - name='maskPath', - label='Mask Folder Path', - description='Path to a folder containing masks or to a mask directly.', - value='', + name="maskPath", + label="Mask Folder Path", + description="Path to a folder containing masks or to a mask directly.", + value="", 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', + 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.', + 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.', + 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.', + 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'], + 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=[], ) @@ -84,64 +84,64 @@ class PhotometricStereo(desc.CommandLineNode): outputs = [ desc.File( - name='outputPath', - label='Output Folder', - description='Path to the output folder', + name="outputPath", + label="Output Folder", + description="Path to the output folder.", value=desc.Node.internalFolder, uid=[], ), desc.File( - name='outputSfmData', - label='SfMData', - description='Output path for the Sfm', - value=desc.Node.internalFolder + '/sfmData.sfm', + name="outputSfmData", + label="SfMData", + description="Output path for the SfMData file.", + value=desc.Node.internalFolder + "/sfmData.sfm", uid=[], - group='', # remove from command line + group="", # remove from command line ), desc.File( - name='outputSfmDataAlbedo', - label='SfMData Albedo', - description='', - value=desc.Node.internalFolder + '/albedoMaps.sfm', + name="outputSfmDataAlbedo", + label="SfMData Albedo", + description="Output SfMData file containing the albedo information.", + value=desc.Node.internalFolder + "/albedoMaps.sfm", uid=[], - group='', # remove from command line + group="", # remove from command line ), desc.File( - name='outputSfmDataNormal', - label='SfMData Normal', - description='', - value=desc.Node.internalFolder + '/normalMaps.sfm', + name="outputSfmDataNormal", + label="SfMData Normal", + description="Output SfMData file containing the normal maps information.", + value=desc.Node.internalFolder + "/normalMaps.sfm", uid=[], - group='', # remove from command line + group="", # remove from command line ), # these attributes are only here to describe more accurately the output of the node # by specifying that it generates 2 sequences of images # (see in Viewer2D.qml how these attributes can be used) desc.File( - name='normals', - label='Normal Maps Camera', - description='Generated normal maps in the camera coordinate system.', - semantic='image', - value=desc.Node.internalFolder + '_normals.exr', + name="normals", + label="Normal Maps Camera", + description="Generated normal maps in the camera coordinate system.", + semantic="image", + value=desc.Node.internalFolder + "_normals.exr", 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 + '_normals_w.exr', + name="normalsWorld", + label="Normal Maps World", + description="Generated normal maps in the world coordinate system.", + semantic="image", + value=desc.Node.internalFolder + "_normals_w.exr", uid=[], - group='', # do not export on the command line + group="", # do not export on the command line ), desc.File( - name='albedo', - label='Albedo Maps', - description='Generated albedo maps.', - semantic='image', - value=desc.Node.internalFolder + '_albedo.exr', + name="albedo", + label="Albedo Maps", + description="Generated albedo maps.", + semantic="image", + value=desc.Node.internalFolder + "_albedo.exr", uid=[], - group='', # do not export on the command line + group="", # do not export on the command line ), ] diff --git a/meshroom/nodes/aliceVision/PrepareDenseScene.py b/meshroom/nodes/aliceVision/PrepareDenseScene.py index eb511533c9..a1e1a7c0ca 100644 --- a/meshroom/nodes/aliceVision/PrepareDenseScene.py +++ b/meshroom/nodes/aliceVision/PrepareDenseScene.py @@ -16,10 +16,10 @@ class PrepareDenseScene(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='SfMData', - description='''SfMData file.''', - value='', + name="input", + label="SfMData", + description="Input SfMData file.", + value="", uid=[0], ), desc.ListAttribute( @@ -32,7 +32,7 @@ class PrepareDenseScene(desc.AVCommandLineNode): ), name="imagesFolders", label="Images Folders", - description='Use images from specific folder(s). Filename should be the same or the image uid.', + description="Use images from specific folder(s). Filename should be the same or the image UID.", ), desc.ListAttribute( elementDesc=desc.File( @@ -44,48 +44,48 @@ class PrepareDenseScene(desc.AVCommandLineNode): ), name="masksFolders", label="Masks Folders", - description='Use masks from specific folder(s). Filename should be the same or the image uid.', + description="Use masks from specific folder(s). Filename should be the same or the image UID.", ), desc.ChoiceParam( - name='outputFileType', - label='Output File Type', - description='Output file type for the undistorted images.', - value='exr', - values=['jpg', 'png', 'tif', 'exr'], + name="outputFileType", + label="Output File Type", + description="Output file type for the undistorted images.", + value="exr", + values=["jpg", "png", "tif", "exr"], exclusive=True, uid=[0], advanced=True ), desc.BoolParam( - name='saveMetadata', - label='Save Metadata', - description='Save projections and intrinsics information in images metadata (only for .exr images).', + name="saveMetadata", + label="Save Metadata", + description="Save projections and intrinsics information in images metadata (only for .exr images).", value=True, uid=[0], advanced=True ), desc.BoolParam( - name='saveMatricesTxtFiles', - label='Save Matrices Text Files', - description='Save projections and intrinsics information in text files.', + name="saveMatricesTxtFiles", + label="Save Matrices Text Files", + description="Save projections and intrinsics information in text files.", value=False, uid=[0], advanced=True ), desc.BoolParam( - name='evCorrection', - label='Correct images exposure', - description='Apply a correction on images Exposure Value', + name="evCorrection", + label="Correct Images Exposure", + description="Apply a correction on images' exposure value.", value=False, uid=[0], advanced=True ), 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=[], ), @@ -93,20 +93,20 @@ class PrepareDenseScene(desc.AVCommandLineNode): outputs = [ desc.File( - name='output', - label='Images Folder', - description='''Output folder.''', + name="output", + label="Images Folder", + description="Output folder.", value=desc.Node.internalFolder, uid=[], ), desc.File( - name='undistorted', - label='Undistorted Images', - description='List of undistorted images.', - semantic='image', - value=desc.Node.internalFolder + '.{outputFileTypeValue}', + name="undistorted", + label="Undistorted Images", + description="List of undistorted images.", + semantic="image", + value=desc.Node.internalFolder + ".{outputFileTypeValue}", uid=[], - group='', + group="", advanced=True - ), + ), ] diff --git a/meshroom/nodes/aliceVision/Publish.py b/meshroom/nodes/aliceVision/Publish.py index dd65306783..9ec86f5e15 100644 --- a/meshroom/nodes/aliceVision/Publish.py +++ b/meshroom/nodes/aliceVision/Publish.py @@ -39,15 +39,15 @@ class Publish(desc.Node): uid=[0], ), desc.ChoiceParam( - name='verboseLevel', - label='Verbose Level', - description='''verbosity level (critical, error, warning, info, debug).''', - value='info', - values=['critical', 'error', 'warning', 'info', 'debug'], + 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=[], - ), - ] + ), + ] def resolvedPaths(self, inputFiles, outDir): paths = {} From c498f48e1e1d9e403e89d015ce1455525ea9222e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= Date: Fri, 16 Jun 2023 10:32:01 +0200 Subject: [PATCH 5/5] [nodes] S-T: Harmonize and improve labels and descriptions Use CamelCase for all labels, always end descriptions with periods, and replace the mixed use of single and double quotes with double quotes only. --- meshroom/nodes/aliceVision/SfMAlignment.py | 106 ++++--- meshroom/nodes/aliceVision/SfMDistances.py | 67 ++-- meshroom/nodes/aliceVision/SfMTransfer.py | 101 +++--- meshroom/nodes/aliceVision/SfMTransform.py | 138 ++++---- .../nodes/aliceVision/SfMTriangulation.py | 117 +++---- meshroom/nodes/aliceVision/SketchfabUpload.py | 134 ++++---- meshroom/nodes/aliceVision/SphereDetection.py | 48 +-- meshroom/nodes/aliceVision/Split360Images.py | 102 +++--- .../nodes/aliceVision/StructureFromMotion.py | 286 ++++++++--------- meshroom/nodes/aliceVision/Texturing.py | 298 +++++++++--------- meshroom/nodes/aliceVision/TracksBuilding.py | 64 ++-- meshroom/nodes/blender/ScenePreview.py | 114 +++---- 12 files changed, 798 insertions(+), 777 deletions(-) diff --git a/meshroom/nodes/aliceVision/SfMAlignment.py b/meshroom/nodes/aliceVision/SfMAlignment.py index f834e636b7..1ea6be1580 100644 --- a/meshroom/nodes/aliceVision/SfMAlignment.py +++ b/meshroom/nodes/aliceVision/SfMAlignment.py @@ -24,43 +24,46 @@ class SfMAlignment(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='Input', - description='''SfMData file .''', - value='', + name="input", + label="Input", + description="Input SfMData file .", + value="", uid=[0], ), desc.File( - name='reference', - label='Reference', - description='''Path to the scene used as the reference coordinate system.''', - value='', + name="reference", + label="Reference", + description="Path to the scene used as the reference coordinate system.", + value="", uid=[0], ), desc.ChoiceParam( - name='method', - label='Alignment Method', - description="Alignment Method:\n" - " * from_cameras_viewid: Align cameras with same view Id\n" - " * from_cameras_poseid: Align cameras with same pose Id\n" - " * from_cameras_filepath: Align cameras with a filepath matching, using 'fileMatchingPattern'\n" - " * from_cameras_metadata: Align cameras with matching metadata, using 'metadataMatchingList'\n" - " * from_markers: Align from markers with the same Id\n", - value='from_cameras_viewid', - values=['from_cameras_viewid', 'from_cameras_poseid', 'from_cameras_filepath', 'from_cameras_metadata', 'from_markers'], + name="method", + label="Alignment Method", + description="Alignment method:\n" + " - from_cameras_viewid: Align cameras with same view ID.\n" + " - from_cameras_poseid: Align cameras with same pose ID.\n" + " - from_cameras_filepath: Align cameras with a filepath matching, using 'fileMatchingPattern'.\n" + " - from_cameras_metadata: Align cameras with matching metadata, using 'metadataMatchingList'.\n" + " - from_markers: Align from markers with the same ID.\n", + value="from_cameras_viewid", + values=["from_cameras_viewid", "from_cameras_poseid", "from_cameras_filepath", "from_cameras_metadata", "from_markers"], exclusive=True, uid=[0], ), desc.StringParam( - name='fileMatchingPattern', - label='File Matching Pattern', - description='Matching regular expression for the "from_cameras_filepath" method. ' - 'You should capture specific parts of the filepath with parenthesis to define matching elements.\n' - 'Some examples of patterns:\n' - r' - Match the filename without extension (default value): ".*\/(.*?)\.\w{3}"' + '\n' + - r' - Match the filename suffix after "_": ".*\/.*(_.*?\.\w{3})"' + '\n' + - r' - Match the filename prefix before "_": ".*\/(.*?)_.*\.\w{3}"', - value=r'.*\/(.*?)\.\w{3}', + name="fileMatchingPattern", + label="File Matching Pattern", + description="Matching regular expression for the 'from_cameras_filepath' method.\n" + "You should capture specific parts of the filepath with parentheses to define matching elements.\n" + "Some examples of patterns:\n" + " - Match the filename without extension (default value): " + r'".*\/(.*?)\.\w{3}"' + "\n" + " - Match the filename suffix after '_': " + r'".*\/.*(_.*?\.\w{3})"' + "\n" + " - Match the filename prefix before '_': " + r'".*\/(.*?)_.*\.\w{3}"', + value=r".*\/(.*?)\.\w{3}", uid=[0], ), desc.ListAttribute( @@ -68,40 +71,41 @@ class SfMAlignment(desc.AVCommandLineNode): name="metadataMatching", label="Metadata", description="", - value="", + value="Metadata that should match to create the correspondences.", uid=[0], ), name="metadataMatchingList", label="Metadata Matching List", - description='List of metadata that should match to create the correspondences. If the list is empty, the default value will be used: ["Make", "Model", "Exif:BodySerialNumber", "Exif:LensSerialNumber"].', + description="List of metadata that should match to create the correspondences.\n" + "If the list is empty, the default value will be used: ['Make', 'Model', 'Exif:BodySerialNumber', 'Exif:LensSerialNumber'].", ), desc.BoolParam( - name='applyScale', - label='Scale', - description='Apply scale transformation.', + name="applyScale", + label="Scale", + description="Apply scale transformation.", value=True, uid=[0] ), desc.BoolParam( - name='applyRotation', - label='Rotation', - description='Apply rotation transformation.', + name="applyRotation", + label="Rotation", + description="Apply rotation transformation.", value=True, uid=[0] ), desc.BoolParam( - name='applyTranslation', - label='Translation', - description='Apply translation transformation.', + name="applyTranslation", + label="Translation", + description="Apply translation transformation.", value=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'], + 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=[], ), @@ -109,17 +113,17 @@ class SfMAlignment(desc.AVCommandLineNode): outputs = [ desc.File( - name='output', - label='SfMData File', - description='SfMData file.', - value=lambda attr: desc.Node.internalFolder + (os.path.splitext(os.path.basename(attr.node.input.value))[0] or 'sfmData') + '.abc', + name="output", + label="SfMData File", + description="Output SfMData file.", + value=lambda attr: desc.Node.internalFolder + (os.path.splitext(os.path.basename(attr.node.input.value))[0] or "sfmData") + ".abc", uid=[], ), desc.File( - name='outputViewsAndPoses', - label='Poses', - description='''Path to the output sfmdata file with cameras (views and poses).''', - value=desc.Node.internalFolder + 'cameras.sfm', + name="outputViewsAndPoses", + label="Poses", + description="Path to the output SfMData file with cameras (views and poses).", + value=desc.Node.internalFolder + "cameras.sfm", uid=[], ), ] diff --git a/meshroom/nodes/aliceVision/SfMDistances.py b/meshroom/nodes/aliceVision/SfMDistances.py index 433c7a8d1d..b0fc9760c3 100644 --- a/meshroom/nodes/aliceVision/SfMDistances.py +++ b/meshroom/nodes/aliceVision/SfMDistances.py @@ -7,57 +7,60 @@ class SfMDistances(desc.AVCommandLineNode): commandLine = 'aliceVision_sfmDistances {allParams}' size = desc.DynamicNodeSize('input') + documentation = ''' + ''' + inputs = [ desc.File( - name='input', - label='Input', - description='''SfMData file.''', - value='', + name="input", + label="Input", + description="SfMData file.", + value="", uid=[0], ), desc.ChoiceParam( - name='objectType', - label='Type', - description='', - value='landmarks', - values=['landmarks', 'cameras'], + name="objectType", + label="Type", + description="", + value="landmarks", + values=["landmarks", "cameras"], exclusive=True, uid=[0], ), desc.ChoiceParam( - name='landmarksDescriberTypes', - label='Describer Types', - description='Describer types used to describe an image (only used when using "landmarks").', - value=['cctag3'], - values=['sift', 'sift_float', 'sift_upright', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv'], + name="landmarksDescriberTypes", + label="Describer Types", + description="Describer types used to describe an image (only used when using 'landmarks').", + value=["cctag3"], + values=["sift", "sift_float", "sift_upright", "akaze", "akaze_liop", "akaze_mldb", "cctag3", "cctag4", "sift_ocv", "akaze_ocv"], exclusive=False, uid=[0], - joinChar=',', + joinChar=",", ), desc.StringParam( - name='A', - label='A IDs', - description='It will display the distances between A and B elements.\n' - 'This value should be an ID or a list of IDs of landmarks IDs or cameras (UID or filename without extension).\n' - 'It will list all elements if empty.', - value='', + name="A", + label="A IDs", + description="It will display the distances between A and B elements.\n" + "This value should be an ID or a list of IDs of landmarks IDs or cameras (UID or filename without extension).\n" + "It will list all elements if empty.", + value="", uid=[0], ), desc.StringParam( - name='B', - label='B IDs', - description='It will display the distances between A and B elements.\n' - 'This value should be an ID or a list of IDs of landmarks IDs or cameras (UID or filename without extension).\n' - 'It will list all elements if empty.', - value='', + name="B", + label="B IDs", + description="It will display the distances between A and B elements.\n" + "This value should be an ID or a list of IDs of landmarks IDs or cameras (UID or filename without extension).\n" + "It will list all elements if empty.", + 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'], + 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=[], ), diff --git a/meshroom/nodes/aliceVision/SfMTransfer.py b/meshroom/nodes/aliceVision/SfMTransfer.py index c88dee13d7..4a68045100 100644 --- a/meshroom/nodes/aliceVision/SfMTransfer.py +++ b/meshroom/nodes/aliceVision/SfMTransfer.py @@ -16,41 +16,44 @@ class SfMTransfer(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='Input', - description='''SfMData file .''', - value='', + name="input", + label="Input", + description="SfMData file.", + value="", uid=[0], ), desc.File( - name='reference', - label='Reference', - description='''Path to the scene used as the reference to retrieve resolved poses and intrinsics.''', - value='', + name="reference", + label="Reference", + description="Path to the scene used as the reference to retrieve resolved poses and intrinsics.", + value="", uid=[0], ), desc.ChoiceParam( - name='method', - label='Matching Method', + name="method", + label="Matching Method", description="Matching Method:\n" - " * from_viewid: Align cameras with same view Id\n" - " * from_filepath: Align cameras with a filepath matching, using 'fileMatchingPattern'\n" - " * from_metadata: Align cameras with matching metadata, using 'metadataMatchingList'\n" - " * from_intrinsicid: Copy intrinsics parameters\n", - value='from_viewid', - values=['from_viewid', 'from_filepath', 'from_metadata', 'from_intrinsicid'], + " - from_viewid: Align cameras with same view ID.\n" + " - from_filepath: Align cameras with a filepath matching, using 'fileMatchingPattern'.\n" + " - from_metadata: Align cameras with matching metadata, using 'metadataMatchingList'.\n" + " - from_intrinsicid: Copy intrinsics parameters.\n", + value="from_viewid", + values=["from_viewid", "from_filepath", "from_metadata", "from_intrinsicid"], exclusive=True, uid=[0], ), desc.StringParam( - name='fileMatchingPattern', - label='File Matching Pattern', - description='Matching regular expression for the "from_cameras_filepath" method. ' - 'You should capture specific parts of the filepath with parenthesis to define matching elements.\n' - 'Some examples of patterns:\n' - r' - Match the filename without extension (default value): ".*\/(.*?)\.\w{3}"' + '\n' + - r' - Match the filename suffix after "_": ".*\/.*(_.*?\.\w{3})"' + '\n' + - r' - Match the filename prefix before "_": ".*\/(.*?)_.*\.\w{3}"', + name="fileMatchingPattern", + label="File Matching Pattern", + description="Matching regular expression for the 'from_cameras_filepath' method.\n" + "You should capture specific parts of the filepath with parentheses to define matching elements.\n" + "Some examples of patterns:\n" + " - Match the filename without extension (default value): " + r'".*\/(.*?)\.\w{3}"' + "\n" + " - Match the filename suffix after \"_\": " + r'".*\/.*(_.*?\.\w{3})"' + "\n" + " - Match the filename prefix before \"_\": " + r'".*\/(.*?)_.*\.\w{3}"', value=r'.*\/(.*?)\.\w{3}', uid=[0], ), @@ -58,41 +61,43 @@ class SfMTransfer(desc.AVCommandLineNode): elementDesc=desc.File( name="metadataMatching", label="Metadata", - description="", + description="Metadata that should match to create correspondences.", value="", uid=[0], ), name="metadataMatchingList", label="Metadata Matching List", - description='List of metadata that should match to create the correspondences. If the list is empty, the default value will be used: ["Make", "Model", "Exif:BodySerialNumber", "Exif:LensSerialNumber"].', + description="List of metadata that should match to create the correspondences.\n" + "If the list is empty, the default value will be used:\n" + "['Make', 'Model', 'Exif:BodySerialNumber', 'Exif:LensSerialNumber'].", ), desc.BoolParam( - name='transferPoses', - label='Poses', - description='Transfer poses.', + name="transferPoses", + label="Poses", + description="Transfer poses.", value=True, uid=[0] ), desc.BoolParam( - name='transferIntrinsics', - label='Intrinsics', - description='Transfer cameras intrinsics.', + name="transferIntrinsics", + label="Intrinsics", + description="Transfer cameras intrinsics.", value=True, uid=[0] ), desc.BoolParam( - name='transferLandmarks', - label='Landmarks', - description='Transfer landmarks.', + name="transferLandmarks", + label="Landmarks", + description="Transfer landmarks.", value=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'], + 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=[], ), @@ -100,17 +105,17 @@ class SfMTransfer(desc.AVCommandLineNode): outputs = [ desc.File( - name='output', - label='SfMData File', - description='SfMData file.', - value=lambda attr: desc.Node.internalFolder + (os.path.splitext(os.path.basename(attr.node.input.value))[0] or 'sfmData') + '.abc', + name="output", + label="SfMData", + description="Path to the output SfM point cloud file (in SfMData format).", + value=lambda attr: desc.Node.internalFolder + (os.path.splitext(os.path.basename(attr.node.input.value))[0] or "sfmData") + ".abc", uid=[], ), desc.File( - name='outputViewsAndPoses', - label='Poses', - description='''Path to the output sfmdata file with cameras (views and poses).''', - value=desc.Node.internalFolder + 'cameras.sfm', + name="outputViewsAndPoses", + label="Poses", + description="Path to the output SfMData file with cameras (views and poses).", + value=desc.Node.internalFolder + "cameras.sfm", uid=[], ), ] diff --git a/meshroom/nodes/aliceVision/SfMTransform.py b/meshroom/nodes/aliceVision/SfMTransform.py index a15d93d294..b179583242 100644 --- a/meshroom/nodes/aliceVision/SfMTransform.py +++ b/meshroom/nodes/aliceVision/SfMTransform.py @@ -26,39 +26,39 @@ class SfMTransform(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='Input', - description='''SfMData file .''', - value='', + name="input", + label="Input", + description="SfMData file.", + value="", uid=[0], ), desc.ChoiceParam( - name='method', - label='Transformation Method', + name="method", + label="Transformation Method", description="Transformation method:\n" - " * transformation: Apply a given transformation.\n" - " * manual: Apply the gizmo transformation (show the transformed input).\n" - " * auto: Determines scene orientation from the cameras' X axis, determines north and scale from GPS information if available, and defines ground level from the point cloud.\n" - " * auto_from_cameras: Defines coordinate system from cameras.\n" - " * auto_from_cameras_x_axis: Determines scene orientation from the cameras' X axis.\n" - " * auto_from_landmarks: Defines coordinate system from landmarks.\n" - " * from_single_camera: Defines the coordinate system from the camera specified by --tranformation.\n" - " * from_center_camera: Defines the coordinate system from the camera closest to the center of the reconstruction.\n" - " * from_markers: Defines the coordinate system from markers specified by --markers.\n" - " * from_gps: Defines coordinate system from GPS metadata.\n" - " * align_ground: Defines ground level from the point cloud density. It assumes that the scene is oriented.", - value='auto', - values=['transformation', 'manual', 'auto', 'auto_from_cameras', 'auto_from_cameras_x_axis', 'auto_from_landmarks', 'from_single_camera', 'from_center_camera', 'from_markers', 'from_gps', 'align_ground'], + " - transformation: Apply a given transformation.\n" + " - manual: Apply the gizmo transformation (show the transformed input).\n" + " - auto: Determines scene orientation from the cameras' X axis, determines north and scale from GPS information if available, and defines ground level from the point cloud.\n" + " - auto_from_cameras: Defines coordinate system from cameras.\n" + " - auto_from_cameras_x_axis: Determines scene orientation from the cameras' X axis.\n" + " - auto_from_landmarks: Defines coordinate system from landmarks.\n" + " - from_single_camera: Defines the coordinate system from the camera specified by --tranformation.\n" + " - from_center_camera: Defines the coordinate system from the camera closest to the center of the reconstruction.\n" + " - from_markers: Defines the coordinate system from markers specified by --markers.\n" + " - from_gps: Defines coordinate system from GPS metadata.\n" + " - align_ground: Defines ground level from the point cloud density. It assumes that the scene is oriented.", + value="auto", + values=["transformation", "manual", "auto", "auto_from_cameras", "auto_from_cameras_x_axis", "auto_from_landmarks", "from_single_camera", "from_center_camera", "from_markers", "from_gps", "align_ground"], exclusive=True, uid=[0], ), desc.StringParam( - name='transformation', - label='Transformation', + name="transformation", + label="Transformation", description="Required only for 'transformation' and 'from_single_camera' methods:\n" - " * transformation: Align [X,Y,Z] to +Y-axis, rotate around Y by R deg, scale by S; syntax: X,Y,Z;R;S\n" - " * from_single_camera: Camera UID or simplified regular expression to match image filepath (like '*camera2*.jpg')", - value='', + " - transformation: Align [X,Y,Z] to +Y-axis, rotate around Y by R deg, scale by S; syntax: X,Y,Z;R;S\n" + " - from_single_camera: Camera UID or simplified regular expression to match image filepath (like '*camera2*.jpg').", + value="", uid=[0], enabled=lambda node: node.method.value == "transformation" or node.method.value == "from_single_camera" or node.method.value == "auto_from_cameras_x_axis", ), @@ -73,19 +73,19 @@ class SfMTransform(desc.AVCommandLineNode): description="Translation in space.", groupDesc=[ desc.FloatParam( - name="x", label="x", description="X Offset", + name="x", label="x", description="X offset.", value=0.0, uid=[0], range=(-20.0, 20.0, 0.01) ), desc.FloatParam( - name="y", label="y", description="Y Offset", + name="y", label="y", description="Y offset.", value=0.0, uid=[0], range=(-20.0, 20.0, 0.01) ), desc.FloatParam( - name="z", label="z", description="Z Offset", + name="z", label="z", description="Z offset.", value=0.0, uid=[0], range=(-20.0, 20.0, 0.01) @@ -96,22 +96,22 @@ class SfMTransform(desc.AVCommandLineNode): desc.GroupAttribute( name="manualRotation", label="Euler Rotation", - description="Rotation in Euler degrees.", + description="Rotation in Euler angles.", groupDesc=[ desc.FloatParam( - name="x", label="x", description="Euler X Rotation", + name="x", label="x", description="Euler X rotation.", value=0.0, uid=[0], range=(-90.0, 90.0, 1.0) ), desc.FloatParam( - name="y", label="y", description="Euler Y Rotation", + name="y", label="y", description="Euler Y rotation.", value=0.0, uid=[0], range=(-180.0, 180.0, 1.0) ), desc.FloatParam( - name="z", label="z", description="Euler Z Rotation", + name="z", label="z", description="Euler Z rotation.", value=0.0, uid=[0], range=(-180.0, 180.0, 1.0) @@ -122,7 +122,7 @@ class SfMTransform(desc.AVCommandLineNode): desc.FloatParam( name="manualScale", label="Scale", - description="Uniform Scale.", + description="Uniform scale.", value=1.0, uid=[0], range=(0.0, 20.0, 0.01) @@ -132,19 +132,19 @@ class SfMTransform(desc.AVCommandLineNode): enabled=lambda node: node.method.value == "manual", ), desc.ChoiceParam( - name='landmarksDescriberTypes', - label='Landmarks Describer Types', - description='Image describer types used to compute the mean of the point cloud. (only for "landmarks" method).', - value=['sift', 'dspsift', 'akaze'], - values=['sift', 'sift_float', 'sift_upright', 'dspsift', 'akaze', 'akaze_liop', 'akaze_mldb', 'cctag3', 'cctag4', 'sift_ocv', 'akaze_ocv', 'tag16h5', 'unknown'], + name="landmarksDescriberTypes", + label="Landmarks Describer Types", + description="Image describer types used to compute the mean of the point cloud (only for 'landmarks' method).", + value=["sift", "dspsift", "akaze"], + values=["sift", "sift_float", "sift_upright", "dspsift", "akaze", "akaze_liop", "akaze_mldb", "cctag3", "cctag4", "sift_ocv", "akaze_ocv", "tag16h5", "unknown"], exclusive=False, uid=[0], - joinChar=',', + joinChar=",", ), desc.FloatParam( - name='scale', - label='Additional Scale', - description='Additional scale to apply.', + name="scale", + label="Additional Scale", + description="Additional scale to apply.", value=1.0, range=(0.0, 100.0, 0.1), uid=[0], @@ -152,46 +152,46 @@ class SfMTransform(desc.AVCommandLineNode): desc.ListAttribute( name="markers", elementDesc=desc.GroupAttribute(name="markerAlign", label="Marker Align", description="", joinChar=":", groupDesc=[ - desc.IntParam(name="markerId", label="Marker", description="Marker Id", value=0, uid=[0], range=(0, 32, 1)), - desc.GroupAttribute(name="markerCoord", label="Coord", description="", joinChar=",", groupDesc=[ - desc.FloatParam(name="x", label="x", description="", value=0.0, uid=[0], range=(-2.0, 2.0, 1.0)), - desc.FloatParam(name="y", label="y", description="", value=0.0, uid=[0], range=(-2.0, 2.0, 1.0)), - desc.FloatParam(name="z", label="z", description="", value=0.0, uid=[0], range=(-2.0, 2.0, 1.0)), + desc.IntParam(name="markerId", label="Marker", description="Marker ID.", value=0, uid=[0], range=(0, 32, 1)), + desc.GroupAttribute(name="markerCoord", label="Coord", description="Marker coordinates.", joinChar=",", groupDesc=[ + desc.FloatParam(name="x", label="x", description="X coordinates for the marker.", value=0.0, uid=[0], range=(-2.0, 2.0, 1.0)), + desc.FloatParam(name="y", label="y", description="Y coordinates for the marker.", value=0.0, uid=[0], range=(-2.0, 2.0, 1.0)), + desc.FloatParam(name="z", label="z", description="Z coordinates for the marker.", value=0.0, uid=[0], range=(-2.0, 2.0, 1.0)), ]) ]), label="Markers", - description="Markers alignment points", + description="Markers alignment points.", ), desc.BoolParam( - name='applyScale', - label='Scale', - description='Apply scale transformation.', + name="applyScale", + label="Scale", + description="Apply scale transformation.", value=True, uid=[0], enabled=lambda node: node.method.value != "manual", ), desc.BoolParam( - name='applyRotation', - label='Rotation', - description='Apply rotation transformation.', + name="applyRotation", + label="Rotation", + description="Apply rotation transformation.", value=True, uid=[0], enabled=lambda node: node.method.value != "manual", ), desc.BoolParam( - name='applyTranslation', - label='Translation', - description='Apply translation transformation.', + name="applyTranslation", + label="Translation", + description="Apply translation transformation.", value=True, uid=[0], enabled=lambda node: node.method.value != "manual", ), 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=[], ), @@ -199,17 +199,17 @@ class SfMTransform(desc.AVCommandLineNode): outputs = [ desc.File( - name='output', - label='SfMData File', - description='''Aligned SfMData file .''', - value=lambda attr: desc.Node.internalFolder + (os.path.splitext(os.path.basename(attr.node.input.value))[0] or 'sfmData') + '.abc', + name="output", + label="SfMData File", + description="Aligned SfMData file.", + value=lambda attr: desc.Node.internalFolder + (os.path.splitext(os.path.basename(attr.node.input.value))[0] or "sfmData") + ".abc", uid=[], ), desc.File( - name='outputViewsAndPoses', - label='Poses', - description='''Path to the output sfmdata file with cameras (views and poses).''', - value=desc.Node.internalFolder + 'cameras.sfm', + name="outputViewsAndPoses", + label="Poses", + description="Path to the output SfMData file with cameras (views and poses).", + value=desc.Node.internalFolder + "cameras.sfm", uid=[], ), ] diff --git a/meshroom/nodes/aliceVision/SfMTriangulation.py b/meshroom/nodes/aliceVision/SfMTriangulation.py index aad874bc82..d2d877f7ec 100644 --- a/meshroom/nodes/aliceVision/SfMTriangulation.py +++ b/meshroom/nodes/aliceVision/SfMTriangulation.py @@ -15,17 +15,17 @@ class SfMTriangulation(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='SfMData', - description='SfMData file. Must contain the camera calibration.', - value='', + name="input", + label="SfMData", + description="SfMData file. Must contain the camera calibration.", + value="", uid=[0], ), desc.ListAttribute( elementDesc=desc.File( name="featuresFolder", label="Features Folder", - description="", + description="Folder containing some extracted features and descriptors.", value="", uid=[0], ), @@ -37,7 +37,7 @@ class SfMTriangulation(desc.AVCommandLineNode): elementDesc=desc.File( name="matchesFolder", label="Matches Folder", - description="", + description="Folder in which some computed matches are stored.", value="", uid=[0], ), @@ -46,104 +46,105 @@ class SfMTriangulation(desc.AVCommandLineNode): description="Folder(s) in which computed matches are stored." ), 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.IntParam( - name='maxNumberOfMatches', - label='Maximum Number of Matches', - description='Maximum number of matches per image pair (and per feature type). \n' - 'This can be useful to have a quick reconstruction overview. \n' - '0 means no limit.', + name="maxNumberOfMatches", + label="Maximum Number Of Matches", + description="Maximum number of matches per image pair (and per feature type).\n" + "This can be useful to have a quick reconstruction overview.\n" + "0 means no limit.", value=0, range=(0, 50000, 1), uid=[0], ), desc.IntParam( - name='minNumberOfMatches', - label='Minimum Number of Matches', - description='Minimum number of matches per image pair (and per feature type). \n' - 'This can be useful to have a meaningful reconstruction with accurate keypoints. 0 means no limit.', + name="minNumberOfMatches", + label="Minimum Number Of Matches", + description="Minimum number of matches per image pair (and per feature type).\n" + "This can be useful to have a meaningful reconstruction with accurate keypoints.\n" + "0 means no limit.", value=0, range=(0, 50000, 1), uid=[0], ), desc.IntParam( - name='minNumberOfObservationsForTriangulation', - label='Min Observation For Triangulation', - description='Minimum number of observations to triangulate a point.\n' - 'Set it to 3 (or more) reduces drastically the noise in the point cloud,\n' - 'but the number of final poses is a little bit reduced\n' - '(from 1.5% to 11% on the tested datasets).', + name="minNumberOfObservationsForTriangulation", + label="Min Observations For Triangulation", + description="Minimum number of observations to triangulate a point.\n" + "Setting it to 3 (or more) reduces drastically the noise in the point cloud,\n" + "but the number of final poses is a little bit reduced\n" + "(from 1.5% to 11% on the tested datasets).", value=2, range=(2, 10, 1), uid=[0], advanced=True, ), desc.FloatParam( - name='minAngleForTriangulation', - label='Min Angle For Triangulation', - description='Minimum angle for triangulation.', + name="minAngleForTriangulation", + label="Min Angle For Triangulation", + description="Minimum angle for triangulation.", value=3.0, range=(0.1, 10.0, 0.1), uid=[0], advanced=True, ), desc.FloatParam( - name='minAngleForLandmark', - label='Min Angle For Landmark', - description='Minimum angle for landmark.', + name="minAngleForLandmark", + label="Min Angle For Landmark", + description="Minimum angle for landmark.", value=2.0, range=(0.1, 10.0, 0.1), uid=[0], advanced=True, ), desc.BoolParam( - name='useRigConstraint', - label='Use Rig Constraint', - description='Enable/Disable rig constraint.', + name="useRigConstraint", + label="Use Rig Constraint", + description="Enable/Disable rig constraint.", value=True, uid=[0], advanced=True, ), desc.IntParam( - name='rigMinNbCamerasForCalibration', - label='Min Nb Cameras For Rig Calibration', - description='Minimal number of cameras to start the calibration of the rig', + name="rigMinNbCamerasForCalibration", + label="Min Nb Cameras For Rig Calibration", + description="Minimum number of cameras to start the calibration of the rig.", value=20, range=(1, 50, 1), uid=[0], advanced=True, ), desc.BoolParam( - name='computeStructureColor', - label='Compute Structure Color', - description='Enable/Disable color computation of each 3D point.', + name="computeStructureColor", + label="Compute Structure Color", + description="Enable/Disable color computation of each 3D point.", value=True, uid=[0], ), desc.ChoiceParam( - name='interFileExtension', + name="interFileExtension", label='Inter File Extension', - description='Extension of the intermediate file export.', - value='.abc', - values=('.abc', '.ply'), + description="Extension of the intermediate file export.", + value=".abc", + values=(".abc", ".ply"), exclusive=True, uid=[], advanced=True, ), 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=[], ) @@ -151,16 +152,16 @@ class SfMTriangulation(desc.AVCommandLineNode): outputs = [ desc.File( - name='output', - label='SfMData', - description='Path to the output sfmdata file', - value=desc.Node.internalFolder + 'sfm.abc', + name="output", + label="SfMData", + description="Path to the output SfMData file.", + value=desc.Node.internalFolder + "sfm.abc", uid=[], ), desc.File( - name='extraInfoFolder', - label='Folder', - description='Folder for intermediate reconstruction files and additional reconstruction information files.', + name="extraInfoFolder", + label="Folder", + description="Folder for intermediate reconstruction files and additional reconstruction information files.", value=desc.Node.internalFolder, uid=[], ), diff --git a/meshroom/nodes/aliceVision/SketchfabUpload.py b/meshroom/nodes/aliceVision/SketchfabUpload.py index 69d75aa26b..670e88019b 100644 --- a/meshroom/nodes/aliceVision/SketchfabUpload.py +++ b/meshroom/nodes/aliceVision/SketchfabUpload.py @@ -72,46 +72,46 @@ class SketchfabUpload(desc.Node): group="", ), desc.StringParam( - name='apiToken', - label='API Token', - description='Get your token from https://sketchfab.com/settings/password', - value='', + name="apiToken", + label="API Token", + description="Get your token from https://sketchfab.com/settings/password.", + value="", uid=[0], ), desc.StringParam( - name='title', - label='Title', - description='Title cannot be longer than 48 characters.', - value='', + name="title", + label="Title", + description="Title cannot be longer than 48 characters.", + value="", uid=[0], ), desc.StringParam( - name='description', - label='Description', - description='Description cannot be longer than 1024 characters.', - value='', + name="description", + label="Description", + description="Description cannot be longer than 1024 characters.", + value="", uid=[0], ), desc.ChoiceParam( - name='license', - label='License', - description='License label.', - value='CC Attribution', - values=['CC Attribution', - 'CC Attribution-ShareAlike', - 'CC Attribution-NoDerivs', - 'CC Attribution-NonCommercial', - 'CC Attribution-NonCommercial-ShareAlike', - 'CC Attribution-NonCommercial-NoDerivs'], + name="license", + label="License", + description="License label.", + value="CC Attribution", + values=["CC Attribution", + "CC Attribution-ShareAlike", + "CC Attribution-NoDerivs", + "CC Attribution-NonCommercial", + "CC Attribution-NonCommercial-ShareAlike", + "CC Attribution-NonCommercial-NoDerivs"], exclusive=True, uid=[0], ), desc.ListAttribute( elementDesc=desc.StringParam( - name='tag', - label='Tag', - description='Tag cannot be longer than 48 characters.', - value='', + name="tag", + label="Tag", + description="Tag cannot be longer than 48 characters.", + value="", uid=[0], ), name="tags", @@ -120,66 +120,66 @@ class SketchfabUpload(desc.Node): group="", ), desc.ChoiceParam( - name='category', - label='Category', - description='Adding categories helps improve the discoverability of your model.', - value='none', - values=['none', - 'animals-pets', - 'architecture', - 'art-abstract', - 'cars-vehicles', - 'characters-creatures', - 'cultural-heritage-history', - 'electronics-gadgets', - 'fashion-style', - 'food-drink', - 'furniture-home', - 'music', - 'nature-plants', - 'news-politics', - 'people', - 'places-travel', - 'science-technology', - 'sports-fitness', - 'weapons-military'], + name="category", + label="Category", + description="Adding categories helps improve the discoverability of your model.", + value="none", + values=["none", + "animals-pets", + "architecture", + "art-abstract", + "cars-vehicles", + "characters-creatures", + "cultural-heritage-history", + "electronics-gadgets", + "fashion-style", + "food-drink", + "furniture-home", + "music", + "nature-plants", + "news-politics", + "people", + "places-travel", + "science-technology", + "sports-fitness", + "weapons-military"], exclusive=True, uid=[0], ), desc.BoolParam( - name='isPublished', - label='Publish', - description='If the model is not published it will be saved as a draft.', + name="isPublished", + label="Publish", + description="If the model is not published, it will be saved as a draft.", value=False, uid=[0], ), desc.BoolParam( - name='isInspectable', - label='Inspectable', - description='Allow 2D view in model inspector.', + name="isInspectable", + label="Inspectable", + description="Allow 2D view in model inspector.", value=True, uid=[0], ), desc.BoolParam( - name='isPrivate', - label='Private', - description='Requires a pro account.', + name="isPrivate", + label="Private", + description="Requires a pro account.", value=False, uid=[0], ), desc.StringParam( - name='password', - label='Password', - description='Requires a pro account.', - value='', + name="password", + label="Password", + description="Requires a pro account.", + value="", uid=[0], ), desc.ChoiceParam( - name='verboseLevel', - label='Verbose Level', - description='''verbosity level (critical, error, warning, info, debug).''', - value='info', - values=['critical', 'error', 'warning', 'info', 'debug'], + name="verboseLevel", + label="Verbose Level", + description="Verbosity level (critical, error, warning, info, debug).", + value="info", + values=["critical", "error", "warning", "info", "debug"], exclusive=True, uid=[], ), diff --git a/meshroom/nodes/aliceVision/SphereDetection.py b/meshroom/nodes/aliceVision/SphereDetection.py index 9f11616c41..90d078774d 100644 --- a/meshroom/nodes/aliceVision/SphereDetection.py +++ b/meshroom/nodes/aliceVision/SphereDetection.py @@ -13,23 +13,23 @@ class SphereDetection(desc.CommandLineNode): inputs = [ desc.File( - name='input', + name="input", label="SfMData", - description='Input SfMData file.', - value='', + description="Input SfMData file.", + value="", uid=[0] ), desc.File( - name='modelPath', - label='Detection Network', - description='Deep learning network for automatic calibration sphere detection.', - value='${ALICEVISION_SPHERE_DETECTION_MODEL}', + name="modelPath", + label="Detection Network", + description="Deep learning network for automatic calibration sphere detection.", + value="${ALICEVISION_SPHERE_DETECTION_MODEL}", uid=[0] ), desc.BoolParam( - name='autoDetect', - label='Automatic Sphere Detection', - description='Automatic detection of calibration spheres', + name="autoDetect", + label="Automatic Sphere Detection", + description="Automatic detection of calibration spheres.", value=False, uid=[0] ), @@ -48,12 +48,12 @@ class SphereDetection(desc.CommandLineNode): description="Center of the circle (XY offset to the center of the image in pixels).", groupDesc=[ desc.FloatParam( - name="x", label="x", description="X Offset in pixels", + name="x", label="x", description="X offset in pixels.", value=0.0, uid=[0], range=(-1000.0, 10000.0, 1.0)), desc.FloatParam( - name="y", label="y", description="Y Offset in pixels", + name="y", label="y", description="Y offset in pixels.", value=0.0, uid=[0], range=(-1000.0, 10000.0, 1.0)), @@ -62,30 +62,30 @@ class SphereDetection(desc.CommandLineNode): group=None # skip group from command line ), desc.FloatParam( - name='sphereRadius', - label='Radius', - description='Sphere radius in pixels.', + name="sphereRadius", + label="Radius", + description="Sphere radius in pixels.", value=500.0, range=(0.0, 1000.0, 0.1), 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'], + 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=[] + uid=[], ) ] outputs = [ desc.File( - name='output', - label='Output Folder', - description='Sphere detection information will be written here.', + name="output", + label="Output Folder", + description="Sphere detection information will be written here.", value=desc.Node.internalFolder, uid=[] ) diff --git a/meshroom/nodes/aliceVision/Split360Images.py b/meshroom/nodes/aliceVision/Split360Images.py index ccdfa7eb03..40197dbb11 100644 --- a/meshroom/nodes/aliceVision/Split360Images.py +++ b/meshroom/nodes/aliceVision/Split360Images.py @@ -28,83 +28,83 @@ class Split360Images(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='Input', + name="input", + label="Input", description="Single image, image folder or SfMData file.", value='', uid=[0], ), desc.ChoiceParam( - name='splitMode', - label='Split Mode', - description="Split mode (equirectangular, dualfisheye)", - value='equirectangular', - values=['equirectangular', 'dualfisheye'], + name="splitMode", + label="Split Mode", + description="Split mode (equirectangular, dualfisheye).", + value="equirectangular", + values=["equirectangular", "dualfisheye"], exclusive=True, uid=[0], ), - desc.GroupAttribute(name="dualFisheyeGroup", label="Dual Fisheye", description="Dual Fisheye", group=None, - enabled=lambda node: node.splitMode.value == 'dualfisheye', + desc.GroupAttribute(name="dualFisheyeGroup", label="Dual Fisheye", description="Dual Fisheye.", group=None, + enabled=lambda node: node.splitMode.value == "dualfisheye", groupDesc=[ desc.ChoiceParam( - name='dualFisheyeOffsetPresetX', - label='X Offset Preset', - description="Dual-Fisheye X offset preset", - value='center', - values=['center', 'left', 'right'], + name="dualFisheyeOffsetPresetX", + label="X Offset Preset", + description="Dual-Fisheye X offset preset.", + value="center", + values=["center", "left", "right"], exclusive=True, uid=[0], ), desc.ChoiceParam( - name='dualFisheyeOffsetPresetY', - label='Y Offset Preset', - description="Dual-Fisheye Y offset preset", - value='center', - values=['center', 'top', 'bottom'], + name="dualFisheyeOffsetPresetY", + label="Y Offset Preset", + description="Dual-Fisheye Y offset preset.", + value="center", + values=["center", "top", "bottom"], exclusive=True, uid=[0], ), desc.ChoiceParam( - name='dualFisheyeCameraModel', - label='Camera Model', - description="Dual-Fisheye camera model", - value='fisheye4', - values=['fisheye4', 'equidistant_r3'], + name="dualFisheyeCameraModel", + label="Camera Model", + description="Dual-Fisheye camera model.", + value="fisheye4", + values=["fisheye4", "equidistant_r3"], exclusive=True, uid=[0], ), ] ), desc.GroupAttribute(name="equirectangularGroup", label="Equirectangular", description="Equirectangular", group=None, - enabled=lambda node: node.splitMode.value == 'equirectangular', + enabled=lambda node: node.splitMode.value == "equirectangular", groupDesc=[ desc.IntParam( - name='equirectangularNbSplits', + name="equirectangularNbSplits", label='Nb Splits', - description="Equirectangular number of splits", + description="Equirectangular number of splits.", value=2, range=(1, 100, 1), uid=[0], ), desc.IntParam( - name='equirectangularSplitResolution', - label='Split Resolution', - description="Equirectangular split resolution", + name="equirectangularSplitResolution", + label="Split Resolution", + description="Equirectangular split resolution.", value=1200, range=(100, 10000, 1), uid=[0], ), desc.BoolParam( - name='equirectangularPreviewMode', - label='Preview Mode', - description="Export a SVG file that simulates the split", + name="equirectangularPreviewMode", + label="Preview Mode", + description="Export a SVG file that simulates the split.", value=False, uid=[0], ), desc.FloatParam( - name='fov', - label='Field of View', - description="Field of View to extract (in degree)", + name="fov", + label="Field Of View", + description="Field of View to extract (in degrees).", value=110.0, range=(0.0, 180.0, 1.0), uid=[0], @@ -112,20 +112,20 @@ class Split360Images(desc.AVCommandLineNode): ] ), desc.ChoiceParam( - name='extension', - label='Output File Extension', - description='Output Image File Extension.', - value='', - values=['', 'exr', 'jpg', 'tiff', 'png'], + name="extension", + label="Output File Extension", + description="Output image file extension.", + value="", + values=["", "exr", "jpg", "tiff", "png"], exclusive=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'], + 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=[], ), @@ -133,17 +133,17 @@ class Split360Images(desc.AVCommandLineNode): outputs = [ desc.File( - name='output', - label='Folder', + name="output", + label="Folder", description="Output folder for extracted frames.", value=desc.Node.internalFolder, uid=[], ), desc.File( - name='outSfMData', - label='SfMData file', + name="outSfMData", + label="SfMData File", description="Output SfMData file.", - value=desc.Node.internalFolder + 'rig.sfm', + value=desc.Node.internalFolder + "rig.sfm", uid=[], ), ] diff --git a/meshroom/nodes/aliceVision/StructureFromMotion.py b/meshroom/nodes/aliceVision/StructureFromMotion.py index a78f9dd650..0dac53002a 100644 --- a/meshroom/nodes/aliceVision/StructureFromMotion.py +++ b/meshroom/nodes/aliceVision/StructureFromMotion.py @@ -63,10 +63,10 @@ class StructureFromMotion(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='SfMData', + name="input", + label="SfMData", description='SfMData file.', - value='', + value="", uid=[0], ), desc.ListAttribute( @@ -91,291 +91,293 @@ class StructureFromMotion(desc.AVCommandLineNode): ), name="matchesFolders", label="Matches Folders", - description="Folder(s) in which computed matches are stored." + description="Folder(s) in which the computed matches are stored." ), 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='localizerEstimator', - label='Localizer Estimator', - description='Estimator type used to localize cameras (acransac, ransac, lsmeds, loransac, maxconsensus).', - value='acransac', - values=['acransac', 'ransac', 'lsmeds', 'loransac', 'maxconsensus'], + name="localizerEstimator", + label="Localizer Estimator", + description="Estimator type used to localize cameras (acransac, ransac, lsmeds, loransac, maxconsensus).", + value="acransac", + values=["acransac", "ransac", "lsmeds", "loransac", "maxconsensus"], exclusive=True, uid=[0], advanced=True, ), desc.ChoiceParam( - name='observationConstraint', - label='Observation Constraint', - description='Observation constraint mode used in the optimization:\n' - ' * Basic: Use standard reprojection error in pixel coordinates\n' - ' * Scale: Use reprojection error in pixel coordinates but relative to the feature scale', - value='Scale', - values=['Basic', 'Scale'], + name="observationConstraint", + label="Observation Constraint", + description="Observation constraint mode used in the optimization:\n" + " - Basic: Use standard reprojection error in pixel coordinates.\n" + " - Scale: Use reprojection error in pixel coordinates but relative to the feature scale.", + value="Scale", + values=["Basic", "Scale"], exclusive=True, uid=[0], advanced=True, ), desc.IntParam( - name='localizerEstimatorMaxIterations', - label='Localizer Max Ransac Iterations', - description='Maximum number of iterations allowed in ransac step.', + name="localizerEstimatorMaxIterations", + label="Localizer Max Ransac Iterations", + description="Maximum number of iterations allowed in the Ransac step.", value=4096, range=(1, 20000, 1), uid=[0], advanced=True, ), desc.FloatParam( - name='localizerEstimatorError', - label='Localizer Max Ransac Error', - description='Maximum error (in pixels) allowed for camera localization (resectioning).\n' - 'If set to 0, it will select a threshold according to the localizer estimator used\n' - '(if ACRansac, it will analyze the input data to select the optimal value).', + name="localizerEstimatorError", + label="Localizer Max Ransac Error", + description="Maximum error (in pixels) allowed for camera localization (resectioning).\n" + "If set to 0, it will select a threshold according to the localizer estimator used\n" + "(if ACRansac, it will analyze the input data to select the optimal value).", value=0.0, range=(0.0, 100.0, 0.1), uid=[0], advanced=True, ), desc.BoolParam( - name='lockScenePreviouslyReconstructed', - label='Lock Scene Previously Reconstructed', - description='This option is useful for SfM augmentation. Lock previously reconstructed poses and intrinsics.', + name="lockScenePreviouslyReconstructed", + label="Lock Previously Reconstructed Scene", + description="Lock previously reconstructed poses and intrinsics.\n" + "This option is useful for SfM augmentation.", value=False, uid=[0], ), desc.BoolParam( - name='useLocalBA', - label='Local Bundle Adjustment', - description='It reduces the reconstruction time, especially for large datasets (500+ images),\n' - 'by avoiding computation of the Bundle Adjustment on areas that are not changing.', + name="useLocalBA", + label="Local Bundle Adjustment", + description="It reduces the reconstruction time, especially for large datasets (500+ images),\n" + "by avoiding computation of the Bundle Adjustment on areas that are not changing.", value=True, uid=[0], ), desc.IntParam( - name='localBAGraphDistance', - label='LocalBA Graph Distance', - description='Graph-distance limit to define the Active region in the Local Bundle Adjustment strategy.', + name="localBAGraphDistance", + label="LocalBA Graph Distance", + description="Graph-distance limit to define the active region in the Local Bundle Adjustment strategy.", value=1, range=(2, 10, 1), uid=[0], advanced=True, ), desc.IntParam( - name='nbFirstUnstableCameras', - label='First Unstable Cameras Nb', - description='Number of cameras for which the bundle adjustment is performed every single time a camera is added.\n' - 'This leads to more stable results while computations are not too expensive, as there is little data.\n' - 'Past this number, the bundle adjustment will only be performed once for N added cameras.', + name="nbFirstUnstableCameras", + label="First Unstable Cameras Nb", + description="Number of cameras for which the bundle adjustment is performed every single time a camera is added.\n" + "This leads to more stable results while computations are not too expensive, as there is little data.\n" + "Past this number, the bundle adjustment will only be performed once for N added cameras.", value=30, range=(0, 100, 1), uid=[0], advanced=True ), desc.IntParam( - name='maxImagesPerGroup', - label='Max Images Per Group', - description='Maximum number of cameras that can be added before the bundle adjustment has to be performed again.\n' - 'This prevents adding too much data at once without performing the bundle adjustment.', + name="maxImagesPerGroup", + label="Max Images Per Group", + description="Maximum number of cameras that can be added before the bundle adjustment has to be performed again.\n" + "This prevents adding too much data at once without performing the bundle adjustment.", value=30, range=(0, 100, 1), uid=[0], advanced=True ), desc.IntParam( - name='bundleAdjustmentMaxOutliers', - label='Max Nb of Outliers after BA', - description='Threshold for the maximum number of outliers allowed at the end of a bundle adjustment iteration.\n' - 'Using a negative value for this threshold will disable BA iterations.', + name="bundleAdjustmentMaxOutliers", + label="Max Nb Of Outliers After BA", + description="Threshold for the maximum number of outliers allowed at the end of a bundle adjustment iteration.\n" + "Using a negative value for this threshold will disable BA iterations.", value=50, range=(-1, 1000, 1), uid=[0], advanced=True ), desc.IntParam( - name='maxNumberOfMatches', - label='Maximum Number of Matches', - description='Maximum number of matches per image pair (and per feature type). \n' - 'This can be useful to have a quick reconstruction overview. \n' - '0 means no limit.', + name="maxNumberOfMatches", + label="Maximum Number Of Matches", + description="Maximum number of matches per image pair (and per feature type).\n" + "This can be useful to have a quick reconstruction overview.\n" + "0 means no limit.", value=0, range=(0, 50000, 1), uid=[0], ), desc.IntParam( - name='minNumberOfMatches', - label='Minimum Number of Matches', - description='Minimum number of matches per image pair (and per feature type). \n' - 'This can be useful to have a meaningful reconstruction with accurate keypoints. 0 means no limit.', + name="minNumberOfMatches", + label="Minimum Number Of Matches", + description="Minimum number of matches per image pair (and per feature type).\n" + "This can be useful to have a meaningful reconstruction with accurate keypoints.\n" + "0 means no limit.", value=0, range=(0, 50000, 1), uid=[0], ), desc.IntParam( - name='minInputTrackLength', - label='Min Input Track Length', - description='Minimum track length in input of SfM', + name="minInputTrackLength", + label="Min Input Track Length", + description="Minimum track length in input of SfM.", value=2, range=(2, 10, 1), uid=[0], ), desc.IntParam( - name='minNumberOfObservationsForTriangulation', - label='Min Observation For Triangulation', - description='Minimum number of observations to triangulate a point.\n' - 'Set it to 3 (or more) reduces drastically the noise in the point cloud,\n' - 'but the number of final poses is a little bit reduced\n' - '(from 1.5% to 11% on the tested datasets).', + name="minNumberOfObservationsForTriangulation", + label="Min Observations For Triangulation", + description="Minimum number of observations to triangulate a point.\n" + "Setting it to 3 (or more) reduces drastically the noise in the point cloud,\n" + "but the number of final poses is a little bit reduced\n" + "(from 1.5% to 11% on the tested datasets).", value=2, range=(2, 10, 1), uid=[0], advanced=True, ), desc.FloatParam( - name='minAngleForTriangulation', - label='Min Angle For Triangulation', - description='Minimum angle for triangulation.', + name="minAngleForTriangulation", + label="Min Angle For Triangulation", + description="Minimum angle for triangulation.", value=3.0, range=(0.1, 10.0, 0.1), uid=[0], advanced=True, ), desc.FloatParam( - name='minAngleForLandmark', - label='Min Angle For Landmark', - description='Minimum angle for landmark.', + name="minAngleForLandmark", + label="Min Angle For Landmark", + description="Minimum angle for landmark.", value=2.0, range=(0.1, 10.0, 0.1), uid=[0], advanced=True, ), desc.FloatParam( - name='maxReprojectionError', - label='Max Reprojection Error', - description='Maximum reprojection error.', + name="maxReprojectionError", + label="Max Reprojection Error", + description="Maximum reprojection error.", value=4.0, range=(0.1, 10.0, 0.1), uid=[0], advanced=True, ), desc.FloatParam( - name='minAngleInitialPair', - label='Min Angle Initial Pair', - description='Minimum angle for the initial pair.', + name="minAngleInitialPair", + label="Min Angle Initial Pair", + description="Minimum angle for the initial pair.", value=5.0, range=(0.1, 10.0, 0.1), uid=[0], advanced=True, ), desc.FloatParam( - name='maxAngleInitialPair', - label='Max Angle Initial Pair', - description='Maximum angle for the initial pair.', + name="maxAngleInitialPair", + label="Max Angle Initial Pair", + description="Maximum angle for the initial pair.", value=40.0, range=(0.1, 60.0, 0.1), uid=[0], advanced=True, ), desc.BoolParam( - name='useOnlyMatchesFromInputFolder', - label='Use Only Matches From Input Folder', - description='Use only matches from the input matchesFolder parameter.\n' - 'Matches folders previously added to the SfMData file will be ignored.', + name="useOnlyMatchesFromInputFolder", + label="Use Only Matches From Input Folder", + description="Use only matches from the input matchesFolder parameter.\n" + "Matches folders previously added to the SfMData file will be ignored.", value=False, uid=[], advanced=True, ), desc.BoolParam( - name='useRigConstraint', - label='Use Rig Constraint', - description='Enable/Disable rig constraint.', + name="useRigConstraint", + label="Use Rig Constraint", + description="Enable/Disable rig constraint.", value=True, uid=[0], advanced=True, ), desc.IntParam( - name='rigMinNbCamerasForCalibration', - label='Min Nb Cameras For Rig Calibration', - description='Minimal number of cameras to start the calibration of the rig', + name="rigMinNbCamerasForCalibration", + label="Min Nb Cameras For Rig Calibration", + description="Minimum number of cameras to start the calibration of the rig.", value=20, range=(1, 50, 1), uid=[0], advanced=True, ), desc.BoolParam( - name='lockAllIntrinsics', - label='Force Lock of All Intrinsic Camera Parameters', - description='Force to keep constant all the intrinsics parameters of the cameras (focal length, \n' - 'principal point, distortion if any) during the reconstruction.\n' - 'This may be helpful if the input cameras are already fully calibrated.', + name="lockAllIntrinsics", + label="Lock All Intrinsic Camera Parameters", + description="Force to keep all the intrinsic parameters of the cameras (focal length, \n" + "principal point, distortion if any) constant during the reconstruction.\n" + "This may be helpful if the input cameras are already fully calibrated.", value=False, uid=[0], ), desc.IntParam( - name='minNbCamerasToRefinePrincipalPoint', + name="minNbCamerasToRefinePrincipalPoint", label='Min Nb Cameras To Refine Principal Point', - description='Minimal number of cameras to refine the principal point of the cameras (one of the intrinsic parameters of the camera). ' - 'If we do not have enough cameras, the principal point in consider is considered in the center of the image. ' - 'If minNbCamerasToRefinePrincipalPoint<=0, the principal point is never refined. ' - 'If minNbCamerasToRefinePrincipalPoint==1, the principal point is always refined.', + description="Minimum number of cameras to refine the principal point of the cameras (one of the intrinsic parameters of the camera).\n" + "If we do not have enough cameras, the principal point is considered to be in the center of the image.\n" + "If minNbCamerasToRefinePrincipalPoint <= 0, the principal point is never refined." + "If minNbCamerasToRefinePrincipalPoint is set to 1, the principal point is always refined.", value=3, range=(0, 20, 1), uid=[0], advanced=True, ), desc.BoolParam( - name='filterTrackForks', - label='Filter Track Forks', - description='Enable/Disable the track forks removal. A track contains a fork when incoherent matches \n' - 'lead to multiple features in the same image for a single track. \n', + name="filterTrackForks", + label="Filter Track Forks", + description="Enable/Disable the track forks removal. A track contains a fork when incoherent matches \n" + "lead to multiple features in the same image for a single track.", value=False, uid=[0], ), desc.BoolParam( - name='computeStructureColor', - label='Compute Structure Color', - description='Enable/Disable color computation of each 3D point.', + name="computeStructureColor", + label="Compute Structure Color", + description="Enable/Disable color computation of every 3D point.", value=True, uid=[0], ), desc.File( - name='initialPairA', - label='Initial Pair A', - description='View ID or filename of the first image (either with or without the full path).', - value='', + name="initialPairA", + label="Initial Pair A", + description="View ID or filename of the first image (either with or without the full path).", + value="", uid=[0], ), desc.File( - name='initialPairB', - label='Initial Pair B', - description='View ID or filename of the second image (either with or without the full path).', - value='', + name="initialPairB", + label="Initial Pair B", + description="View ID or filename of the second image (either with or without the full path).", + value="", uid=[0], ), desc.ChoiceParam( - name='interFileExtension', - label='Inter File Extension', - description='Extension of the intermediate file export.', - value='.abc', - values=('.abc', '.ply'), + name="interFileExtension", + label="Inter File Extension", + description="Extension of the intermediate file export.", + value=".abc", + values=(".abc", ".ply"), exclusive=True, uid=[], advanced=True, ), 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=[], ) @@ -383,23 +385,23 @@ class StructureFromMotion(desc.AVCommandLineNode): outputs = [ desc.File( - name='output', - label='SfMData', - description='Path to the output sfmdata file', - value=desc.Node.internalFolder + 'sfm.abc', + name="output", + label="SfMData", + description="Path to the output SfM point cloud file (in SfMData format).", + value=desc.Node.internalFolder + "sfm.abc", uid=[], ), desc.File( - name='outputViewsAndPoses', - label='Views and Poses', - description='''Path to the output sfmdata file with cameras (views and poses).''', - value=desc.Node.internalFolder + 'cameras.sfm', + name="outputViewsAndPoses", + label="Views And Poses", + description="Path to the output SfMData file with cameras (views and poses).", + value=desc.Node.internalFolder + "cameras.sfm", uid=[], ), desc.File( - name='extraInfoFolder', - label='Folder', - description='Folder for intermediate reconstruction files and additional reconstruction information files.', + name="extraInfoFolder", + label="Folder", + description="Folder for intermediate reconstruction files and additional reconstruction information files.", value=desc.Node.internalFolder, uid=[], ), diff --git a/meshroom/nodes/aliceVision/Texturing.py b/meshroom/nodes/aliceVision/Texturing.py index 4daf3ecc92..631ab8f4bf 100644 --- a/meshroom/nodes/aliceVision/Texturing.py +++ b/meshroom/nodes/aliceVision/Texturing.py @@ -25,146 +25,148 @@ class Texturing(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='Dense SfMData', - description='SfMData file.', - value='', + name="input", + label="Dense SfMData", + description="SfMData file.", + value="", uid=[0], ), desc.File( - name='imagesFolder', - label='Images Folder', - description='Use images from a specific folder instead of those specify in the SfMData file.\nFilename should be the image uid.', - value='', + name="imagesFolder", + label="Images Folder", + description="Use images from a specific folder instead of those specified in the SfMData file.\n" + "Filename should be the image UID.", + value="", uid=[0], ), desc.File( - name='inputMesh', - label='Mesh', - description='Optional input mesh to texture. By default, it will texture the result of the reconstruction.', - value='', + name="inputMesh", + label="Mesh", + description="Optional input mesh to texture. By default, it will texture the result of the reconstruction.", + value="", uid=[0], ), desc.File( - name='inputRefMesh', - label='Ref Mesh', - description='Optional input mesh to compute height maps and normal maps. If not provided, no additional maps with geometric information will be generated.', - value='', + name="inputRefMesh", + label="Ref Mesh", + description="Optional input mesh to compute height maps and normal maps.\n" + "If not provided, no additional map with geometric information will be generated.", + value="", uid=[0], ), desc.ChoiceParam( - name='textureSide', - label='Texture Side', - description='''Output texture size''', + name="textureSide", + label="Texture Side", + description="Output texture size.", value=8192, values=(1024, 2048, 4096, 8192, 16384), exclusive=True, uid=[0], ), desc.ChoiceParam( - name='downscale', - label='Texture Downscale', - description='''Texture downscale factor''', + name="downscale", + label="Texture Downscale", + description="Texture downscale factor.", value=2, values=(1, 2, 4, 8), exclusive=True, uid=[0], ), desc.ChoiceParam( - name='outputMeshFileType', - label='Mesh File Type', - description='File Type', - value='obj', - values=('obj', 'gltf', 'fbx', 'stl'), + name="outputMeshFileType", + label="Mesh File Type", + description="File type for the mesh output.", + value="obj", + values=("obj", "gltf", "fbx", "stl"), exclusive=True, uid=[0], ), - desc.GroupAttribute(name="colorMapping", label="Color Mapping", description="Color Map Parameters", + desc.GroupAttribute(name="colorMapping", label="Color Mapping", description="Color map parameters.", enabled=lambda node: (node.imagesFolder.value != ''), group=None, groupDesc=[ desc.BoolParam( - name='enable', - label='Enable', - description='Generate Textures', + name="enable", + label="Enable", + description="Generate textures if set to true.", value=True, uid=[], group=None, ), desc.ChoiceParam( - name='colorMappingFileType', - label='File Type', - description='Texture File Type', - value='exr', - values=('exr', 'png', 'tiff', 'jpg'), + name="colorMappingFileType", + label="File Type", + description="Texture file type.", + value="exr", + values=("exr", "png", "tiff", "jpg"), exclusive=True, uid=[0], enabled=lambda node: node.colorMapping.enable.value, ), ], ), - desc.GroupAttribute(name="bumpMapping", label="Bump Mapping", description="Bump Mapping Parameters", + desc.GroupAttribute(name="bumpMapping", label="Bump Mapping", description="Bump mapping parameters.", enabled=lambda node: (node.inputRefMesh.value != ''), group=None, groupDesc=[ desc.BoolParam( - name='enable', - label='Enable', - description='Generate Normal / Bump Maps', + name="enable", + label="Enable", + description="Generate normal / bump maps if set to true.", value=True, uid=[], group=None, ), desc.ChoiceParam( - name='bumpType', - label='Bump Type', - description='Export Normal Map or Height Map', - value='Normal', - values=('Height', 'Normal'), + name="bumpType", + label="Bump Type", + description="Export normal map or height map.", + value="Normal", + values=("Height", "Normal"), exclusive=True, uid=[0], enabled=lambda node: node.bumpMapping.enable.value, ), desc.ChoiceParam( - name='normalFileType', - label='File Type', - description='NormalMap Texture File Type', - value='exr', - values = ('exr', 'png', 'tiff', 'jpg'), + name="normalFileType", + label="File Type", + description="File type for the normal map texture.", + value="exr", + values = ("exr", "png", "tiff", "jpg"), exclusive=True, uid=[0], enabled=lambda node: node.bumpMapping.enable.value and node.bumpMapping.bumpType.value == "Normal", ), desc.ChoiceParam( - name='heightFileType', - label='File Type', - description='HeightMap Texture File Type', - value='exr', - values=('exr',), + name="heightFileType", + label="File Type", + description="File type for the height map texture.", + value="exr", + values=("exr",), exclusive=True, uid=[0], enabled=lambda node: node.bumpMapping.enable.value and node.bumpMapping.bumpType.value == "Height", ), ], ), - desc.GroupAttribute(name="displacementMapping", label="Displacement Mapping", description="Displacement Mapping Parameters", - enabled=lambda node: (node.inputRefMesh.value != ''), + desc.GroupAttribute(name="displacementMapping", label="Displacement Mapping", description="Displacement mapping parameters.", + enabled=lambda node: (node.inputRefMesh.value != ""), group=None, groupDesc=[ desc.BoolParam( - name='enable', - label='Enable', - description='Generate Height Maps for Displacement', + name="enable", + label="Enable", + description="Generate height maps for displacement.", value=True, uid=[], group=None, ), desc.ChoiceParam( - name='displacementMappingFileType', - label='File Type', - description='HeightMap Texture File Type', - value='exr', - values=('exr',), + name="displacementMappingFileType", + label="File Type", + description="File type for the height map texture.", + value="exr", + values=("exr",), exclusive=True, uid=[0], enabled=lambda node: node.displacementMapping.enable.value, @@ -172,44 +174,44 @@ class Texturing(desc.AVCommandLineNode): ], ), desc.ChoiceParam( - name='unwrapMethod', - label='Unwrap Method', - description='Method to unwrap input mesh if it does not have UV coordinates.\n' - ' * Basic (> 600k faces) fast and simple. Can generate multiple atlases.\n' - ' * LSCM (<= 600k faces): optimize space. Generates one atlas.\n' - ' * ABF (<= 300k faces): optimize space and stretch. Generates one atlas.', + name="unwrapMethod", + label="Unwrap Method", + description="Method to unwrap input mesh if it does not have UV coordinates.\n" + " - Basic (> 600k faces) fast and simple. Can generate multiple atlases.\n" + " - LSCM (<= 600k faces): optimize space. Generates one atlas.\n" + " - ABF (<= 300k faces): optimize space and stretch. Generates one atlas.", value="Basic", values=("Basic", "LSCM", "ABF"), exclusive=True, uid=[0], ), desc.BoolParam( - name='useUDIM', - label='Use UDIM', - description='Use UDIM UV mapping.', + name="useUDIM", + label="Use UDIM", + description="Use UDIM UV mapping.", value=True, uid=[0], ), desc.BoolParam( - name='fillHoles', - label='Fill Holes', - description='Fill Texture holes with plausible values', + name="fillHoles", + label="Fill Holes", + description="Fill texture holes with plausible values.", value=False, uid=[0], ), desc.IntParam( - name='padding', - label='Padding', - description='''Texture edge padding size in pixel''', + name="padding", + label="Padding", + description="Texture edge padding size in pixels.", value=5, range=(0, 20, 1), uid=[0], advanced=True, ), desc.IntParam( - name='multiBandDownscale', - label='Multi Band Downscale', - description='''Width of frequency bands for multiband blending''', + name="multiBandDownscale", + label="Multi Band Downscale", + description="Width of frequency bands for multiband blending.", value=4, range=(0, 8, 2), uid=[0], @@ -217,109 +219,113 @@ class Texturing(desc.AVCommandLineNode): ), desc.GroupAttribute( name="multiBandNbContrib", - label="MultiBand contributions", + label="Multi-Band Contributions", groupDesc=[ - desc.IntParam(name="high", label="High Freq", description="High Frequency Band", value=1, uid=[0], range=None), - desc.IntParam(name="midHigh", label="Mid-High Freq", description="Mid-High Frequency Band", value=5, uid=[0], range=None), - desc.IntParam(name="midLow", label="Mid-Low Freq", description="Mid-Low Frequency Band", value=10, uid=[0], range=None), - desc.IntParam(name="low", label="Low Freq", description="Low Frequency Band", value=0, uid=[0], range=None), + desc.IntParam(name="high", label="High Freq", description="High frequency band.", value=1, uid=[0], range=None), + desc.IntParam(name="midHigh", label="Mid-High Freq", description="Mid-high frequency band.", value=5, uid=[0], range=None), + desc.IntParam(name="midLow", label="Mid-Low Freq", description="Mid-low frequency band.", value=10, uid=[0], range=None), + desc.IntParam(name="low", label="Low Freq", description="Low frequency band", value=0, uid=[0], range=None), ], - description='''Number of contributions per frequency band for multiband blending (each frequency band also contributes to lower bands)''', + description="Number of contributions per frequency band for multi-band blending (each frequency band also contributes to lower bands).", advanced=True, ), desc.BoolParam( - name='useScore', - label='Use Score', - description='Use triangles scores (ie. reprojection area) for multiband blending.', + name="useScore", + label="Use Score", + description="Use triangles scores (ie. reprojection area) for multi-band blending.", value=True, uid=[0], advanced=True, ), desc.FloatParam( - name='bestScoreThreshold', - label='Best Score Threshold', - description='''(0.0 to disable filtering based on threshold to relative best score)''', + name="bestScoreThreshold", + label="Best Score Threshold", + description="Setting this parameter to 0.0 disables filtering based on threshold to relative best score.", value=0.1, range=(0.0, 1.0, 0.01), uid=[0], advanced=True, ), desc.FloatParam( - name='angleHardThreshold', - label='Angle Hard Threshold', - description='''(0.0 to disable angle hard threshold filtering)''', + name="angleHardThreshold", + label="Angle Hard Threshold", + description="Setting this parameter to 0.0 disables angle hard threshold filtering.", value=90.0, range=(0.0, 180.0, 0.01), uid=[0], advanced=True, ), desc.ChoiceParam( - name='workingColorSpace', - label='Working Color Space', + name="workingColorSpace", + label="Working Color Space", description="Color space for the texturing internal computation (does not impact the output file color space).", - value='sRGB', - values=('sRGB', 'Linear', 'ACES2065-1', 'ACEScg'), + value="sRGB", + values=("sRGB", "Linear", "ACES2065-1", "ACEScg"), exclusive=True, uid=[0], advanced=True, ), desc.ChoiceParam( - name='outputColorSpace', - label='Output Color Space', + name="outputColorSpace", + label="Output Color Space", description="Color space for the output texture files.", - value='AUTO', - values=('sRGB', 'rec709', 'Linear', 'ACES2065-1', 'ACEScg', 'AUTO'), + value="AUTO", + values=("sRGB", "rec709", "Linear", "ACES2065-1", "ACEScg", "AUTO"), exclusive=True, uid=[0], ), desc.BoolParam( - name='correctEV', - label='Correct Exposure', - description='Uniformize images exposure values.', + name="correctEV", + label="Correct Exposure", + description="Uniformize images exposure values.", value=False, uid=[0], ), desc.BoolParam( - name='forceVisibleByAllVertices', - label='Force Visible By All Vertices', - description='''Triangle visibility is based on the union of vertices visibility.''', + name="forceVisibleByAllVertices", + label="Force Visible By All Vertices", + description="Triangle visibility is based on the union of vertices visibility.", value=False, uid=[0], advanced=True, ), desc.BoolParam( - name='flipNormals', - label='Flip Normals', - description='''Option to flip face normals. It can be needed as it depends on the vertices order in triangles and the convention change from one software to another.''', + name="flipNormals", + label="Flip Normals", + description="Option to flip face normals.\n" + "It can be needed as it depends on the vertices order in triangles and the convention changes from one software to another.", value=False, uid=[0], advanced=True, ), desc.ChoiceParam( - name='visibilityRemappingMethod', - label='Visibility Remapping Method', - description='''Method to remap visibilities from the reconstruction to the input mesh (Pull, Push, PullPush, MeshItself).''', - value='PullPush', - values=['Pull', 'Push', 'PullPush', 'MeshItself'], + name="visibilityRemappingMethod", + label="Visibility Remapping Method", + description="Method to remap visibilities from the reconstruction to the input mesh (Pull, Push, PullPush, MeshItself).", + value="PullPush", + values=["Pull", "Push", "PullPush", "MeshItself"], exclusive=True, uid=[0], advanced=True, ), desc.FloatParam( - name='subdivisionTargetRatio', - label='Subdivision Target Ratio', - description='''Percentage of the density of the reconstruction as the target for the subdivision (0: disable subdivision, 0.5: half density of the reconstruction, 1: full density of the reconstruction).''', + name="subdivisionTargetRatio", + label="Subdivision Target Ratio", + description="Percentage of the density of the reconstruction as the target for the subdivision:\n" + " - 0: disable subdivision.\n" + " - 0.5: half density of the reconstruction.\n" + " - 1: full density of the reconstruction).", value=0.8, range=(0.0, 1.0, 0.001), uid=[0], advanced=True, ), 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=[], ), @@ -328,36 +334,36 @@ class Texturing(desc.AVCommandLineNode): outputs = [ desc.File( - name='output', - label='Folder', - description='Folder for output mesh: OBJ, material and texture files.', + name="output", + label="Folder", + description="Folder for output mesh: OBJ, material and texture files.", value=desc.Node.internalFolder, uid=[], ), desc.File( - name='outputMesh', - label='Mesh', - description='Output Mesh file.', - value=desc.Node.internalFolder + 'texturedMesh.{outputMeshFileTypeValue}', + name="outputMesh", + label="Mesh", + description="Output mesh file.", + value=desc.Node.internalFolder + "texturedMesh.{outputMeshFileTypeValue}", uid=[], - group='', + group="", ), desc.File( - name='outputMaterial', + name="outputMaterial", enabled= lambda node: node.outputMeshFileType.value == "obj", - label='Material', - description='Output Material file.', - value=desc.Node.internalFolder + 'texturedMesh.mtl', + label="Material", + description="Output material file.", + value=desc.Node.internalFolder + "texturedMesh.mtl", uid=[], - group='', + group="", ), desc.File( - name='outputTextures', - label='Textures', - description='Output Texture files.', - value= lambda attr: desc.Node.internalFolder + 'texture_*.' + attr.node.colorMapping.colorMappingFileType.value if attr.node.colorMapping.enable.value else '', + name="outputTextures", + label="Textures", + description="Output texture files.", + value= lambda attr: desc.Node.internalFolder + "texture_*." + attr.node.colorMapping.colorMappingFileType.value if attr.node.colorMapping.enable.value else "", uid=[], - group='' + group="" ) ] diff --git a/meshroom/nodes/aliceVision/TracksBuilding.py b/meshroom/nodes/aliceVision/TracksBuilding.py index 3cfb49c422..73e5fcc5ec 100644 --- a/meshroom/nodes/aliceVision/TracksBuilding.py +++ b/meshroom/nodes/aliceVision/TracksBuilding.py @@ -14,17 +14,17 @@ class TracksBuilding(desc.AVCommandLineNode): inputs = [ desc.File( - name='input', - label='SfMData', - description='SfMData file.', - value='', + name="input", + label="SfMData", + description="Input SfMData file.", + value="", uid=[0], ), desc.ListAttribute( elementDesc=desc.File( name="featuresFolder", label="Features Folder", - description="", + description="Folder containing some extracted features and descriptors.", value="", uid=[0], ), @@ -36,7 +36,7 @@ class TracksBuilding(desc.AVCommandLineNode): elementDesc=desc.File( name="matchesFolder", label="Matches Folder", - description="", + description="Folder containing some matches.", value="", uid=[0], ), @@ -45,46 +45,46 @@ class TracksBuilding(desc.AVCommandLineNode): description="Folder(s) in which computed matches are stored." ), 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.IntParam( - name='minInputTrackLength', - label='Min Input Track Length', - description='Minimum track length', + name="minInputTrackLength", + label="Min Input Track Length", + description="Minimum track length.", value=2, range=(2, 10, 1), uid=[0], ), desc.BoolParam( - name='useOnlyMatchesFromInputFolder', - label='Use Only Matches From Input Folder', - description='Use only matches from the input matchesFolder parameter.\n' - 'Matches folders previously added to the SfMData file will be ignored.', + name="useOnlyMatchesFromInputFolder", + label="Use Only Matches From Input Folder", + description="Use only matches from the input 'matchesFolder' parameter.\n" + "Matches folders previously added to the SfMData file will be ignored.", value=False, uid=[], advanced=True, ), desc.BoolParam( - name='filterTrackForks', - label='Filter Track Forks', - description='Enable/Disable the track forks removal. A track contains a fork when incoherent matches \n' - 'lead to multiple features in the same image for a single track. \n', + name="filterTrackForks", + label="Filter Track Forks", + description="Enable/Disable the track forks removal. A track contains a fork when incoherent matches\n" + "lead to multiple features in the same image for a single track.", 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'], + 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=[], ) @@ -92,10 +92,10 @@ class TracksBuilding(desc.AVCommandLineNode): outputs = [ desc.File( - name='output', - label='Tracks', - description='Path to the output tracks file', - value=desc.Node.internalFolder + 'tracksFile.json', + name="output", + label="Tracks", + description="Path to the output tracks file.", + value=desc.Node.internalFolder + "tracksFile.json", uid=[], ), ] diff --git a/meshroom/nodes/blender/ScenePreview.py b/meshroom/nodes/blender/ScenePreview.py index 84a0eb5bab..6fc3d7796c 100644 --- a/meshroom/nodes/blender/ScenePreview.py +++ b/meshroom/nodes/blender/ScenePreview.py @@ -18,48 +18,48 @@ class ScenePreview(desc.CommandLineNode): inputs = [ desc.File( - name='blenderCmd', - label='Blender Command', - description='Command to launch Blender', - value='blender', + name="blenderCmd", + label="Blender Command", + description="Command to launch Blender.", + value="blender", uid=[], - group='', + group="", ), desc.File( - name='script', - label='Script', - description='Path to the internal script for rendering in Blender', - value=os.path.join(currentDir, 'scripts' ,'preview.py'), + name="script", + label="Script", + description="Path to the internal script for rendering in Blender.", + value=os.path.join(currentDir, "scripts", "preview.py"), uid=[], - group='', + group="", advanced=True, ), desc.File( - name='cameras', - label='Cameras', - description='SfmData with the views, poses and intrinsics to use (in JSON format)', - value='', + name="cameras", + label="Cameras", + description="SfMData with the views, poses and intrinsics to use (in JSON format).", + value="", uid=[0], ), desc.File( - name='model', - label='Model', - description='Point cloud (.abc) or mesh (.obj) to render', - value='', + name="model", + label="Model", + description="Point cloud (.abc) or mesh (.obj) to render.", + value="", uid=[0], ), desc.BoolParam( - name='useBackground', - label='Display Background', - description='Use the undistorted images as background', + name="useBackground", + label="Display Background", + description="Use the undistorted images as background.", value=True, uid=[0], ), desc.File( - name='undistortedImages', - label='Undistorted Images', - description='Folder containing the undistorted images', - value='', + name="undistortedImages", + label="Undistorted Images", + description="Folder containing the undistorted images.", + value="", uid=[0], enabled=lambda node: node.useBackground.value, ), @@ -67,23 +67,23 @@ class ScenePreview(desc.CommandLineNode): name="pointCloudParams", label="Point Cloud Settings", group=None, - enabled=lambda node: node.model.value.lower().endswith('.abc'), - description="Settings for point cloud rendering", + enabled=lambda node: node.model.value.lower().endswith(".abc"), + description="Settings for point cloud rendering.", groupDesc=[ desc.FloatParam( - name='particleSize', - label='Particle Size', - description='Scale of particles used for the point cloud', + name="particleSize", + label="Particle Size", + description="Scale of particles used for the point cloud.", value=0.01, range=(0.01, 1.0, 0.01), uid=[0], ), desc.ChoiceParam( - name='particleColor', - label='Particle Color', - description='Color of particles used for the point cloud', - value='Red', - values=['Grey', 'White', 'Red', 'Green', 'Magenta'], + name="particleColor", + label="Particle Color", + description="Color of particles used for the point cloud.", + value="Red", + values=["Grey", "White", "Red", "Green", "Magenta"], exclusive=True, uid=[0], ), @@ -93,24 +93,24 @@ class ScenePreview(desc.CommandLineNode): name="meshParams", label="Mesh Settings", group=None, - enabled=lambda node: node.model.value.lower().endswith('.obj'), - description="Setting for mesh rendering", + enabled=lambda node: node.model.value.lower().endswith(".obj"), + description="Setting for mesh rendering.", groupDesc=[ desc.ChoiceParam( - name='shading', - label='Shading', - description='Shading method for visualizing the mesh', - value='wireframe', - values=['wireframe', 'line_art'], + name="shading", + label="Shading", + description="Shading method for visualizing the mesh.", + value="wireframe", + values=["wireframe", "line_art"], exclusive=True, uid=[0], ), desc.ChoiceParam( - name='edgeColor', - label='Edge Color', - description='Color of the mesh edges', - value='Red', - values=['Grey', 'White', 'Red', 'Green', 'Magenta'], + name="edgeColor", + label="Edge Color", + description="Color of the mesh edges.", + value="Red", + values=["Grey", "White", "Red", "Green", "Magenta"], exclusive=True, uid=[0], ), @@ -120,19 +120,19 @@ class ScenePreview(desc.CommandLineNode): outputs = [ desc.File( - name='output', - label='Output', - description='Output folder', + name="output", + label="Output", + description="Output folder.", value=desc.Node.internalFolder, uid=[], ), desc.File( - name='frames', - label='Frames', - description='Frames rendered in Blender', - semantic='image', - value=desc.Node.internalFolder + '_preview.jpg', + name="frames", + label="Frames", + description="Frames rendered in Blender.", + semantic="image", + value=desc.Node.internalFolder + "_preview.jpg", uid=[], - group='', + group="", ), - ] \ No newline at end of file + ]