cvlab-epfl / MeshUDF

Fast and Differentiable Meshing of Unsigned Distance Field Networks
GNU General Public License v3.0
138 stars 7 forks source link

oom with larger marching cubes resolutions #3

Closed kampelmuehler closed 1 year ago

kampelmuehler commented 2 years ago

Hi,

with --MC 512 the dense array at

https://github.com/cvlab-epfl/MeshUDF/blob/main/optimize_chamfer_A_to_B.py#L264

needs over 100 GB in memory and causes the execution to fail. Of course it works with `--no_smooth_borders``.

EchoTHChen commented 2 years ago

I also met this problem. How did you resolve it finally ?

bguillard commented 2 years ago

Hello, and thanks for pointing this out. This happens when smoothing border vertices on CPU. As pointed out by @kampelmuehler, a quick way to solve it is to disable border smoothing with --no_smooth_borders. I've otherwise pushed a version using a sparse array instead, which should be more memory-friendly. Feel free to try it out and comment!