MCPcopy
hub / github.com/junshutang/Make-It-3D / common_forward

Method common_forward

nerf/network.py:124–135  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

122 return g
123
124 def common_forward(self, x):
125 # x: [N, 3], in [-bound, bound]
126
127 # sigma
128 h = self.encoder(x, bound=self.bound)
129
130 h = self.sigma_net(h)
131
132 sigma = trunc_exp(h[..., 0] + self.gaussian(x))
133 albedo = torch.sigmoid(h[..., 1:])
134
135 return sigma, albedo
136
137 # ref: https://github.com/zhaofuq/Instant-NSR/blob/main/nerf/network_sdf.py#L192
138 def finite_difference_normal(self, x, epsilon=1e-2):

Callers 4

normalMethod · 0.95
forwardMethod · 0.95
densityMethod · 0.95

Calls 1

gaussianMethod · 0.95

Tested by

no test coverage detected