Commit graph

112 commits

Author SHA1 Message Date
Yann Lanthony
7eab289d30 [core] Graph: initial refactoring of graph loading API and logic
* API
Instead of having a single `load` function that exposes in its API
some elements only applicable to initializing a graph from a templates,
split it into 2 distinct functions: `load` and `initFromTemplate`.
Apply those changes to users of the API (UI, CLI), and simplify Graph
wrapper classes to better align with those concepts.

* Deserialization
Reduce the cognitive complexity of the deserizalization process
by splitting it into more atomic functions, while maintaining the
current behavior.
2025-02-06 16:46:04 +01:00
Candice Bentéjac
2b590c383a [bin] Import correct Graph objects for meshroom_batch 2024-09-16 16:41:39 +02:00
Candice Bentéjac
07b65499ce [bin] meshroom_newNodeType: Remove all invalidate= arguments
`invalidate` does not need to be specified anymore and is set to `True`
by default. Output attributes with `invalidate=True` are handled at the
attribute-level.
2024-09-12 10:54:17 +02:00
Candice Bentéjac
e5ac6bd0dc [bin] meshroom_newNodeType: Replace uid= with invalidate= 2024-09-12 10:41:56 +02:00
Fabien Castan
c792b2baee Improve meshroom_batch help message with groups 2024-08-31 12:44:17 +02:00
Fabien Castan
674674e1c6 Add -s shortcut 2024-08-31 12:11:08 +02:00
Fabien Castan
9d414eda2f Add MESHROOM_SUBMIT_LABEL to customize the label of a node when submitted on renderfarm 2024-08-31 11:53:37 +02:00
Candice Bentéjac
c3648731b9 [bin] meshroom_batch: Initialize core plugins only when needed 2024-08-01 10:47:07 +01:00
Fabien Castan
0e90915a82 [bin] compute: preprocess/postprocess calls are missing 2024-07-18 20:06:11 +02:00
Fabien Servant @ TCS
98780160aa Ion version retrieval 2024-07-16 14:36:31 +02:00
Vincent Demoulin
a6be4e4938 Create Init functions for nodes, submitters and pipelines 2024-07-05 15:46:58 +02:00
Candice Bentéjac
2b8500666c Rename jobs with "[Meshroom] Job Title" instead of "Job Title [Meshroom]" 2024-03-26 10:08:54 +01:00
Candice Bentéjac
7e28d0f540 [bin] meshroom_batch: Add support for relative input and output paths
Up to this commit, `meshroom_batch` only supported absolute input and
output paths: using relative ones led to a failure during the execution
of the `CameraInit` node.

Now, if relative paths are provided by the user, they are automatically
converted to absolute ones, thus ensuring that everything will run
smoothly.
2023-10-09 18:05:05 +02:00
Candice Bentéjac
07a9f8a3f2 [bin] meshroom_batch: Fix input parsing for Windows 2023-09-12 18:38:45 +02:00
Loïc Vital
a4e8e189e6 [bin] meshroom_batch: remove redundant --scale argument 2023-08-01 12:55:17 +02:00
Loïc Vital
ef73d769f6 [bin] meshroom_batch: factorize input parrsing code 2023-08-01 12:54:15 +02:00
Loïc Vital
49479b3183 [bin] meshroom_batch: shorter syntax when unique init node 2023-08-01 12:37:03 +02:00
Loïc Vital
91f3abdeaa [bin] meshroom_batch: support multiple init nodes 2023-08-01 11:44:48 +02:00
Candice Bentéjac
1f75ccaf5f [bin] meshroom_batch: Save graph once it has been all set up and resolved
If the "save" argument has been provided, the graph should be saved
outside of the `GraphModificatioǹ event, once it has been set up entirely
and resolved.

When it is saved within the `GraphModification`, UIDs are not yet
available.

This does not cause any issue for the rest of the execution if the graph
is to be computed locally, since the UIDs will be computed right
after (but the UIDs will still never be written in the project file).
However, when submitting the graph to a renderfarm, the project file is
loaded again. If it does not contain any UID:
 - all the nodes will present the `UidConflict` compatibility issue
 - key errors will be raised when trying to apply the links between nodes
since they contain direct references to UIDs, which cannot be resolved as
they are not present in the project file.
2023-06-30 18:59:32 +02:00
Candice Bentéjac
be4c02f515 [bin] Fix all the scripts that had errors
- `meshroom_submit`: the submission to the render farm is now effective
(the script did not work at all).
- `meshroom_status`: the `--toNode` option did not work and caused errors.
- `meshroom_statistics`: some adjustments needed to be made for the script
to run with Python3 instead of Python2, an issue in the core/stats.py file
led the `statistics` file to never being read correctly, and the calls
to the Matplotlib API were outdated.
2023-04-24 16:43:01 +02:00
Candice Bentéjac
99b82e601f Ignore "Publish" nodes when loading a template unless specified otherwise
This commit adds an option to the "load" method, "publishOutputs", that
determines whether "Publish" nodes in a template project file should be
ignored during the graph's creation.

If "publishOutputs=True", then the "Publish" nodes from the template will
be added to the graph. "Publish" nodes in a project file that is not
a template will not be affected by this and will always be added to the
graph, as any other node.

This allows to have templates that are compatible with meshroom_batch,
which requires a "Publish" node when the --output option is specified,
while not having unneeded nodes in the UI or unneeded operations:
when --output is specified in meshroom_batch, "publishOutputs=True",
otherwise it will be set to False so that the "Publish" nodes are not
executed needlessly.
2023-02-27 18:34:51 +01:00
Candice Bentéjac
8bef398bed Remove workarounds and backports for Python 2 support
In particular:
- In common/, remove the backport of weakref.WeakMethod
- In docs/ and ui/, use the standard FileNotFoundError class
- Use built-in open() instead of io.open(), and stop importing io
- In core/stats.py, use the standard implementation of xml.etree instead
of the C one
2022-12-05 17:16:21 +01:00
Candice Bentéjac
eac43c84c3 [submitters] Add an option to update the job title on submitters 2022-12-05 15:23:10 +01:00
Fabien Servant @ TCS
4f816ee850
update ion startup
Provides a shebang for ion run
Remove alicevision_root which is not usefull anymore
2022-11-04 13:54:32 +01:00
Fabien Servant @ TCS
84e6bdb869
Update startup script for ion
Add ALICEVISION_ROOT to env in startup script
2022-10-19 18:35:04 +02:00
Fabien Servant
06aa16243d [ION] wrong variable in script 2022-09-26 08:42:19 +01:00
Fabien Servant
595bf4aa1b [ION] adding qt plugin path 2022-09-26 08:39:59 +01:00
Fabien Servant
263c806bfe [bin] add ion script for launch 2022-09-16 12:30:35 +01:00
Matthieu Hog
f491b5a77b removed duplicated call to findnodes 2022-09-06 10:57:29 +02:00
Candice Bentéjac
659c8a05ed Add abstract InitNode
InitNode is an abstract class which is meant to be inherited
by all the initialization nodes (such as CameraInit), included
those that might be created by the user.

InitNode contains methods that can be reimplemented by the
children classes if necessary.

This abstract class allows to keep on using scripts such as
meshroom_batch without having to modify them specifically or
being limited to using a CameraInit node.
2022-08-05 10:42:59 +02:00
Candice Bentéjac
8fb0c778d1 Add support for external pipelines using project files
- Support loading external pipelines as templates with project files
- Add template files for some standard pipelines
- Remove the hard-coded generation of new pipelines
- Update multiviewPipeline test: the multiviewPipeline test relied on the hard-coded generation of
pipelines.
2022-07-12 14:56:24 +02:00
Fabien Castan
fd4851b7e9 [bin] batch: allow to set params inside groups 2022-04-06 10:46:08 +02:00
Fabien Castan
22a2bbdf2a [bin] newNodeType: update
- allow executable with multiple arguments
- force utf8 conversion
- fix typo in help
2022-02-22 15:35:37 +01:00
Fabien Castan
e5b82cb137 [bin] meshroom_batch: Add verbose option 2021-10-19 15:48:41 +02:00
Fabien Castan
ae0c65f563 [core] do not use the task manager in batch command line tools
Avoid usage of multi-threading to launch the computation in command line
tools without interactive needs
2021-10-19 15:48:07 +02:00
Remy Mellet
d30571ce7d Draft Reconstruction pipeline 2021-09-13 10:36:46 +02:00
Fabien Castan
0ddda9f982 [multiview] new experimental pipeline for camera tracking 2021-04-16 10:45:57 +02:00
Fabien Castan
3d5ec8b5e9
[bin] meshroom_batch: fix typo in pipeline names
Fix #1376
2021-04-13 16:47:30 +02:00
wolfgangp
43b3b5af98
[bin] Use sys.exit (#1312) 2021-04-09 13:47:33 +02:00
Fabien Castan
37ffd7f990 [bin] rename meshroom_photogrammetry as meshroom_batch 2021-02-24 22:38:25 +01:00
Fabien Castan
37d3008f9e [core] rename nodesOfType 2021-01-22 13:12:29 +01:00
Fabien Castan
1102ce84e0 Merge branch 'develop' of github.com:alicevision/meshroom into dev/nodesAndTaskManager
Conflicts:
	meshroom/core/graph.py
	meshroom/ui/qml/main.qml
2020-12-01 20:02:43 +01:00
Fabien Castan
589856ecdc Rename hdri into panoramaHdr 2020-09-05 01:16:51 +02:00
Fabien Castan
69e9495d63 [bin] compute: No warning if we are computing as EXTERN and the node is SUBMITTED 2020-09-04 19:53:06 +02:00
Julien-Haudegond
3f3a6c0e83 [core/bin] Submitting: remove a duplicate function and move another one 2020-09-03 18:23:55 +02:00
Julien-Haudegond
201ab0b5fb [bin] replace the executeGraph method by a task manager 2020-08-27 11:49:24 +02:00
Fabien Castan
e404fce7d1 [bin] meshroom_photogrammetry: add hdriFisheye 2020-06-01 16:10:38 +02:00
Fabien Castan
9775924df0 [bin] photogrammetry: reduce the number of updates with "GraphModification" group 2019-12-16 20:07:31 +01:00
Fabien Castan
b3653aaae2 [bin] meshroom_photogrammetry: add submit on renderfarm 2019-12-13 20:24:41 +01:00
Fabien Castan
180a2565e1 [bin] meshroom_photogrammetry: add hdri pipeline option 2019-12-13 20:24:25 +01:00