Skip to content

Commit

Permalink
added sphere initialization forward function to the model.
Browse files Browse the repository at this point in the history
  • Loading branch information
royorel committed Mar 27, 2022
1 parent 7fb65d4 commit 0bd8741
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions model.py
Original file line number Diff line number Diff line change
Expand Up @@ -712,6 +712,13 @@ def styles_and_noise_forward(self, styles, inject_index=None, truncation=1,

return styles

def init_forward(self, styles, cam_poses, focals, near=0.88, far=1.12):
latent = self.styles_and_noise_forward(styles)

sdf, target_values = self.renderer.mlp_init_pass(cam_poses, focals, near, far, styles=latent[0])

return sdf, target_values

def forward(self, styles, cam_poses, focals, near=0.88, far=1.12, return_latents=False,
inject_index=None, truncation=1, truncation_latent=None,
input_is_latent=False, noise=None, randomize_noise=True,
Expand Down

0 comments on commit 0bd8741

Please sign in to comment.