Skip to content

DefaultStrategy: keep the max 2D radius over all cameras - #1092

Open
kleinicke wants to merge 1 commit into
nerfstudio-project:mainfrom
fastforks:pr/default-strategy-radii-max
Open

kleinicke wants to merge 1 commit into
nerfstudio-project:mainfrom
fastforks:pr/default-strategy-radii-max

Conversation

@kleinicke

Copy link
Copy Markdown
Contributor

With several cameras per step (C > 1) and refine_scale2d_stop_iter > 0, DefaultStrategy._update_state should keep each gaussian's largest normalized 2D radius over all cameras. gs_ids lists a gaussian once per camera that sees it, so the indexed assignment

state["radii"][gs_ids] = torch.maximum(state["radii"][gs_ids], radii / ...)

writes one camera's value per gaussian (whichever write lands last) instead of the max. Example: radii 10 and 5 px for the same gaussian in two cameras give 0.05 instead of 0.10. This replaces it with scatter_reduce_(..., reduce="amax"), as the existing "Should be ideally using scatter max" comment suggested. Dense and packed paths are both affected; single-camera training and the default refine_scale2d_stop_iter=0 are not.

test_default_strategy_radii_max_over_cameras (dense and packed, CPU) fails on main and passes with this change; tests/test_strategy.py passes.

With several cameras per step, gs_ids lists a gaussian once per camera that
sees it. The indexed assignment state["radii"][gs_ids] = maximum(...) then
keeps one camera's value instead of the max over cameras. Use scatter_reduce_
with "amax" (dense and packed). Only matters with refine_scale2d_stop_iter > 0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

1 participant