Skip to content
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

RefineMesh Killed #662

Open
sjmduncan opened this issue Mar 21, 2021 · 6 comments
Open

RefineMesh Killed #662

sjmduncan opened this issue Mar 21, 2021 · 6 comments

Comments

@sjmduncan
Copy link

Describe the bug
RefineMesh gets 'Killed' before producing an output scene, and without a useful error message.
With -v 3 it produces some .ply files which appear to have undergone some refinement (Refine1.ply Refine2.ply, Refined1.ply, Refined2.ply).

All of the other parts of the pipeline seem to work fine, and I can produce a textured unrefined mesh with no problems.

OS is Ubuntu 18.04
Built using the script from this repository but with -DOpenMVS_USE_CUDA=OFF
Scene is imported from a COLMAP sparse reconstruction

The output looks like this:

> RefineMesh scene_dense_mesh.mvs --decimate 0.5 --max-face-area 16 -v 3
08:58:57 [App     ] Build date: Mar 22 2021, 08:38:37
08:58:57 [App     ] CPU: Intel(R) Core(TM) i5-6300U CPU @ 2.40GHz (4 cores)
08:58:57 [App     ] RAM: 7.65GB Physical Memory 0B Virtual Memory
08:58:57 [App     ] OS: Linux 5.4.0-67-generic (x86_64)
08:58:57 [App     ] SSE & AVX compatible CPU & OS detected
08:58:57 [App     ] Command line: scene_dense_mesh.mvs --decimate 0.5 --max-face-area 16 -v 3
08:58:57 [App     ] Scene loaded (437ms):
	4 images (4 calibrated) with a total of 76.15 MPixels (19.04 MPixels/image)
	0 points, 322398 vertices, 644269 faces
08:58:57 [App     ] Refine mesh at: 0.25 image scale
Decimated faces 322134 (100%, 2s988ms)           
08:59:01 [App     ] Mesh decimated: 644269 -> 322135 faces
08:59:01 [App     ] Removed 0 zero-area faces
08:59:01 [App     ] Removed 0 duplicate faces
08:59:01 [App     ] Removed 0 non-manifold faces
08:59:01 [App     ] Removed 0 degenerate vertices
08:59:01 [App     ] Removed 0 unreferenced vertices
08:59:02 [App     ] Removed 0 duplicate vertices
08:59:02 [App     ] Split 0 non-manifold vertices
08:59:02 [App     ] Closed 0 holes and added 0 new faces
08:59:02 [App     ] Cleaned mesh: 161331 vertices, 322135 faces (4s320ms)
08:59:02 [App     ] Removed 0 zero-area faces
08:59:02 [App     ] Removed 0 duplicate faces
08:59:02 [App     ] Removed 0 non-manifold faces
08:59:02 [App     ] Removed 0 degenerate vertices
08:59:02 [App     ] Removed 0 unreferenced vertices
08:59:02 [App     ] Removed 0 duplicate vertices
08:59:02 [App     ] Split 0 non-manifold vertices
08:59:03 [App     ] Closed 0 holes and added 0 new faces
08:59:03 [App     ] Removed 0 non-manifold faces
08:59:03 [App     ] Removed 0 non-manifold vertices
08:59:03 [App     ] Cleaned mesh: 161331 vertices, 322135 faces (713ms)
08:59:04 [App     ] Mesh imported: 164919 vertices, 329206 facets (618 border edges)
08:59:29 [App     ] Edge size in [0.00193519, 0.119355] (requested in [0.0149313, 0.119451]): 44018 ops, 50 iters
08:59:29 [App     ] Mesh exported: 139976 vertices, 278588 facets (1350 border edges)
08:59:30 [App     ] Removed 0 zero-area faces
08:59:30 [App     ] Removed 0 duplicate faces
08:59:30 [App     ] Removed 0 non-manifold faces
08:59:30 [App     ] Removed 0 degenerate vertices
08:59:30 [App     ] Removed 0 unreferenced vertices
08:59:30 [App     ] Removed 0 duplicate vertices
08:59:30 [App     ] Split 0 non-manifold vertices
08:59:30 [App     ] Closed 0 holes and added 0 new faces
08:59:30 [App     ] Removed 0 non-manifold faces
08:59:30 [App     ] Removed 0 non-manifold vertices
08:59:30 [App     ] Cleaned mesh: 139976 vertices, 278588 faces (650ms)
08:59:30 [App     ] Mesh subdivided: 161331/322135 -> 139976/278588 vertices/faces
08:59:30 [App     ] Mesh saved: 139976 vertices, 278588 faces (21ms)
Processed iterations 45 (100%, 42s418ms)           
09:00:13 [App     ] Mesh saved: 139976 vertices, 278588 faces (22ms)
09:00:13 [App     ] Refine mesh at: 0.50 image scale
09:00:14 [App     ] Mesh subdivided: 139976/278588 -> 160616/319656 vertices/faces
09:00:14 [App     ] Mesh saved: 160616 vertices, 319656 faces (24ms)
Processed iterations 22 (100%, 56s626ms)        ^X^F
09:01:11 [App     ] Mesh saved: 160616 vertices, 319656 faces (28ms)
09:01:11 [App     ] Refine mesh at: 1.00 image scale
09:01:14 [App     ] Mesh subdivided: 160616/319656 -> 331677/660670 vertices/faces
09:01:14 [App     ] Mesh saved: 331677 vertices, 660670 faces (53ms)
Killed
@cdcseacave
Copy link
Owner

most probably you run out of memory

@sjmduncan
Copy link
Author

Hmmmm, memory use sits at ~50% right up until the crash.

@bialasjaroslaw
Copy link

The same issue. Machine has 32G of memory available. There are 3 distinguish stages at which process is using ~1/4.7/16.4GB of RAM. Last one is the moment when application crashes before doing or printing anything. System itself is using ~6.5GB of ram sore it is still plenty to use, but somehow it is crashing. I tried to reduce number of steps to two using --scales 2 but without success.

@davidflavigne
Copy link

Same issue for me. Memory goes up to ~70%, using https://github.com/rperrot/ReconstructionDataSet.git examples (MuratoCorsicaChurch) processed using openMVG.

$ RefineMesh scene_dense_mesh.mvs --max-face-area 128 --scales 1 -v 5
08:45:04 [App     ] Build date: May  8 2023, 21:30:33
08:45:04 [App     ] CPU: Intel(R) Core(TM) i5-8500 CPU @ 3.00GHz (6 cores)
08:45:04 [App     ] RAM: 7.70GB Physical Memory 16.70GB Virtual Memory
08:45:04 [App     ] OS: Linux 5.15.0-71-generic (x86_64)
08:45:04 [App     ] Disk: 110.03GB (915.82GB) space
08:45:04 [App     ] SSE & AVX compatible CPU & OS detected
08:45:04 [App     ] Command line: RefineMesh scene_dense_mesh.mvs --max-face-area 128 --scales 1 -v 5
08:45:05 [App     ] Scene loaded (157ms):
        42 images (42 calibrated) with a total of 842.19 MPixels (20.05 MPixels/image)
        0 points, 32867 vertices, 65710 faces
08:45:05 [App     ] Refine mesh at: 1.00 image scale
[1]    246492 killed     RefineMesh   128

@cdcseacave
Copy link
Owner

this is most probably OOM

@davidflavigne
Copy link

In my case, RefineMesh was killed when the swap got full. So, indeed a memory problem. Solved by using --resolution-level 1 to downscale processed images and thus limit memory usage
@cdcseacave thanks for answering quickly

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

No branches or pull requests

4 participants