Skip to content

Commit f182840

Browse files
committed
remove redundancy
1 parent c596fb6 commit f182840

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

2_Latent-Shading-Gen/models.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -294,14 +294,13 @@ def forward(self, face):
294294

295295
# 3 a. Generate Normal
296296
predicted_normal = self.normal_gen_model(out_normal_features)
297+
# 3 b. Generate albedo
298+
predicted_albedo = self.albedo_gen_model(out_albedo_features)
297299
# 3 c. Estimate lighting
298300
# First, concat conv, normal and albedo features over channels dimension
299301
all_features = torch.cat((out_features, out_normal_features, out_albedo_features), dim=1)
300302
# 3 d. Estimate Neural Light for residual correctness
301-
out_albedo_features_2 = self.albedo_residual_model_2(out_features)
302-
new_features = torch.cat((out_features, out_normal_features, out_albedo_features_2), dim=1)
303-
predicted_albedo = self.albedo_gen_model(out_albedo_features_2)
304-
predicted_neural_light = self.neural_light_model(new_features)
303+
predicted_neural_light = self.neural_light_model(all_features)
305304

306305
# 4. Generate shading
307306
normal_nn_light = torch.cat((predicted_normal, predicted_neural_light), dim=1)

0 commit comments

Comments
 (0)