mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-06 15:59:16 +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
@@ -30,7 +30,7 @@ from pyrad.fields.modules.field_heads import FieldHeadNames
|
||||
from pyrad.fields.modules.spatial_distortions import SceneContraction
|
||||
from pyrad.fields.nerf_field import NeRFField
|
||||
from pyrad.graphs.base import Graph
|
||||
from pyrad.graphs.modules.ray_losses import interval_loss
|
||||
from pyrad.graphs.modules.ray_losses import distortion_loss
|
||||
from pyrad.optimizers.loss import MSELoss
|
||||
from pyrad.graphs.modules.ray_sampler import PDFSampler, UniformSampler
|
||||
from pyrad.renderers.renderers import AccumulationRenderer, DepthRenderer, RGBRenderer
|
||||
@@ -112,7 +112,7 @@ class MipNerf360Graph(Graph):
|
||||
)
|
||||
accumulation_coarse = self.renderer_accumulation(weights_coarse)
|
||||
depth_coarse = self.renderer_depth(weights_coarse, ray_samples_uniform)
|
||||
ray_loss_coarse = interval_loss(ray_samples_uniform, field_outputs_coarse[FieldHeadNames.DENSITY])
|
||||
ray_loss_coarse = distortion_loss(ray_samples_uniform, field_outputs_coarse[FieldHeadNames.DENSITY])
|
||||
|
||||
# pdf sampling
|
||||
ray_samples_pdf = self.sampler_pdf(ray_bundle, ray_samples_uniform, weights_coarse)
|
||||
@@ -126,7 +126,7 @@ class MipNerf360Graph(Graph):
|
||||
)
|
||||
accumulation_fine = self.renderer_accumulation(weights_fine)
|
||||
depth_fine = self.renderer_depth(weights_fine, ray_samples_pdf)
|
||||
ray_loss_fine = interval_loss(ray_samples_pdf, field_outputs_fine[FieldHeadNames.DENSITY])
|
||||
ray_loss_fine = distortion_loss(ray_samples_pdf, field_outputs_fine[FieldHeadNames.DENSITY])
|
||||
|
||||
outputs = {
|
||||
"rgb_coarse": rgb_coarse,
|
||||
|
||||
Reference in new issue
Block a user