openphotogrammetry / meshroomcl

MeshroomCL: An OpenCL implementation of photogrammetry with the Meshroom interface
Other
173 stars 8 forks source link

No GPU usage when running StructureFromMotionCL/"No GPU" showing in statistics tab. #30

Open xzuyn opened 2 years ago

xzuyn commented 2 years ago

i3-6100 RX 480 8G 16GB RAM

I get "Using 3 CPU thread(s) for feature extraction." at the beginning and my CPU starts working away, but I have my GPU selected in the StructureForMotionCL node. meshroomCL_colmap.exe is running ~80% CPU, while the GPU is 0%. meshroom.exe uses ~10% GPU but that seems to just be to render the 3d viewport.

I assume this is related; in the statistics tab for said node it shows "No GPU", while showing CPU stats.

Please let me know what info you need to solve this.

revisionarian commented 2 years ago

Hi @xzuyn, thanks for trying out MeshroomCL! The processing performed within the StrucutreFromMotionCL node actually includes three distinct sub-steps: 1) Feature extraction 2) Feature matching 3) Bundle adjustment

Of these three steps, only the second (feature matching) uses the GPU; the rest of the processing for this node is done on the CPU. In the log message for the StructureFromMotionCL node, you will see a section titled "Exhaustive feature matching" which should list the OpenCL devices that were used for this step.

Unfortunately, the Statistics tab is not working for some GPUs, including your RX 480 (see issue #12). We are aware of this problem, and will hopefully get it fixed in a future release of MeshroomCL. In the meantime, you could use the Windows 10 Task Manager to monitor the GPU usage, or download a Radeon GPU monitoring tool from AMD.

Other than the issue with monitoring GPU stats, is MeshroomCL working successfully to reconstruct your images?

xzuyn commented 2 years ago

Apologies, I did not realize only one part of the node was accelerated. I'm now seeing that its being accelerated during the second part. Apart from what you've mentioned the only issue I've been having consistently is program crash at startup. It feels completely random as I will open the program 4-5 times before it stays open. Sometimes it stays open first try, other times it crashes ~10 times before staying open. (I can open a separate issue for this).

xzuyn commented 2 years ago

Also after double clicking the texturedCL(?) node (the last one) my window will start bugging out and flicker. The rest of my PC is fine, only the main meshroom window. I forgot to add in the main comment that I'm running in compute mode.

revisionarian commented 2 years ago

Hi @xzuyn, sorry to hear about these two further issues for you running MeshroomCL.

You mentioned that you have to open MeshroomCL 4-5 times on average before it stays open. Wow, we have never heard of this problem before! Can you test if you have the same problem when you try to open the CUDA version of Meshroom (available here: https://github.com/alicevision/meshroom/releases) ?

You also mention that double-clicking the TexturingCL node causes the window to flicker. When you double-click the TexturingCL node, MeshroomCL will start to load the textured mesh to display in the 3D window. Does the textured mesh eventually show up in the window? If your mesh is very large or has many gigabytes of texture data, then loading and displaying the textured mesh can be very demanding on your GPU.

As an alternative to double-clicking on the TexturingCL node to view your mesh, you can instead right-click on the node and select the "Open Folder" option to access the *.obj file and load it into any other 3D viewing program that you want to use.

xzuyn commented 2 years ago

CUDA version does the same thing on startup. It opens, maybe it'll seem fine for a moment or a few seconds, but then it hang for a moment and crashes.

The model does come up, but its at the same time the issue occurs. I don't think the models we're very large, but maybe they were, I'll have to test.

Using AMD Drivers 21.1.1 (Can't update to latest due to dependencies for other random things)

revisionarian commented 2 years ago

If the CUDA version has the same start-up problems, and perhaps the same flickering display problems (?), then I would recommend posting an issue on the main Meshroom GitHub repository (https://github.com/alicevision/meshroom). Our work on MeshroomCL inherits most of the GUI and 3D display widget stuff directly from the original Meshroom code.