Skip to content
Snippets Groups Projects
Commit 636e3c71 authored by Thomas Müller's avatar Thomas Müller
Browse files

Allow configuring near distance as run.py CLI argument

parent ae36e55d
No related branches found
No related tags found
No related merge requests found
......@@ -37,6 +37,7 @@ def parse_args():
parser.add_argument("--nerf_compatibility", action="store_true", help="Matches parameters with original NeRF. Can cause slowness and worse results on some scenes.")
parser.add_argument("--test_transforms", default="", help="Path to a nerf style transforms json from which we will compute PSNR.")
parser.add_argument("--near_distance", default=-1, type=float, help="set the distance from the camera at which training rays start for nerf. <0 means use ngp default")
parser.add_argument("--screenshot_transforms", default="", help="Path to a nerf style transforms.json from which to save screenshots.")
parser.add_argument("--screenshot_frames", nargs="*", help="Which frame(s) to take screenshots of.")
......@@ -141,6 +142,10 @@ if __name__ == "__main__":
if args.mode == "sdf":
setup_colored_sdf(testbed, args.scene)
if args.near_distance >= 0.0:
print("NeRF training ray near_distance ", args.near_distance)
testbed.nerf.training.near_distance = args.near_distance
if args.nerf_compatibility:
print(f"NeRF compatibility mode enabled")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment