Open TheTioz opened 3 years ago
interesting: you have plenty of RAM, but the CPU has also lots of cores, so in the end 64GB might not be that much
pls try using --max-threads 8
in the command line and see if it helps
if not pls share the MVS scene and images
Hello, thank you very much for the help. I already tried to run with less thread. With 8 and even 1, it uses maximum 11GB of ram and crash at the same spot.
In order to simplify the process I have just ran everything using the gerrard-hall datasets (the smallest one). I started only from the image folder and ran the command that you can find in the script.txt file included with the mvs in the zip file,
By the way i tried both the --use-cuda 0 and --use-cuda 1 flag but I realized that in the created log file it fail in both case with a cuda error! It seems that the cuda flag is ignored for the second part of program.
16:49:39 [App ] Build date: Jun 23 2021, 16:23:00
16:49:39 [App ] CPU: AMD Ryzen 9 5950X 16-Core Processor (32 cores)
16:49:39 [App ] RAM: 62.81GB Physical Memory 0B Virtual Memory
16:49:39 [App ] OS: Linux 5.12.12-arch1-1 (x86_64)
16:49:39 [App ] SSE & AVX compatible CPU & OS detected
16:49:39 [App ] Command line: --use-cuda 0 --resolution-level 1 model_dense_mesh.mvs
16:49:40 [App ] CUDA error: cuInit(0) (CUDA_ERROR_NO_DEVICE (code 100) - no CUDA-capable device is detected)
16:49:44 [App ] Scene loaded (4s515ms):
91 images (91 calibrated) with a total of 1058.14 MPixels (11.63 MPixels/image)
0 points, 3841735 vertices, 7682498 faces
16:55:44 [App ] Cleaned mesh: 384590 vertices, 768216 faces (1m4s972ms)
16:55:47 [App ] Cleaned mesh: 384590 vertices, 768216 faces (3s286ms)
16:57:54 [App ] Cleaned mesh: 343781 vertices, 685958 faces (2s433ms)
16:57:54 [App ] Mesh subdivided: 384590/768216 -> 343781/685958 vertices/faces
16:58:06 [App ] CUDA error: kernelComputeFaceNormal((int)faces.GetSize(), vertices, faces, CUDA::KernelRT::OutputParam(faceNormals.GetDataSize()), faces.GetSize() ) (CUDA_ERROR_OUT_OF_MEMORY (code 2) - out of memory)
Edit: removed link.
I compiled with SET(OpenMVS_USE_CUDA OFF CACHE BOOL "Enable CUDA library")
and it works.
I think the issue is related to the --use-cuda
flag.
I looked a little a the source but I did not see anything yet.
Maybe I got it.
In Mesh.cpp, the function ComputeNormalFaces()
is only checking for the compilation flag _USE_CUDA
and not the program parameter OPT::bUseCUDA
. So it try to use cuda and crash.
The function is used in SceneRefine.cpp ScoreMesh(double* gradients)
itself called in RefineMesh(...)
.
Hello, I just installed openmvs 1.1.1-1 from archlinux aur. I was following the step from here that I adapted to linux and CPU only (I have a amd gpu). I used it on a few different models with ~50 images each time.
When I reach the RefineMesh step, it always seg fault.
I still have plenty of ram. Any idea of what I can do to fix the issue? The model_dense_mesh.ply is "ok" but not great( some hole and not perfect quality)
Thank you very much