mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-07 00:09:14 +08:00
Remove redundant data (#103)
RaySamples contained fields for bin_starts and bin_ends. These are also stored in the frustums. This PR removes them from the RaySamples.
This commit is contained in:
1 parent
be45d5c9bb
commit
74280110ce
12 files changed
+145682
-145693
No files matched your search
@@ -102,8 +102,8 @@ class NGPGraph(Graph):
|
||||
field_outputs_pdf = self.field.forward(ray_samples_pdf)
|
||||
|
||||
# Hacky treatment of bins as points to allow us to merge uniform and pdf.
|
||||
ts_uniform = (ray_samples_uniform.bin_starts + ray_samples_uniform.bin_ends) / 2.0
|
||||
ts_pdf = (ray_samples_pdf.bin_starts + ray_samples_pdf.bin_ends) / 2.0
|
||||
ts_uniform = (ray_samples_uniform.frustums.starts + ray_samples_uniform.frustums.ends) / 2.0
|
||||
ts_pdf = (ray_samples_pdf.frustums.starts + ray_samples_pdf.frustums.ends) / 2.0
|
||||
ts, indices = torch.sort(torch.cat([ts_uniform, ts_pdf], -2), -2)
|
||||
bin_starts = ts
|
||||
bin_ends = torch.cat([ts[..., 1:, :], ts[..., -1:, :]], dim=-2)
|
||||
|
||||
Reference in new issue
Block a user