mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-07 00:09:14 +08:00
Fix get_background_color
This commit is contained in:
1 parent
520e6a05c7
commit
220ef3a459
1 file changed
+2
-2
@@ -111,9 +111,9 @@ class RGBRenderer(nn.Module):
|
|||||||
# Note, this is only supported for non-packed samples.
|
# Note, this is only supported for non-packed samples.
|
||||||
background_color = rgb[..., -1, :]
|
background_color = rgb[..., -1, :]
|
||||||
else:
|
else:
|
||||||
background_color = cls.get_background_color(background_color, shape=rgb.shape, device=rgb.device)
|
background_color = cls.get_background_color(background_color, shape=comp_rgb.shape, device=comp_rgb.device)
|
||||||
assert isinstance(background_color, torch.Tensor)
|
assert isinstance(background_color, torch.Tensor)
|
||||||
comp_rgb = comp_rgb + background_color.to(weights.device) * (1.0 - accumulated_weight)
|
comp_rgb = comp_rgb + background_color * (1.0 - accumulated_weight)
|
||||||
return comp_rgb
|
return comp_rgb
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|||||||
Reference in new issue
Block a user