Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[nodes] Replace desc.Node.internalFolder with {nodeCacheFolder} #34

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions mrrs/nodes/benchmark/CalibrationComparison.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,13 @@ class CalibrationComparison(desc.Node):
name='outputFolder',
label='Output Folder',
description='Output folder for generated results.',
value=desc.Node.internalFolder,
value="{nodeCacheFolder}",
),
desc.File(
name='outputCsv',
label='Output Csv',
description='Output file to generated results.',
value=lambda attr: os.path.join(desc.Node.internalFolder, attr.node.csv_name.value),
value=lambda attr: os.path.join("{nodeCacheFolder}", attr.node.csv_name.value),
)
]

Expand Down
3 changes: 1 addition & 2 deletions mrrs/nodes/benchmark/CleanMesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ class CleanMesh(CondaNode):
name="output_mesh",
label="Ouput Mesh",
description="",
value=os.path.join(desc.Node.internalFolder, "cleaned_mesh.ply"),
value=os.path.join("{nodeCacheFolder}", "cleaned_mesh.ply"),
),
]

4 changes: 2 additions & 2 deletions mrrs/nodes/benchmark/DepthMapComparison.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,13 @@ class DepthMapComparison(desc.Node):
name='output',
label='Output',
description='Output folder for generated results.',
value=desc.Node.internalFolder,
value="{nodeCacheFolder}",
),
desc.File(
name='outputCsv',
label='Output Csv',
description='Output file to generated results.',
value=lambda attr: os.path.join(desc.Node.internalFolder, attr.node.csv_name.value),
value=lambda attr: os.path.join("{nodeCacheFolder}", attr.node.csv_name.value),
)
]

Expand Down
16 changes: 8 additions & 8 deletions mrrs/nodes/benchmark/LoadDataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,30 +79,30 @@ class LoadDataset(desc.Node):
name='outputSfMData',
label='SfM Data',
description='Path to the output sfmdata file.',
value=desc.Node.internalFolder + 'sfm.sfm',
value='{nodeCacheFolder}/sfm.sfm',
),

desc.File(
name='depthMapsFolder',
label='Depth map folder',
description='Output folder for loaded depth maps.',
value=os.path.join(desc.Node.internalFolder, 'depth_maps'),
value=os.path.join('{nodeCacheFolder}', 'depth_maps'),
# enabled=lambda attr: (attr.node.datasetType.value=='blendedMVG'), #FIXME: does not work!! doesnt actually hides in the node
),

desc.File(
name='mesh',
label='Mesh',
description='Loaded mesh.',
value=os.path.join(desc.Node.internalFolder, 'mesh.ply'),
value=os.path.join('{nodeCacheFolder}', 'mesh.ply'),
# enabled=lambda attr: (attr.node.datasetType.value=='DTU'),
),

desc.File(
name='maskFolder',
label='Mask Folder',
description='Image mask folder. The mask describes the visibility of the object to be observed, on each view.',
value=os.path.join(desc.Node.internalFolder,'masks'),
value=os.path.join('{nodeCacheFolder}', 'masks'),
# enabled=lambda attr: (attr.node.datasetType.value=='DTU'),
),

Expand All @@ -112,7 +112,7 @@ class LoadDataset(desc.Node):
label='DepthMapsDisplay',
description='Generated depth maps.',
semantic='image',
value=os.path.join(desc.Node.internalFolder,
value=os.path.join('{nodeCacheFolder}',
'depth_maps', '<VIEW_ID>_depthMap.exr'),
advanced=True,
visible=False
Expand All @@ -123,7 +123,7 @@ class LoadDataset(desc.Node):
label='MasksDisplay',
description='Generated masks.',
semantic='image',
value=os.path.join(desc.Node.internalFolder,
value=os.path.join('{nodeCacheFolder}',
'masks', '<VIEW_ID>.png'),
advanced=True,
visible=False
Expand All @@ -134,7 +134,7 @@ class LoadDataset(desc.Node):
label='landMarksProjDisplay',
description='Generated images for landmarl projection.',
semantic='image',
value=os.path.join(desc.Node.internalFolder,
value=os.path.join('{nodeCacheFolder}',
'lm_projs', '<VIEW_ID>.png'),
advanced=True,
enabled=lambda attr: attr.node.landMarksProj.value,
Expand All @@ -146,7 +146,7 @@ class LoadDataset(desc.Node):
label='MeshDisplay',
description='MeshDisplay',
semantic='3D',
value=os.path.join(desc.Node.internalFolder,
value=os.path.join('{nodeCacheFolder}',
'mesh_display.ply'),
advanced=True,
visible=False
Expand Down
6 changes: 3 additions & 3 deletions mrrs/nodes/benchmark/MeshComparison.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,14 @@ def env_file(self):
name='output_dir',
label='Output Directory',
description='''''',
value=desc.Node.internalFolder,
value='{nodeCacheFolder}',
),

desc.File(
name='vizMeshtoGT',
label='Distance Mesh to GT',
description='''''',
value=os.path.join(desc.Node.internalFolder, "vis_data2gt.pc.ply"),
value=os.path.join("{nodeCacheFolder}", "vis_data2gt.pc.ply"),
semantic="3D",
group='',
),
Expand All @@ -73,7 +73,7 @@ def env_file(self):
name='vizGTtoMesh',
label='Distance GT to Mesg',
description='''''',
value=os.path.join(desc.Node.internalFolder, "vis_gt2data.pc.ply"),
value=os.path.join("{nodeCacheFolder}", "vis_gt2data.pc.ply"),
semantic="3D",
group='',
),
Expand Down
4 changes: 2 additions & 2 deletions mrrs/nodes/colmap/AutomaticReconstructor.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ class ColmapAutomaticReconstructor(desc.CommandLineNode):
name='workspace_path',
label='Output Folder',
description='''Output Folder.''',
value=desc.Node.internalFolder,
value='{nodeCacheFolder}',
),
desc.File(
name='output_pc',
label='Output point cloud',
description='''Output point cloud.''',
value=os.path.join(desc.Node.internalFolder, 'dense\\0\\fused.ply'),
value=os.path.join('{nodeCacheFolder}', 'dense\\0\\fused.ply'),
group='',
),
]
Expand Down
2 changes: 1 addition & 1 deletion mrrs/nodes/colmap/Colmap2MeshroomSfmConvertions.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ class Colmap2MeshroomSfmConvertion(desc.Node):
name='outputSfm',
label='Output Sfm',
description='Path to the output SfM file.',
value=os.path.join(desc.Node.internalFolder, "sfmdata.sfm"),
value=os.path.join("{nodeCacheFolder}", "sfmdata.sfm"),
),
]

Expand Down
2 changes: 1 addition & 1 deletion mrrs/nodes/colmap/DelaunayMesher.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class DelaunayMesher(desc.CommandLineNode):
name='output_path',
label='OutputPath',
description='Output path.',
value=os.path.join(desc.Node.internalFolder, "mesh_delaunay.ply"),
value=os.path.join("{nodeCacheFolder}", "mesh_delaunay.ply"),
),

]
Expand Down
6 changes: 3 additions & 3 deletions mrrs/nodes/colmap/FeatureExtraction.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,19 +64,19 @@ class ColmapFeatureExtraction(desc.CommandLineNode):
name='database_path',
label='Sensor Database',
description='''Camera sensor width database path.''',
value=os.path.join(desc.Node.internalFolder, "colmap_database.db"),
value=os.path.join("{nodeCacheFolder}", "colmap_database.db"),
),
desc.File(
name='image_list_path',
label='Used Images',
description='''Used images (if from .sfm)''',
value=os.path.join(desc.Node.internalFolder, "used_images.txt"),
value=os.path.join("{nodeCacheFolder}", "used_images.txt"),
),
desc.File(
name='image_path',
label='Images Directory',
description='''Path to images directory.''',
value=os.path.join(desc.Node.internalFolder, "images"),
value=os.path.join("{nodeCacheFolder}", "images"),
),
]

Expand Down
2 changes: 1 addition & 1 deletion mrrs/nodes/colmap/FeatureMatching.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class ColmapFeatureMatching(desc.CommandLineNode):
name='database_path',
label='OutputDatabasePath',
description='Output database path.',
value=os.path.join(desc.Node.internalFolder, 'colmap_database_matches.db'),
value=os.path.join('{nodeCacheFolder}', 'colmap_database_matches.db'),
),
]

Expand Down
2 changes: 1 addition & 1 deletion mrrs/nodes/colmap/ImageUndistorder.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class ColmapImageUndistorder(desc.CommandLineNode):
name='output_path',
label='Ouptut Path',
description='''Output path path.''',
value=os.path.join(desc.Node.internalFolder),
value='{nodeCacheFolder}',
),
]

Expand Down
4 changes: 2 additions & 2 deletions mrrs/nodes/colmap/ImportColmapDepthMaps.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,15 @@ class ImportColmapDepthMaps(desc.Node):
name='depthMapFolder',
label='Depth maps folder',
description='Generated depth maps folder.',
value=desc.Node.internalFolder,
value='{nodeCacheFolder}',
),
#for viz
desc.File(
name='depth',
label='Depth maps',
description='Generated depth maps.',
semantic='image',
value=desc.Node.internalFolder + '<VIEW_ID>_depthMap.exr',
value='{nodeCacheFolder}/<VIEW_ID>_depthMap.exr',
),

]
Expand Down
8 changes: 4 additions & 4 deletions mrrs/nodes/colmap/Mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,27 +106,27 @@ class ColmapMapper(desc.CommandLineNode):
name='output_path',
label='BaseOutputPath',
description='Base Output path.',
value=desc.Node.internalFolder,
value='{nodeCacheFolder}',
),
desc.File(
name='output_path0',
label='OutputPath0',
description='Output path 0.',
value=os.path.join(desc.Node.internalFolder, "0"),
value=os.path.join("{nodeCacheFolder}", "0"),
group=""
),
# desc.File(
# name='cameras',
# label='Cameras',
# description='Ouptut camera file',
# value=os.path.join(desc.Node.internalFolder, "0", "cameras.bin"),
# value=os.path.join("{nodeCacheFolder}", "0", "cameras.bin"),
# group=""
# ),
desc.File(
name='database_path',
label='OutputDatabasePath',
description='Output database path',
value=os.path.join(desc.Node.internalFolder, 'colmap_database_mapper.db'),
value=os.path.join('{nodeCacheFolder}', 'colmap_database_mapper.db'),
),

]
Expand Down
8 changes: 4 additions & 4 deletions mrrs/nodes/colmap/Meshroom2ColmapSfmConvertions.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,27 +49,27 @@ class Meshroom2ColmapSfmConvertions(desc.CommandLineNode):
name='preparedSfm',#ugly hack to have an input that can change
label='preparedSfm',
description='SfMData file prepared for colmap.',
value=os.path.join(desc.Node.internalFolder, "prepared_sfm.json"),
value=os.path.join("{nodeCacheFolder}", "prepared_sfm.json"),
advanced=True,
),
desc.File(
name='output',
label='Output Folder',
description='Path to the output SfM Data file.',
value=desc.Node.internalFolder,
value='{nodeCacheFolder}',
),
desc.File(
name='imageDirectory',
label='Image Directory',
description='',
value=os.path.join(desc.Node.internalFolder, "images"),
value=os.path.join("{nodeCacheFolder}", "images"),
group=""
),
desc.File(
name='sparseDirectory',
label='Sparse Directory',
description='',
value=os.path.join(desc.Node.internalFolder, "sparse"),
value=os.path.join("{nodeCacheFolder}", "sparse"),
group=""
),
]
Expand Down
2 changes: 1 addition & 1 deletion mrrs/nodes/colmap/PatchMatchStereo.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class PatchMatchStereo(desc.CommandLineNode):
name='workspace_path',
label='OutputPath',
description='Output path.',
value=os.path.join(desc.Node.internalFolder, "workspace"),
value=os.path.join("{nodeCacheFolder}", "workspace"),
),

]
Expand Down
2 changes: 1 addition & 1 deletion mrrs/nodes/colmap/PoissonMesher.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class PoissonMesher(desc.CommandLineNode):
name='output_mesh',
label='OutputMesh',
description='Output mesh.',
value=os.path.join(desc.Node.internalFolder, "mesh_poisson.ply"),
value=os.path.join("{nodeCacheFolder}", "mesh_poisson.ply"),
),

]
Expand Down
4 changes: 2 additions & 2 deletions mrrs/nodes/colmap/StereoFusion.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ class StereoFusion(desc.CommandLineNode):
name='output_path',
label='OutputPath',
description='Output point cloud path.',
value=os.path.join(desc.Node.internalFolder, "workspace", "fused.ply"),
value=os.path.join("{nodeCacheFolder}", "workspace", "fused.ply"),
),


desc.File(
name='workspace_path',
label='Output Workspace Folder',
description='Output workspace path.',
value=os.path.join(desc.Node.internalFolder, "workspace"),
value=os.path.join("{nodeCacheFolder}", "workspace"),
),
]

Expand Down
6 changes: 3 additions & 3 deletions mrrs/nodes/depth_map/VizMVSNet.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def env_file(self):
name="outputFolder",
label="Output Folder",
description="Path to a folder in which the computed results are stored.",
value=desc.Node.internalFolder,
value='{nodeCacheFolder}',
),

desc.StringParam(
Expand All @@ -117,9 +117,9 @@ def env_file(self):
label='Depth maps',
description='Generated depth maps.',
semantic='image',
value=desc.Node.internalFolder + '<VIEW_ID>_depthMap.exr',
value='{nodeCacheFolder}/<VIEW_ID>_depthMap.exr',
group='',
)
),
]

def processChunk(self, chunk):
Expand Down
2 changes: 1 addition & 1 deletion mrrs/nodes/nerf/nerfstudio.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ class NeRFStudio(CondaNode):
name='output',
label='Output',
description='Output folder.',
value=desc.Node.internalFolder,
value='{nodeCacheFolder}',
group="",
),
]
Expand Down
2 changes: 1 addition & 1 deletion mrrs/nodes/nerf/nerfstudio_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ class NeRFStudioExport(CondaNode):
name='output-dir',
label='Output',
description='Output folder.',
value=desc.Node.internalFolder,
value='{nodeCacheFolder}',
),
]

Expand Down
2 changes: 1 addition & 1 deletion mrrs/nodes/reality_capture/ExportXMP.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class ExportXMP(desc.Node):
name='outputFolder',
label='Output folder',
description='Path to the XMP folder',
value=desc.Node.internalFolder,
value='{nodeCacheFolder}',
),
]

Expand Down
2 changes: 1 addition & 1 deletion mrrs/nodes/reality_capture/ImportXMP.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class ImportXMP(desc.Node):
name='outputSfMData',
label='outputSfMData',
description='Path to the outputSfMData.',
value=os.path.join(desc.Node.internalFolder, "outputSfMData.sfm"),
value=os.path.join("{nodeCacheFolder}", "outputSfMData.sfm"),
),
]

Expand Down
Loading