mkkellogg / GaussianSplats3D

Three.js-based implementation of 3D Gaussian splatting

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The CPU memory usage reaches approximately 800MB after running a 320MB PLY file.

lucylucy27 opened this issue · comments

I don't have a concept of this value. Is there potential to optimize this space?
Thanks~

I'm definitely aware of the excessive memory usage; it's been on my radar for a while but I just haven't had time to address it yet. I know for a fact there are opportunities for optimization :) Hopefully I'll find some time soon!

I'm also adding some updates with this PR that should help with memory usage: #242 This is just a preliminary effort, I'll do more of a deep-dive into optimizing memory usage in a future PR.

Great~
I can see that this modification has a significant impact on the CPU memory usage value after PLY loading.
At the same time, we have found that the CPU memory usage peaks during the PLY file loading process.
In this modification, the peak value does not seem to have improved. The plyInMemoryCompressionLevel variable in the code appears to only affect the case where streamView (progressiveLoad) is not used.

The reason you still see the memory peaking during the PLY loading process is that the entire PLY has to be loaded into memory, then parsed into an intermediate format that can be used for compression. In the future I will try to make some improvements so that in-memory PLY files can be compressed directly, but the entire PLY will still have to be in memory before compression can happen. That's why when the progressiveLoad option is used, the PLY cannot be compressed, and theplyInMemoryCompressionLevel parameter has no effect.

Thank you for your explanation. :)
I found that converting to *.ksplat format has a slight effect on the peak, and I guess it's because the file size itself is reduced. The peak in loading seems to be unavoidable at the moment. :)

I plan to spend more time addressing memory consumption, so hopefully in a future PR that peak memory usage will come down.