Skip to content

pass use_pba to mapper to use GPU #197

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

Closed
wants to merge 1 commit into from
Closed

Conversation

oldshuren1
Copy link

No description provided.

@reynoldscem
Copy link

I've made a similar change locally. It's worth noting that if your problem gets big enough COLMAP will fall-back to the CPU version of PBA which is ~an order of magnitude slower. You can remove the check in COLMAP to always use the GPU if you are comfortable with risking the worse numerical stability.

@oldshuren1
Copy link
Author

Think you mean in controller/incremental_mapper.cc:68 checking for ParallelBundleAdjuster::IsSupported?

I also found that if the camera mode is single, pba is also not used. But using single camera itself can reduce a lot of time.

@reynoldscem
Copy link

No I don’t mean that. There’s a check on the number of residuals in the problem hardcoded. I’ll have a look for it on Monday if you can’t find it.

@sarlinpe
Copy link
Member

sarlinpe commented Jun 3, 2022

Since IncrementalMapperOptions has many other useful options, I would prefer to instead provide a flexible mechanism to modify any of these options from the command line, just like COLMAP accepts --Mapper.ba_global_pba_gpu_index 1. This could be later extended to the ImageReaderOptions.

@sarlinpe
Copy link
Member

This should be solved by #210. Can you please confirm that it works for you?

@sarlinpe sarlinpe closed this Jul 27, 2022
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.

4 participants