gaussian-splatting
gaussian-splatting copied to clipboard
Using custom number of points
Hi! I was trying to initialise a custom number of points in the blender dataset reader but found runtime issues on doing the same. In particular, I am seeing issues such as RuntimeError: Function _RasterizeGaussiansBackward returned an invalid gradient at index 2 - got [0, 0, 3] but expected shape compatible with [0, 16, 3] when using more than 1 point and RuntimeError: Sizes of tensors must match except in dimension 1. Expected size 1 but got size 15 for tensor number 1 in the list. when using a single point during initialisation. I would appreciate any insight about these issues. Thank you!
+1, I met the same problem. 我怀疑可能是坐标系的问题
@Gragonfly @samiragarwala Have you solved the problem? I met the same problem...
I also meet the same issues, but on Colmap dataset. RuntimeError: Function _RasterizeGaussiansBackward returned an invalid gradient at index 2 - got [0, 0, 3] but expected shape compatible with [0, 16, 3]
However, if i increase the number of points like from 100 to 1000, this issus wont happened. So, I guess it was the problem during optimization? I also looking at it.
could you tell me how to increase "the number of points" ? thanks! @ys31jp
I face the same problem, by checking the code, I think the main reason leading to this problem is the "pruning". Sometimes, all Gaussians are pruned so that the number of gaussian is 0, and then, it may lead to this gradient computation error. Hope this suggestion could help you.
I try to create a Colmap dataset with a single orthogonal camera. It is traced to the setting of the threshold for pruning large Gaussian kernels. If there is only one camera, the prune extent is 0 pruning everything.
I have the same problem and the error throws alsways at the same Iteration (3100). It is happening with different colmap datasets. So far I tried datasets with roughly 7000 and 31000 initial points. When I set --sh_degree 0 the training completes, but I am left with 0 splats.
I have the same problem and the error throws alsways at the same Iteration (3100). It is happening with different colmap datasets. So far I tried datasets with roughly 7000 and 31000 initial points. When I set --sh_degree 0 the training completes, but I am left with 0 splats.
We have the same problem,so do I when iter 3100,have you solved?thank you!
You may have a bad initialization, no points fall in the camera views. @qianyuling-wl
Hi! I might found the solution to this problem:
In getNerfppNorm here, we estimate the radius of the scene using the camera positions, and use it as the camera_extent here.
Then this parameter is used to prune the point here.
As a result, if the camera are located closely with each other, rather than surround the scene, we would get a small "scene radius". Specifically, if we only has one camera position, we would get radius=0, and this would prune all of the points, which result in your error: RuntimeError: Function _RasterizeGaussiansBackward returned an invalid gradient at index 2 - got [0, 0, 3] but expected shape compatible with [0, 16, 3].
To debug, you may manually set the radius in getNerfppNorm to the radius of your scene.
Hi! I might found the solution to this problem:
In
getNerfppNormhere, we estimate the radius of the scene using the camera positions, and use it as thecamera_extenthere.Then this parameter is used to prune the point here.
As a result, if the camera are located closely with each other, rather than surround the scene, we would get a small "scene radius". Specifically, if we only has one camera position, we would get
radius=0, and this would prune all of the points, which result in your error:RuntimeError: Function _RasterizeGaussiansBackward returned an invalid gradient at index 2 - got [0, 0, 3] but expected shape compatible with [0, 16, 3].To debug, you may manually set the
radiusingetNerfppNormto the radius of your scene.
Thanks, I solved it. This is exactly the problem.