From f3442c8b7b21218364000ef88c17a86afd7d0700 Mon Sep 17 00:00:00 2001 From: machenmusik Date: Mon, 5 Dec 2022 19:03:09 -0500 Subject: [PATCH] Use max resolution when not moving or training (#1091) use max resolution when not moving or training --- nerfstudio/viewer/server/viewer_utils.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/nerfstudio/viewer/server/viewer_utils.py b/nerfstudio/viewer/server/viewer_utils.py index 05be19ea0..ce70426f6 100644 --- a/nerfstudio/viewer/server/viewer_utils.py +++ b/nerfstudio/viewer/server/viewer_utils.py @@ -672,9 +672,12 @@ class ViewerState: aspect_ratio = camera_object["aspect"] - image_height = (num_vis_rays / aspect_ratio) ** 0.5 - image_height = int(round(image_height, -1)) - image_height = min(self.max_resolution, image_height) + if not self.camera_moving and not is_training: + image_height = self.max_resolution + else: + image_height = (num_vis_rays / aspect_ratio) ** 0.5 + image_height = int(round(image_height, -1)) + image_height = min(self.max_resolution, image_height) image_width = int(image_height * aspect_ratio) if image_width > self.max_resolution: image_width = self.max_resolution