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

[software] Do not fail if range start is larger than the number of views #1457

Merged
merged 3 commits into from
Jun 9, 2023

Conversation

cbentejac
Copy link
Contributor

@cbentejac cbentejac commented Jun 7, 2023

Description

Related Meshroom pull request: alicevision/Meshroom#2039

This PR changes the behaviour of nodes with chunks that check the validity of the ranges they are provided with. Instead of causing an EXIT_FAILURE when the starting point of the range exceeds the number of views in the SfMData, we detect whether the size of the range with this starting point is negative (which means that the chunks were created based on erroneous information), and skip the computations before returning EXIT_SUCCESS.

This allows to use chunks after nodes whose announced size does not always correspond to the reality, because their number of outputs cannot be precisely determined before their computation.

This PR affects the PrepareDenseScene and FeatureExtraction executables.

For cases where a node declares a size that is bigger than it actually is,
the start of ranges might exceed the number of views in the SfMData.

Instead of causing an EXIT_FAILURE, we detect that the size of the range
is incorrect to proceed with computations, and return EXIT_SUCCESS.

This allows to use nodes such as the `KeyframeSelection`, for which the
number of outputs can rarely be known before the end of the computations:
if the number of chunks for `PrepareDenseScene` and `FeatureExtraction` is
too large for the actual size of `KeyframeSelection`, then we keep on
going through the pipeline instead of failing.
@cbentejac cbentejac force-pushed the dev/chunkableKeyframeSelection branch from 07eaa88 to 222b020 Compare June 8, 2023 07:28
@fabiencastan fabiencastan merged commit 386d7ac into develop Jun 9, 2023
@fabiencastan fabiencastan deleted the dev/chunkableKeyframeSelection branch June 9, 2023 06:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants