From e3a0f0296c7f42ca53662855f3596d895bba96b2 Mon Sep 17 00:00:00 2001 From: Zhuoyang Date: Thu, 14 Sep 2023 13:44:23 -0700 Subject: [PATCH] fix small bugs and allow testing on images with aspect-ratio not equal to 1 --- nerfstudio/models/gaussian_splatting.py | 2 +- nerfstudio/utils/gaussian_utils.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/nerfstudio/models/gaussian_splatting.py b/nerfstudio/models/gaussian_splatting.py index 078835941..5bd5f0c01 100644 --- a/nerfstudio/models/gaussian_splatting.py +++ b/nerfstudio/models/gaussian_splatting.py @@ -327,7 +327,7 @@ class GaussianSplattingModel(Model): "max_sh_degree": self.max_sh_degree, "FoVx": fovx, "FoVy": fovy, - "image_height": camera.width, + "image_height": camera.height, "image_width": camera.width, "world_view_transform": world_view_transform, "full_proj_transform": full_projection_matrix, diff --git a/nerfstudio/utils/gaussian_utils.py b/nerfstudio/utils/gaussian_utils.py index 74d65cec3..1d74d40b6 100644 --- a/nerfstudio/utils/gaussian_utils.py +++ b/nerfstudio/utils/gaussian_utils.py @@ -136,7 +136,8 @@ def render_from_dict(data : dict, bg_color : torch.Tensor, scaling_modifier = 1. projmatrix=data['full_proj_transform'], sh_degree=data['active_sh_degree'], campos=data['camera_center'], - prefiltered=False + prefiltered=False, + debug=False ) rasterizer = GaussianRasterizer(raster_settings=raster_settings)