From d16f87a9575fe12f2440e788347b1c614c09b247 Mon Sep 17 00:00:00 2001 From: Ethan Weber Date: Wed, 8 Jun 2022 18:00:51 +0000 Subject: [PATCH] fixing blender scene training with vanilla nerf --- pyrad/data/format/blender.py | 4 ++-- scripts/run_train.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pyrad/data/format/blender.py b/pyrad/data/format/blender.py index b5d3739c5..517009737 100644 --- a/pyrad/data/format/blender.py +++ b/pyrad/data/format/blender.py @@ -19,7 +19,7 @@ def load_blender_data( downscale_factor: int = 1, alpha_color: Optional[TensorType[3]] = None, split: str = "train", - scale_factor: float = 0.33, + scale_factor: float = 1.0, ) -> DatasetInputs: """Processes the a blender dataset directory. Some of this code comes from https://github.com/yenchenlin/nerf-pytorch/blob/master/load_blender.py#L37. @@ -60,7 +60,7 @@ def load_blender_data( # in x,y,z order camera_to_world[..., 3] *= scale_factor - scene_bounds = SceneBounds(aabb=torch.tensor([[-0.5, -0.5, -0.5], [0.5, 0.5, 0.5]], dtype=torch.float32)) + scene_bounds = SceneBounds(aabb=torch.tensor([[-1.5, -1.5, -1.5], [1.5, 1.5, 1.5]], dtype=torch.float32)) dataset_inputs = DatasetInputs( image_filenames=image_filenames, diff --git a/scripts/run_train.py b/scripts/run_train.py index 9610f098e..c37b94766 100644 --- a/scripts/run_train.py +++ b/scripts/run_train.py @@ -200,7 +200,7 @@ def launch( profiler.flush_profiler(config.logging) -@hydra.main(config_path="../configs", config_name="vanilla_nerf.yaml") +@hydra.main(config_path="../configs", config_name="graph_default.yaml") def main(config: DictConfig): """Main function.""" unrolled_path = os.path.join(os.getcwd(), ".hydra/config.yaml")