ubc-vision/3dgs-mcmc

Any reason for the `N_max` selection?

yzslab opened this issue · 1 comments

Hi,
N_max is hardcoded to 51:

N_max = 51
binoms = torch.zeros((N_max, N_max)).float().cuda()
for n in range(N_max):
for k in range(n+1):
binoms[n, k] = math.comb(n, k)

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.

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.