Skip to content

Commit

Permalink
fix app_mask
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel03c1 committed Nov 4, 2022
1 parent 8111899 commit 034619c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions TensoRF/models/tensoRF.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,14 @@ def compute_appfeature(self, points):
plane = min_max_quantize(self.app_plane[idx], self.grid_bit)
line = min_max_quantize(self.app_line[idx], self.grid_bit)

if self.use_mask:
mask = torch.sigmoid(self.app_plane_mask[idx])
plane = (plane * (mask >= 0.5) - plane * mask).detach() \
+ plane * mask
mask = torch.sigmoid(self.app_line_mask[idx])
line = (line * (mask >= 0.5) - line * mask).detach() \
+ line * mask

if self.use_dwt:
plane = inverse(plane, self.dwt_level)

Expand Down

0 comments on commit 034619c

Please sign in to comment.