-
Notifications
You must be signed in to change notification settings - Fork 0
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
Refactor Code For new Plugin System #30
Open
mh0g
wants to merge
30
commits into
main
Choose a base branch
from
refacto_for_plugin
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+3,973
−3,225
Open
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
e7e5a74
doc and renamed gaussian splatting
a959c64
modified mvsnet for plugin
903e591
massive reorganisation
0cfb4e8
updated meshroomPlugins.json
b80b9f9
Update .gitmodules
mh0g 649cdfb
typo
1c8d2fe
updated setup.py to only install core lib, cleanup and renaming for core
631c50e
moved pipelines
e08b839
modified relative import in benchmark
e42b3ae
moved back and started cleanup in deep feature matching
c5a1fad
changed blender folder
b150a72
calibration comparison cli
d671305
fixed reality capture for new plugin system
029c2f3
prepared depth map comparison
38f5615
ported load dataset
9c53d64
ported meshcomparison
c838f21
cleanup colmap and blender
49d6fd8
added blender
183ef3b
cosmetics
43ec97c
added try catch to avoid meshroom import crash
9a96cb5
added deep feature
22580b9
added gpu flag
99512ae
added flag
80a3819
port colmap
ee52dcd
continued on refacto
17476b4
fixed deep_feature
e688db9
util fixes
53f1df7
fixes
0424b5a
fixes extrinsics and export xmp
86f6919
fix xmp
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,3 @@ | ||
[submodule "mrrs/deep_mvs/robust_mvd/robustmvd"] | ||
path = mrrs/deep_mvs/robust_mvd/robustmvd | ||
url = https://github.com/lmb-freiburg/robustmvd | ||
[submodule "mrrs/implicit_mesh/instant_ngp/instant-ngp"] | ||
path = mrrs/implicit_mesh/instant_ngp/instant-ngp | ||
url = https://github.com/NVlabs/instant-ngp.git | ||
[submodule "mrrs/depth_maps/vismvsnet/Vis-MVSNet"] | ||
path = mrrs/depth_maps/vismvsnet/Vis-MVSNet | ||
[submodule "mrrs/deep_depth_map/Vis-MVSNet"] | ||
path = mrrs/deep_depth_map/Vis-MVSNet | ||
url = https://github.com/jzhangbs/Vis-MVSNet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
[ | ||
{ | ||
"pluginName":"3DR_Benchmark", | ||
"nodesFolder":"mrrs/3DR_benchmark", | ||
"pipelineFolder":"mrrs/3DR_benchmark/pipelines" | ||
}, | ||
{ | ||
"pluginName":"Blender", | ||
"nodesFolder":"mrrs/blender" | ||
}, | ||
{ | ||
"pluginName":"Colmap", | ||
"nodesFolder":"mrrs/colmap", | ||
"pipelineFolder":"mrrs/colmap/pipelines" | ||
}, | ||
{ | ||
"pluginName":"Gaussian_Splatting", | ||
"nodesFolder":"mrrs/gaussian_splatting" | ||
}, | ||
{ | ||
"pluginName":"Deep_Depth_Maps", | ||
"nodesFolder":"mrrs/deep_depth_map" | ||
}, | ||
{ | ||
"pluginName":"Deep_Feature_Matching", | ||
"nodesFolder":"mrrs/deep_feature_matching" | ||
}, | ||
{ | ||
"pluginName":"Nerf_studio", | ||
"nodesFolder":"mrrs/nerf" | ||
}, | ||
{ | ||
"pluginName":"Reality_Capture", | ||
"nodesFolder":"mrrs/reality_capture", | ||
"pipelineFolder":"mrrs/reality_capture/pipelines" | ||
}, | ||
{ | ||
"pluginName":"Stereo_Photometry", | ||
"nodesFolder":"mrrs/stereo_photometry" | ||
}, | ||
{ | ||
"pluginName":"Utils", | ||
"nodesFolder":"mrrs/utils" | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add space for indentation to be conform with the preceding. |
||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
""" | ||
This node runs comparison between two input calibration. | ||
""" | ||
__version__ = "3.0" | ||
|
||
|
||
import os | ||
|
||
from meshroom.core import desc | ||
from meshroom.core.plugin import PluginCommandLineNode, EnvType | ||
|
||
class CalibrationComparison(PluginCommandLineNode): | ||
category = 'MRRS - Benchmark' | ||
|
||
documentation = '''For each camera, compare its estimated parameters with a given groud truth.''' | ||
|
||
commandLine = 'python "'+os.path.join(os.path.dirname(__file__), "calibration_comparison.py")+'" {allParams}' | ||
|
||
envFile = os.path.join(os.path.dirname(__file__), "general_env.yaml") | ||
envType = EnvType.CONDA | ||
|
||
inputs = [ | ||
desc.File( | ||
name='inputSfM', | ||
label='SfMData', | ||
description='SfMData file.', | ||
value='', | ||
), | ||
|
||
desc.File( | ||
name='inputSfMGT', | ||
label='GtSfMData', | ||
description='Ground Truth SfMData file.', | ||
value='', | ||
), | ||
|
||
desc.ChoiceParam( | ||
name='metrics', | ||
label='Metrics', | ||
description='Metrics to be used in the comparison.', | ||
value=['MSECameraCenter'], | ||
values=['MSECameraCenter','AngleBetweenRotations','MSEFocal', 'MSEPrincipalPoint', 'validCams'], | ||
exclusive=False, | ||
joinChar=',', | ||
), | ||
|
||
desc.StringParam( | ||
name='csvName', | ||
label='CsvName', | ||
description='Name for the csv file to be used.', | ||
value="calibration_comparison.csv", | ||
), | ||
|
||
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, | ||
), | ||
] | ||
|
||
outputs = [ | ||
desc.File( | ||
name='outputFolder', | ||
label='Output Folder', | ||
description='Output folder for generated results.', | ||
group="", | ||
value=desc.Node.internalFolder, | ||
), | ||
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), | ||
) | ||
] | ||
|
||
def check_inputs(self, chunk): | ||
""" | ||
Checks that all inputs are properly set. | ||
""" | ||
if not chunk.node.inputSfM.value: | ||
chunk.logger.warning('No inputSfM in node, skipping') | ||
return False | ||
if not chunk.node.inputSfMGT.value: | ||
chunk.logger.warning('No inputSfMGT in node, skipping') | ||
return False | ||
return True | ||
|
||
def processChunk(self, chunk): | ||
""" | ||
Computes the different metrics on the input and groud truth depth maps. | ||
""" | ||
chunk.logManager.start(chunk.node.verboseLevel.value) | ||
if not self.check_inputs(chunk): | ||
raise RuntimeError("Missing arguments") | ||
super().processChunk(chunk) | ||
chunk.logger.info('Calib comparison ends') | ||
chunk.logManager.end() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
__version__ = "3.0" | ||
|
||
import os | ||
from meshroom.core import desc | ||
from meshroom.core.plugin import PluginCommandLineNode, EnvType | ||
|
||
class DepthMapComparison(PluginCommandLineNode): | ||
|
||
category = 'MRRS - Benchmark' | ||
|
||
documentation = '''For each camera, compare its depth maps to a given ground truth. | ||
The names of the original inputSfM file is used to retrieve the GT file, therefore must match. | ||
The depth maps are assumed to be estimated with the same inputSfM poses. | ||
Autorescale may be used otherwise but it is far from ideal. | ||
''' | ||
|
||
commandLine = 'python "'+os.path.join(os.path.dirname(__file__), "depth_map_comparison.py")+'" {allParams}' | ||
|
||
envFile = os.path.join(os.path.dirname(__file__), "general_env.yaml") | ||
envType = EnvType.CONDA | ||
|
||
inputs = [ | ||
desc.File( | ||
name='inputSfM', | ||
label='SfMData', | ||
description='SfMData file.', | ||
value='', | ||
), | ||
|
||
desc.File( | ||
name="depthMapsFolder", | ||
label="DepthMaps Folder", | ||
description="Input depth maps folder.", | ||
value="", | ||
), | ||
|
||
desc.File( | ||
name="depthMapsFolderGT", | ||
label="GT DepthMaps Folder", | ||
description="Input ground truth depth maps folder.", | ||
value="", | ||
), | ||
|
||
desc.ChoiceParam( | ||
name='metrics', | ||
label='Metrics', | ||
description='Metrics to be used in the comparison.', | ||
value=['RMSE', 'MAE', 'validity_ratio'], | ||
values=['RMSE', 'MAE', 'validity_ratio'], | ||
exclusive=False, | ||
joinChar=',', | ||
), | ||
|
||
desc.BoolParam( | ||
name='autoRescale', | ||
label='Auto Rescale', | ||
description='''Will attempt to find a scale factor between GT depth maps and estimated depth maps. To be used when the depth maps have not been estimated from the same camera coordinate system.''', | ||
value=False, | ||
), | ||
|
||
desc.StringParam( | ||
name='maskValue', | ||
label='Mask Value', | ||
description='''If this is not None, will mask the pixels with value bellow this (in gt and estimated).''', | ||
value='0', | ||
), | ||
|
||
desc.StringParam( | ||
name='csv_name', | ||
label='CsvName', | ||
description='Name for the csv file to be used.', | ||
value="depth_map_comparison.csv", | ||
group="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, | ||
), | ||
] | ||
|
||
outputs = [ | ||
desc.File( | ||
name='output', | ||
label='Output', | ||
description='Output folder for generated results.', | ||
value=desc.Node.internalFolder, | ||
), | ||
|
||
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), | ||
) | ||
] |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Formatting issue: a tab '\t' is used as indentation before the first element, whereas spaces are used in the rest of the document.
Fix suggestion: replace the tab with spaces to preserve consistency.