-
Notifications
You must be signed in to change notification settings - Fork 126
added gpu support #174
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
added gpu support #174
Conversation
Sorry, I am not good for advance coding, but I really appreciate this PR. Please @lpanaf consider to merge it when it ready. |
CMakeLists.txt
Outdated
@@ -1,6 +1,6 @@ | |||
cmake_minimum_required(VERSION 3.28) | |||
|
|||
project(glomap VERSION 1.0.0) | |||
project(glomap_gpu VERSION 1.0.0) |
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.
Let's keep the original project name.
We should add an option to enable/disable CUDA support (similar to how colmap works).
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.
Hi, I was fixed the naming back to glomap. The commit has the GlobalPositioning.use_gpu and BundleAdjustment.use_gpu options in option_manager.cc
Hi @min-hieu-netropy, thank you very much for this pull request. I was checking your code and figured that the min_num_images_gpu_solver for the global positioning step and the bundle adjustment step are set to be 1000, 300. Did you run any experiments to choose this number? If not, I would prefer to keep it consistent with the heuristic number set by COLMAP (50 in this case) |
Hi, I originally put in the colmap number but wanted to experiment with different datasets so I made it 1000 and 300. However feel free to change it. |
i added: '--GlobalPositioning.use_gpu 1 to my script. But when running it i get this error: 'I20250318 20:11:45.942935 31020 image_undistorter.cc:20] Undistorting images.. I get this when running 'colmap -h' This when running 'glomap -h' Don't know what i did wrong. I appreciate any form of help. Thx! |
Hi, it seems like you're using a ceres version without CUDA support. You can try building ceres (version >= 2.3) from source and try again. |
How much VRAM do I approximately need? I was able to run it successfully with 3600 images, but I get an error when I use 6000 or 9000. Is this because I don't have enough VRAM? My VRAM is 16GB.
|
This exception might also happen even with just 1000 photos. |
added gpu support to global positioning and bundle adjustment
stats on a 1k image data set with exhaustive matching on RTX4090:
I think the performance gain would be much higher on bigger dataset since the gpu utilization is only ~20% when I run these tests. Also, global positioning seems to benefit the most from GPU usage