autonomousvision / gaussian-opacity-fields

[SIGGRAPH Asia'24 & TOG] Gaussian Opacity Fields: Efficient Adaptive Surface Reconstruction in Unbounded Scenes
https://niujinshuchong.github.io/gaussian-opacity-fields/
Other
693 stars 35 forks source link

Memory problems with custom dataset #85

Open Mikey-E opened 2 weeks ago

Mikey-E commented 2 weeks ago

It appears that grads and grads_abs may not be getting cleared correctly between calls of densify_and_prune(). They seem to double in size each time, eventually leading to out of memory errors. As such, simply changing memory parameters or environment variables does little to help. What is the best way to manage this size during training?

niujinshuchong commented 2 weeks ago

Hi, the number of Gaussians depends on your scene. If you have very sparse initial point, more Gaussians will be added at the beginning. We increase the same number of Gaussians for grads and grads_abs. see here: https://github.com/autonomousvision/gaussian-opacity-fields/blob/main/scene/gaussian_model.py#L637-L640 Therefore, it will have more Gaussians at the beginning. You can decrease it by using a smaller ratio.