Add temporal distortion and D-NeRF model (#825)

* Add D-NeRF temporal distortion and D-NeRF model

This allows for temporal distortion to be enabled on a variety of models through config
parameters, without an explicit model. Temporal distortion and MIP-NeRF are not currently
jointly runnable but can be changed in the future.

* Simplifying changes

* Simplifying changes

Co-authored-by: Matthew Tancik <tancik@berkeley.edu>
This commit is contained in:
Julian KnodtandMatthew Tancik authored and GitHub committed 2022-11-15 14:29:29 -08:00
1 parent 8678f4c2e6
commit 9ff167d705
9 files changed
+206 -7

No files matched your search

+8 -2
View File
@@ -337,8 +337,14 @@ class Cameras:
else:
ray_bundle_camera_indices = camera_indices.view(pixel_area.shape)
times = self.times[camera_indices, None] if self.times is not None else None
return RayBundle(
origins=origins, directions=directions, pixel_area=pixel_area, camera_indices=ray_bundle_camera_indices
origins=origins,
directions=directions,
pixel_area=pixel_area,
camera_indices=ray_bundle_camera_indices,
times=times,
)
def to_json(
@@ -362,7 +368,7 @@ class Cameras:
"fy": self.fy[camera_idx].tolist(),
"camera_to_world": self.camera_to_worlds[camera_idx].tolist(),
"camera_index": camera_idx,
"times": self.times[camera_idx] if self.times is not None else None,
"times": self.times[camera_idx].item() if self.times is not None else None,
}
if image is not None:
image_uint8 = (image * 255).detach().type(torch.uint8)