Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in PackedGaussians::at(int i) #17

Open
fortmeier opened this issue Feb 6, 2025 · 1 comment
Open

Bug in PackedGaussians::at(int i) #17

fortmeier opened this issue Feb 6, 2025 · 1 comment

Comments

@fortmeier
Copy link

When going through the list of loaded packed gaussians, the last one gaussian is out of bounds.
In the following code snippet, the last element is skipped to make it work.

spz::PackedGaussians packed = spz::loadSpzPacked(path);
std::vector<spz::UnpackedGaussian> gaussians;
for (int i = 0; i < packed.numPoints-1; i++) {
    spz::UnpackedGaussian gaussian = packed.unpack(i);
    gaussians.push_back(gaussian);
}

(code in context: https://github.com/fortmeier/klartraum/blob/17a3d3860d30f263b0db660ad3ccab32859a5e7b/src/vulkan_gaussian_splatting.cpp#L301)

I think the issue is these lines:

std::copy(&scales[start3], &scales[start3 + 3], result.scale.data());

@fortmeier
Copy link
Author

I think I found the issue, please review the PR: #18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant