mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-04 23:08:44 +08:00
Fixed friends dataset w/o caching (#365)
* fixing friends dataloading and nerfw running * put dataset back to normal
This commit is contained in:
1 parent
42711497ab
commit
512a51f714
11 files changed
+98
-170
No files matched your search
@@ -220,7 +220,17 @@ class Cameras:
|
||||
dy = torch.sqrt(torch.sum((directions - directions_stack[2]) ** 2, dim=-1))
|
||||
pixel_area = dx * dy
|
||||
|
||||
return RayBundle(origins=origins, directions=directions, pixel_area=pixel_area[..., None])
|
||||
if not isinstance(camera_indices, torch.Tensor):
|
||||
ray_bundle_camera_indices = torch.Tensor([camera_indices]).broadcast_to((self._num_cameras)).to(self.device)
|
||||
else:
|
||||
ray_bundle_camera_indices = camera_indices
|
||||
|
||||
return RayBundle(
|
||||
origins=origins,
|
||||
directions=directions,
|
||||
pixel_area=pixel_area[..., None],
|
||||
camera_indices=ray_bundle_camera_indices,
|
||||
)
|
||||
|
||||
def to_json(
|
||||
self,
|
||||
|
||||
Reference in new issue
Block a user