Skip to content

Commit

Permalink
use mask in 2dgs (#497)
Browse files Browse the repository at this point in the history
  • Loading branch information
Golbstein authored Nov 23, 2024
1 parent 0f42139 commit 7951619
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions examples/simple_trainer_2dgs.py
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,10 @@ def train(self):
step=step,
info=info,
)
masks = data["mask"].to(device) if "mask" in data else None
if masks is not None:
pixels = pixels * masks[..., None]
colors = colors * masks[..., None]

# loss
l1loss = F.l1_loss(colors, pixels)
Expand Down

0 comments on commit 7951619

Please sign in to comment.