Skip to content

Commit

Permalink
UPD: keep default behavoir of the test time rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
ottogin committed Nov 12, 2024
1 parent 9016fb5 commit ad257f8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions configs/sdi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ system:
albedo_activation: sigmoid
diffuse_prob: 0.3
textureless_prob: 0.75
ambient_only_on_test: true

background_type: "neural-environment-map-background"
background:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class Config(BaseMaterial.Config):
textureless_prob: float = 0.5
albedo_activation: str = "sigmoid"
soft_shading: bool = False
ambient_only_on_test: bool = False # if true, test time visualization only with ambient lighting

cfg: Config

Expand Down Expand Up @@ -91,7 +92,11 @@ def forward(
else:
shading = "diffuse"
else:
shading = "albedo" # test time visualization only with ambient lighting
if self.ambient_only or self.cfg.ambient_only_on_test:
shading = "albedo"
else:
# return shaded color by default in evaluation
shading = "diffuse"

# multiply by 0 to prevent checking for unused parameters in DDP
if shading == "albedo":
Expand Down

0 comments on commit ad257f8

Please sign in to comment.