Skip to content

Commit

Permalink
Update rendering.py
Browse files Browse the repository at this point in the history
  • Loading branch information
kwea123 committed Jan 29, 2021
1 parent 9833a1a commit b2b2a22
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions models/rendering.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,6 @@ def inference(model, embedding_xyz, xyz_, dir_, dir_embedded, z_vals, weights_on
# detach so that grad doesn't propogate to weights_coarse from here

z_vals, _ = torch.sort(torch.cat([z_vals, z_vals_], -1), -1)
# values are interleaved actually, so maybe can do better than sort?

xyz_fine_sampled = rays_o.unsqueeze(1) + \
rays_d.unsqueeze(1) * z_vals.unsqueeze(2)
Expand All @@ -242,4 +241,4 @@ def inference(model, embedding_xyz, xyz_, dir_, dir_embedded, z_vals, weights_on
result['depth_fine'] = depth_fine
result['opacity_fine'] = weights_fine.sum(1)

return result
return result

0 comments on commit b2b2a22

Please sign in to comment.