Merge branch 'main' of github.com:nerfstudio-project/nerfstudio into generative

This commit is contained in:
Abhik Ahuja ahujaabhik@berkeley.edu committed 2022-12-14 05:07:21 +00:00
commit cd93bc25fa
36 files changed
+451 -410

No files matched your search

+9 -4
View File
@@ -74,10 +74,15 @@ class Field(nn.Module):
self._sample_locations.shape[:-1] == self._density_before_activation.shape[:-1]
), "Sample locations and density must have the same shape besides the last dimension."
self._density_before_activation.backward(
gradient=torch.ones_like(self._density_before_activation), inputs=self._sample_locations, retain_graph=True
)
normals = -torch.nn.functional.normalize(self._sample_locations.grad, dim=-1)
normals = torch.autograd.grad(
self._density_before_activation,
self._sample_locations,
grad_outputs=torch.ones_like(self._density_before_activation),
retain_graph=True,
)[0]
normals = -torch.nn.functional.normalize(normals, dim=-1)
return normals
@abstractmethod
+1 -1
View File
@@ -91,7 +91,7 @@ class TCNNNerfactoField(Field):
hidden_dim: int = 64,
geo_feat_dim: int = 15,
num_levels: int = 16,
max_res: int = 1024,
max_res: int = 2048,
log2_hashmap_size: int = 19,
num_layers_color: int = 3,
num_layers_transient: int = 2,