-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Custom CLI pipe #851
Comments
When using meshroom_photogrammetry you can to set a parameter directly from the command line: "--paramOverrides NODE.param=value" To add nodes, use 1) a Meshroom mg file created via the GUI (--pipeline graph.mg), 2) --save the default graph and manually edit it or 3) manually create your graph in the CLI by adding the nodes in the order you want, including parameters. Default parameters are used when no parameters are set. Parameters printed to the Meshroom GUI Log can be used as reference. Example (you need to adjust the path to your OS):
https://github.com/alicevision/AliceVision/wiki/CLI-Parameters |
Thanks but still struggling here. Let me see if I can restate the question. I would like to alter / edit / refine the default parameters / graph if possible. This will be running entirely headless / automated. We have a pipe already that takes populates inputs and the pipe runs CLI through to final output. We are creating directories with uid's, populating with input and output directories. We have a separate process that populates the inputs. We run meshroom and save the project.mg in the project directory. I get that we can create a new graph using GUI which we have done but for the life of me can not get it to load as the default or rather in place of the default graph so that it is saved as our project.mg The relevant portions of the script. Scaffold project file for meshroom project Thoughts? Thank you |
You should add "--pipeline path/to/your_custom_pipeline.mg" to your meshroom_photogrammetry command line. |
Hi @NexTechAR-Scott , |
Update. All working as intended and expected. Issue was unrelated, if part of my script failed it was not recovering cleanly. Thanks for the input. |
Hi @natowi, how to manually create graph in CLI? Could you give an example? |
@Sachet12345 use meshroom_photogrammetry with your graph created in the meshroom gui. |
Solved! - Meshroom CLI with custom node settings on Google Colab This solution was tested on Google Colab using a script from AB3D-Studio. Download the "RunMeshroom.ipynb" script file. You can check out the YouTube tutorial here for the complete setup. Steps:
Note: |
@vinayadatta thanks, I have added this to the wiki. |
@vinayadatta @natowi thank you! Could you add some more detail around replacing the file paths inside the MyMesh.mg file? Background: I'm using meshroom 2020.1.1 on my PC and the RunMeshroom.ipynb is using meshroom 2019.1.0 - not sure if this is an issue. When I open my adapted .mg file in colab I see what I think is where the program is looking for the images: So I copied the path to my images on google drive and replaced the above with: The only other path I see is: I ran this command under "Meshing" as suggested above (#7) And got back an error when I run: Any help would be appreciated. thank you. |
@RayzedByRobots, I believe you are in the right path but missing a few things..
Your sensor database path that you mentioned looks to be having totally different folders.. Everything under Meshroom/Meshroom-version should remain same.. I guess that would solve your issue.. If not I can help you more.. |
Great thanks I'll try right now to make your suggestions. One other quick question - how do you reset the notebook? Return it to its original form - it seems if you use the notebook a couple times or change something it doesn't like - errors like "can't create a file because it already exists" start to show up which are hard to get rid of. |
@vinayadatta - I followed your 1-3 above - I didn't understand "Try to extract or copy your Meshroom in your drive folder so that you don’t need to extract for every time." - but let's hold off on that for now if it is not critical to things working I got a little farther, but it is still not working yet - more background - I am running the default meshroom nodes with featureExtraction on high and with guidedMatching turned on. Review:
In Meshing, I used the command: I get back an error: Does this error have to do with a version conflict? My .mg file was made on meshroom 2020.1.1 and the notebook uses 2019.1.0 If so can someone provide a link to a notebook that uses 2020.1.1? I would rather do that than to uninstall 2020.1.1 from my PC. or if there is another way. THANKS!! |
Don´t mix versions. mg files are not backward compatible. There is some forward compatibility, but it is not recommended.
You can use multiple Meshroom versions on one computer. It should be no problem to change the notebook to the 2020 version. Please open a new issue if you have any issues with that. |
Ok thank you for the reply. I'll try to get the versions to match. Thanks |
Hi, one question: What is the recommended way of running a custom pipeline: e.g: I want to call the different nodes: cameraInit, featureExtraction,... but in some intermediate steps call to custom python scripts which manipulate some data. I have written a BASH file which call them and create the folders for the input/output storage, but in the deptMapFilter stage I have observed that meshroom iterates with different parameters probably to fit the value. How can I take it into account or where is a script to call this commandLine instructions so I can modify for my custom pipeline? Thank you |
The easiest way would be to create your custom nodes and implement your custom steps in it. |
But how are the nodes supposed to be run through the pipeline? I have already created a couple of custom nodes in .py and in the GUI I connect them to the rest of default nodes and the results are OK. |
Open a new project in gui mode Set your nodes the way you want. Save Navigate to project folder and find graphfile.mg That is your saved node settings call that from your batch |
graphfile.mg calls the individual nodes and tells them what to do. it is effectively the batch file you are looking for don’t make this harder than it needs to be by reinventing the wheel |
And where is this "graphfile.mg"? I only see my project "projectName.mg", do you refer to that? Because it is a JSON. Thank you. |
that’s it name changed when you saved as if you open a fresh project and check the folder before saving you will see the default name the beauty of doing it this way is you can create as many custom graphs as you want for specific purposes / object types and call them as needed youll have to pass some path parameters to it like where to import the data set from or use a drop / watch folder meaning graphfile is set to import from a default location obviously you’ll want to do some cleanup in that folder when the process completes |
and then I run the meshroom_batch.exe with these graph.mg? Which parameter would it be? meshroom_bath.exe --overrides graphfile.mg?? |
Aham is meshroom_compute right? Thank you very much. |
Sorry, had one of those days and had no time to assist on this. I’ve run an automated solution for this on linux. Happy to share those scripts which you should have no trouble porting to windows I may need a day or two to dig them |
Ok, thank you very much. You mean the current issue or the new one I've referenced (#1656). |
Meshroom 2019.2.0 on Linux
Running pure CLI pipe.
For changing node parameters I've been dropping uncompiled .py from the Develop branch in place of the compiled nodes from the release.
Works great.
I'd like to add a denoise and decimate node to the pipe but for the life of me I can not figure out where or how to create a custom base project.mg
I've spent a good deal of time looking and this does not seem to be documented anywhere.
Thank you for any leads you may be able to provide.
The text was updated successfully, but these errors were encountered: