Skip to content

Commit

Permalink
option for using black bg in test dataset
Browse files Browse the repository at this point in the history
  • Loading branch information
Linyou committed Apr 9, 2023
1 parent 0426623 commit 658df40
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion examples/datasets/nerf_360_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,10 @@ def preprocess(self, data):
color_bkgd = torch.zeros(3, device=self.images.device)
else:
# just use white during inference
color_bkgd = torch.ones(3, device=self.images.device)
if self.color_bkgd_aug == "black":
color_bkgd = torch.zeros(3, device=self.images.device)
else:
color_bkgd = torch.ones(3, device=self.images.device)

return {
"pixels": pixels, # [n_rays, 3] or [h, w, 3]
Expand Down

0 comments on commit 658df40

Please sign in to comment.