Closed boilcy closed 1 year ago
Hi. The output of merge_ray_samples
is a tuple of 3 items. Since you refer to https://github.com/ripl/nerfuser/blob/main/nerfuser/view_blender.py#L206, I think you are specifically talking about merged_mids
. Its shape is exactly as in the comment (n_rays, n_samples * n_models, 1)
. If you plug in the numbers
n_models = 2 n_rays = 11 n_samples = 32
,
you get (11, 64, 1)
.
But as you get 'torch.Size([2, 11, 64, 1])'
, I think you might be checking the size of merged_weights
instead, which is of size (n_models, n_rays, n_samples * n_models, 1)
.
The out put of this demo is 'torch.Size([2, 11, 64, 1])', which does not match the description in the https://github.com/ripl/nerfuser/blob/main/nerfuser/view_blender.py#L206 Is this a typo? `import torch
n_models = 2 n_rays = 11 n_samples = 32
scales = torch.ones(n_models) scales = scales[:, None, None, None] merged_ends = torch.ones(n_rays, n_samples * n_models, 1) merged_ends = torch.cat((torch.zeros((n_rays, 1, 1)), merged_ends), dim=-2) t1 = merged_ends[:, :-1] t2 = merged_ends[:, 1:] dddd = (t1 + t2) / 2 / scales`