mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-07 00:09:14 +08:00
adding ndc pixel factor for sceenspace grads
This commit is contained in:
1 parent
50fbb9549e
commit
b843abfc33
1 file changed
+3
-1
@@ -515,9 +515,11 @@ class GaussianSplattingModel(Model):
|
|||||||
background = torch.rand(3, device=self.device)
|
background = torch.rand(3, device=self.device)
|
||||||
else:
|
else:
|
||||||
background = torch.zeros(3, device=self.device)
|
background = torch.zeros(3, device=self.device)
|
||||||
|
pix_fac = torch.tensor([0.5 * W, 0.5 * H], device=self.device)[None].repeat(self.num_points, 1)
|
||||||
|
pix_means = self.proj_means * pix_fac
|
||||||
xys, depths, self.radii, conics, num_tiles_hit, self.cov3d = ProjectGaussians.apply(
|
xys, depths, self.radii, conics, num_tiles_hit, self.cov3d = ProjectGaussians.apply(
|
||||||
self.means,
|
self.means,
|
||||||
self.proj_means,
|
pix_means,
|
||||||
torch.exp(self.scales),
|
torch.exp(self.scales),
|
||||||
1,
|
1,
|
||||||
self.quats,
|
self.quats,
|
||||||
|
|||||||
Reference in new issue
Block a user