Skip to content

Commit

Permalink
Fix a bug in scaling screen space grads
Browse files Browse the repository at this point in the history
  • Loading branch information
jb-ye authored and Jianbo Ye committed Aug 22, 2024
1 parent 8f8e397 commit e9b6a07
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions gsplat/strategy/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,7 @@ def _update_state(
grads = info["means2d"].absgrad.clone()
else:
grads = info["means2d"].grad.clone()
grads[..., 0] *= info["width"] / 2.0 * info["n_cameras"]
grads[..., 1] *= info["height"] / 2.0 * info["n_cameras"]
grads *= max(info["width"], info["height"]) / 2.0 * info["n_cameras"]

# initialize state on the first run
n_gaussian = len(list(params.values())[0])
Expand Down

0 comments on commit e9b6a07

Please sign in to comment.