Skip to content

fix: prune Gaussians when initialized above cap_max in MCMC strategy#939

Open
jashshah999 wants to merge 1 commit into
nerfstudio-project:mainfrom
jashshah999:fix-mcmc-cap-max
Open

fix: prune Gaussians when initialized above cap_max in MCMC strategy#939
jashshah999 wants to merge 1 commit into
nerfstudio-project:mainfrom
jashshah999:fix-mcmc-cap-max

Conversation

@jashshah999

Copy link
Copy Markdown

What

When initializing from SfM with more Gaussians than cap_max, the MCMC strategy has no way to prune down. _relocate_gs only replaces dead Gaussians (doesn't reduce count), and _add_new_gs correctly adds zero when over cap, but nothing removes the excess.

Fix

Add _prune_to_cap() that removes the lowest-opacity Gaussians when count exceeds cap_max. Runs before relocate in the refine step so the subsequent relocate and add steps operate within the cap.

Uses the existing remove() utility from ops.py.

Fixes #516.

When initializing from SfM with more Gaussians than cap_max, MCMC
had no mechanism to prune down. The relocate step only replaces dead
Gaussians, and _add_new_gs correctly adds zero when over cap, but
nothing removed the excess.

Add _prune_to_cap() that removes the lowest-opacity Gaussians when
the count exceeds cap_max. Runs before relocate in the refine step.

Fixes nerfstudio-project#516.
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

Successfully merging this pull request may close these issues.

MCMC Strategy does not respect cap_max if the number of gaussians exceeds the cap already

1 participant