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
Dense reconstruction without CUDA #192
Comments
Hello, I also come across the problem like you. I compile the whole program successfully on my ubuntu (Parallel Desktop Virtue Machines without cuda), but I can just run sfm successfully and when I run mvs to get stereo maps, it will display cuda not found. I don't know where the problem is and I set the gpu index = -1 to only use cpu. But it doesnn't work. |
Dense reconstruction is only implemented on the GPU using CUDA. A CPU implementation would be too slow. If you do not have access to a CUDA-enabled GPU, you could use CMVS/PMVS as described in the documentation here https://colmap.github.io/tutorial.html#dense-reconstruction Let me know if you have other questions. |
But what about OpenCL? It's supported on much wider range of hardware, and seems a viable alternative to use on CUDA-less systems. |
I'll chime in on this, even though the report is closed. I'd also like an OpenCL and/or CPU version of patch_dense_stereo, even if the performance penalty would be big. I only have a single rig with a CUDA system and it's remote (not really convenient to use, not with the GUI at least). All the laptops I have access to don't have it either as it's mostly intel HD graphics. I'm now using colmap for sparse reconstruction, and OpenMVS for the rest. It's a bit slow, but it's actually not too bad for the datasets I've thrown it at so far. |
@wavexx I am also a bit frustrated that my Mac cannot use its GPU for dense reconstruction... :( But curious about the OpenMVS, do you have article / vlog / tutorial to show how it is done? So far, I collect only the sparse point cloud... they are ok, but I need to mesh them somewhat and would be nice to be able to process the dense data. |
Here you can find explanation on using OpenMVS (dense+mesh+texture) with COLMAP |
CPU implementation of the MVS part of COLMAP |
This is fantastic. How does it compare in terms of speed?
|
I was able to get COLMAP and pmvs2 going on my c. 2018 Hackintosh with only the iGPU (no CUDA). I already had command line developer tools. Homebrew makes it possible for a non-programmer like me. (1) (2) this wasn't easy to build from source, not knowing much at all, but homebrew really helped. I had to install tons of packages from homebrew. I got stuck on jpeglib.h which eventually I got with a homebrew install of gtk+. eventually I had to install clapack manually as it's not in homebrew and then a compiled pvms2! and it worked on my colmap output! cmvs didn't compile because of an error (some unknown fopenmp compile flag), but I didn't need it as I was only working with 15 images. |
one more thought. it looks like openMVS just added support for COLMAPs sparse output. I will try it out when I have time. right now pmvs2 is crunching away. |
Very slow. When @ahojnnes says a CPU implementation would be too slow... he isn't joking. I have dual Xeon Platinum 8360m CPUs. That gives me 48 physical cores. Xeon Gold and Platinum CPUs have 2 AVX512 FMA units per core, whereas all other intel CPUs with AVX512 have only one per core. Ultimately, I have 96 physical AVX512 units on my workstation capable of running at 2.6GHz (AVX cores run at a lower turbo speed, this is common to all intel CPUS). With my 96 AVX512 FMA cores, I manage about 8% the performance of a AMD Radeon 6900 XT running OpenCL for a raytracing workload. A raytracing workload is much more forgiving to CPUs than colmap's dense reconstruction algorithm is. Of course, the difference will be even more asymmetric if you don't have 96 AVX512 FMA units at your disposable. Any CPU that has an IGPU will have as many as you have cores (not threads). So if you, say, have an 8 core cpu, even allowing for the higher turbo frequency, you should expect between 1-2% the performance of AMD Radeon 6900 XT. Using an AMD Radeon 6900 XT, dense reconstruction workloads for complex scenes can still take many hours or even a couple of days using MetashapePro (commercial photogrammetry software with an OpenCL kernel) as reference. I believe it implements a similar algorithm but I am not sure. |
Telling from the code: https://github.com/colmap/colmap/blob/master/src/controllers/automatic_reconstruction.cc#L237, it seems not possible to do dense reconstruction without CUDA. But my mac does not have a Nvidia graphic card. Any workaround?
The text was updated successfully, but these errors were encountered: