From 119519d0c32423335dc50adf7ca5d4479b438d75 Mon Sep 17 00:00:00 2001 From: Nicholas Pfaff Date: Tue, 4 Jul 2023 17:09:16 +0100 Subject: [PATCH] Improve background_color typing --- nerfstudio/model_components/renderers.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nerfstudio/model_components/renderers.py b/nerfstudio/model_components/renderers.py index 81bb90437..431e2d4f4 100644 --- a/nerfstudio/model_components/renderers.py +++ b/nerfstudio/model_components/renderers.py @@ -107,7 +107,9 @@ class RGBRenderer(nn.Module): return comp_rgb @classmethod - def get_background_color(cls, rgb: Float[Tensor, "*bs num_samples 3"], background_color: BackgroundColor) -> Tensor: + def get_background_color( + cls, rgb: Float[Tensor, "*bs num_samples 3"], background_color: BackgroundColor + ) -> Float[Tensor, "3"]: """Returns the RGB background color for a specified background color. Args: @@ -133,7 +135,7 @@ class RGBRenderer(nn.Module): cls, rgb: Tensor, opacity: Tensor, - background_color: Tensor, + background_color: Float[Tensor, "3"], ) -> Float[Tensor, "*bs 3"]: """Blends the background color into the image.