ubc-vision / 3dgs-mcmc

Implementation of the paper "3D Gaussian Splatting as Markov Chain Monte Carlo"
https://ubc-vision.github.io/3dgs-mcmc/
Other
254 stars 10 forks source link

Any reason for the `N_max` selection? #8

Closed yzslab closed 3 days ago

yzslab commented 3 days ago

Hi, N_max is hardcoded to 51: https://github.com/ubc-vision/3dgs-mcmc/blob/5bf590e58706e32564ee6b30c91a2d12b22566a9/utils/reloc_utils.py#L5-L9

But looks like nothing can prevent N_idx, which is calculated here and added 1 here, from being greater than N_max. In such a situation, it will lead to an out-of-bound accessing in cuda rasterizer.

shakibakh commented 3 days ago

Thanks for reporting this. Seems the clamp was removed when I was cleaning the code, adding it again. As to why 50, I just chose a large enough value that doesn't cause overflow. In practice, the value of N doesn't really get that high.