mkkellogg / GaussianSplats3D

Three.js-based implementation of 3D Gaussian splatting
MIT License
1.53k stars 198 forks source link

why the memory usage will increase sharply in loading #364

Open lucylucy27 opened 3 weeks ago

lucylucy27 commented 3 weeks ago

Hi mkkellogg,

I found on Iphone13 with 4G GPU memory,the demo fails to load (but it happens to be successful!). If i change the ply model to smaller size, the demo works well. My question is, why the memory usage will increase sharply in loading? It may be the block reason to open bigger size models. I've also tried upgrading to v0.4.5, but there hasn't been much improvement compared with v0.4.2 Here is my config to open *.ply file in release v0.4.5:

'gpuAcceleratedSort': true, 'antialiased': false, 'sharedMemoryForWorkers':false, 'sceneRevealMode': GaussianSplats3D.SceneRevealMode.Instant, 'freeIntermediateSplatData': true, 'plyInMemoryCompressionLevel': 0, 'optimizeSplatData': false, 'sphericalHarmonicsDegree': 2 'progressiveLoad': false

Is there any thing I'm missing?

Thanks very much in advance~

lucylucy27 commented 3 weeks ago

And besides 'sphericalHarmonicsDegree': 0, 'splatAlphaRemovalThreshold': 30, is there other config settings to decrease the peak value?

Thanks ~

seppestaes commented 2 weeks ago

Do you intend to use .ply files for production purposes? .ksplat is heavily optimized...

Linkersem commented 2 weeks ago

@mkkellogg Hello, I also encountered this problem. First of all, in the demo web page, I opened a scene, everything was fine at the beginning, but suddenly the memory usage of the GPU suddenly rose rapidly, and then slowly returned to stable, this makes me very puzzled, why is there this phenomenon?

Second, I noticed that by adding the variable 'freeIntermediateSplatData', I traced down the code, but I also can't understand why this can optimize memory?

https://github.com/user-attachments/assets/28bdd693-e7fa-4d3f-aa3d-d315ae9b598b

As you can see in this video, the memory footprint of the GPU process jumps from ~43W KB to ~77W KB.

Thanks for your reply

lucylucy27 commented 2 weeks ago

Do you intend to use .ply files for production purposes? .ksplat is heavily optimized.

I think .ksplat files have same issue.