mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-01 13:28:59 +08:00
Render cameras with render times for dynamic nerfs (#1199)
* Render cameras with render times for dynamic nerfs * Add --dynamic flag to cmd. Clamp render times. * Fix for issues with clamping renderTime * Only add render_time to camera path if dynamic nerf * change DEFAULT_TIME to DEFAULT_RENDER_TIME Co-authored-by: Liam Schoneveld <liam.schoneveld@woven-planet.global>
This commit is contained in:
1 parent
102c00a9be
commit
31be97d59c
3 files changed
+211
-6
No files matched your search
@@ -152,6 +152,12 @@ def get_path_from_json(camera_path: Dict[str, Any]) -> Cameras:
|
||||
fxs.append(focal_length)
|
||||
fys.append(focal_length)
|
||||
|
||||
# Iff ALL cameras in the path have a "time" value, construct Cameras with times
|
||||
if all("render_time" in camera for camera in camera_path["camera_path"]):
|
||||
times = torch.tensor([camera["render_time"] for camera in camera_path["camera_path"]])
|
||||
else:
|
||||
times = None
|
||||
|
||||
camera_to_worlds = torch.stack(c2ws, dim=0)
|
||||
fx = torch.tensor(fxs)
|
||||
fy = torch.tensor(fys)
|
||||
@@ -162,4 +168,5 @@ def get_path_from_json(camera_path: Dict[str, Any]) -> Cameras:
|
||||
cy=image_height / 2,
|
||||
camera_to_worlds=camera_to_worlds,
|
||||
camera_type=camera_type,
|
||||
times=times,
|
||||
)
|
||||
Reference in new issue
Block a user