mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-07 00:09:14 +08:00
Removed view direction from RGB to calculate albedo
This commit is contained in:
1 parent
6f4aad451e
commit
303d16c659
1 file changed
+3
-5
@@ -152,7 +152,7 @@ class DreamFusionField(Field):
|
|||||||
self.field_head_pred_normals = PredNormalsFieldHead(in_dim=self.mlp_pred_normals.n_output_dims)
|
self.field_head_pred_normals = PredNormalsFieldHead(in_dim=self.mlp_pred_normals.n_output_dims)
|
||||||
|
|
||||||
self.mlp_head = tcnn.Network(
|
self.mlp_head = tcnn.Network(
|
||||||
n_input_dims=self.direction_encoding.n_output_dims + self.geo_feat_dim,
|
n_input_dims=self.geo_feat_dim,
|
||||||
n_output_dims=3,
|
n_output_dims=3,
|
||||||
network_config={
|
network_config={
|
||||||
"otype": "FullyFusedMLP",
|
"otype": "FullyFusedMLP",
|
||||||
@@ -205,10 +205,8 @@ class DreamFusionField(Field):
|
|||||||
x = self.mlp_pred_normals(pred_normals_inp).view(*outputs_shape, -1).to(directions)
|
x = self.mlp_pred_normals(pred_normals_inp).view(*outputs_shape, -1).to(directions)
|
||||||
outputs[FieldHeadNames.PRED_NORMALS] = self.field_head_pred_normals(x)
|
outputs[FieldHeadNames.PRED_NORMALS] = self.field_head_pred_normals(x)
|
||||||
|
|
||||||
h = torch.cat(
|
h = [density_embedding.view(-1, self.geo_feat_dim)]
|
||||||
[d, density_embedding.view(-1, self.geo_feat_dim)],
|
|
||||||
dim=-1,
|
|
||||||
)
|
|
||||||
rgb = self.mlp_head(h).view(*outputs_shape, -1).to(directions)
|
rgb = self.mlp_head(h).view(*outputs_shape, -1).to(directions)
|
||||||
outputs.update({FieldHeadNames.RGB: rgb})
|
outputs.update({FieldHeadNames.RGB: rgb})
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user