mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-07 00:09:14 +08:00
Switch from point samples to frustum samples
This commit is contained in:
1 parent
609bf32d22
commit
1b20028ea3
17 files changed
+255
-102
No files matched your search
@@ -79,7 +79,7 @@ class NGPGraph(Graph):
|
||||
ray_samples_pdf = self.sampler_pdf(ray_bundle, ray_samples_uniform, weights_uniform)
|
||||
field_outputs_pdf = self.field.forward(ray_samples_pdf.to_point_samples())
|
||||
|
||||
ts, indices = torch.sort(torch.cat([ray_samples_uniform.ts, ray_samples_pdf.ts], -1), -1)
|
||||
ts, indices = torch.sort(torch.cat([ray_samples_uniform.bins, ray_samples_pdf.bins], -1), -1)
|
||||
ray_samples = ray_bundle.get_ray_samples(ts)
|
||||
field_outputs = {}
|
||||
for fo_name, _ in field_outputs_pdf.items():
|
||||
@@ -96,11 +96,11 @@ class NGPGraph(Graph):
|
||||
weights=weights,
|
||||
)
|
||||
accumulation = self.renderer_accumulation(weights)
|
||||
depth = self.renderer_depth(weights, ray_samples.ts)
|
||||
depth = self.renderer_depth(weights, ray_samples.bins)
|
||||
|
||||
densities_occupancy_grid = self.occupancy_grid.get_densities(ray_samples.positions)
|
||||
weights_occupancy_grid = ray_samples.get_weights(densities_occupancy_grid)
|
||||
depth_occupancy_grid = self.renderer_depth(weights_occupancy_grid, ray_samples.ts)
|
||||
depth_occupancy_grid = self.renderer_depth(weights_occupancy_grid, ray_samples.bins)
|
||||
|
||||
outputs = {
|
||||
"rgb": rgb,
|
||||
|
||||
Reference in new issue
Block a user