palanglois / line-surface-reconstruction

Implementation for the "Surface Reconstruction from 3D Line Segments" paper.
https://imagine.enpc.fr/~langloip/index.html?page=line_recons
GNU General Public License v3.0
111 stars 14 forks source link

large memory consumption #1

Closed m-iDev-0792 closed 3 years ago

m-iDev-0792 commented 3 years ago

Hi, Palanglois! Thanks for your great work. I am trying to reconstruct some scenes using your program. I managed to compile your code on my machine and try to reconstruct a scene that contains about 3k lines. I did run ransac_on_lines smoothly, but when running line_based_recons_param and line_based_recons, these two programs consumed large amount of memory and reached my machine memory limit (64GB), and finally killed by Linux. I found that the program consumes about 20GB memory when logs out 'Inserted n primitives out of N', after that, it consumed memory at a very fast speed when performing Building the intersection tree.... The memory usage always reached the limit at this step. Is this caused by my misusage (e.g. inappropriate parameters) ? or this program does need so much memory? Can you provide some tips to reduce memory usage? Thanks! 10611620837994_ pic_hd

palanglois commented 3 years ago

Hello!

Thanks for your interest in this project!

Yes, the algorithm's complexity is roughly cubic w.r.t the number of planes you insert in the plane arrangement. However, I noticed that most of the time, a number of 100 to 150 planes is sufficient for the scenes I've tried to reconstruct.

My advice:

Try to restrict the number of planes that are being inserted: you can use the line_based_recons_param -np 120 ... for instance.

Also, I guess you're trying the method on a new scene, if so be sure to follow the instructions located here.

I hope this helps! Pierre-Alain