From 11e16e65c7a712bf140da8f73a354bfd1f7ede25 Mon Sep 17 00:00:00 2001 From: Ethan Weber Date: Fri, 4 Aug 2023 15:36:17 +0000 Subject: [PATCH] remove line in erode --- nerfstudio/data/utils/pixel_sampling_utils.py | 1 - 1 file changed, 1 deletion(-) diff --git a/nerfstudio/data/utils/pixel_sampling_utils.py b/nerfstudio/data/utils/pixel_sampling_utils.py index f869dbaa2..464381f4c 100644 --- a/nerfstudio/data/utils/pixel_sampling_utils.py +++ b/nerfstudio/data/utils/pixel_sampling_utils.py @@ -44,7 +44,6 @@ def erode(tensor: Float[Tensor, "bs 1 H W"], kernel_size=3) -> Float[Tensor, "bs if any(val not in (0, 1) for val in unique_vals) or tensor.dtype != torch.float32: raise ValueError("Input tensor should contain only values 0 and 1, and should have dtype torch.float32.") - x = 1 - tensor x = 1 - dilate(1 - tensor, kernel_size=kernel_size) # set edge pixels to 0 p = (kernel_size - 1) // 2