mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-25 02:19:47 +08:00
Disable occlusion sampling and speed up eval (#488)
disable occlusion sampling and speed up eval
This commit is contained in:
1 parent
4250161922
commit
96e1f2a698
4 files changed
+11
-13
No files matched your search
@@ -332,6 +332,6 @@ class VanillaDataManager(DataManager): # pylint: disable=abstract-method
|
||||
def next_eval_image(self, step: int) -> Tuple[int, RayBundle, Dict]:
|
||||
for camera_ray_bundle, batch in self.eval_dataloader:
|
||||
assert camera_ray_bundle.camera_indices is not None
|
||||
image_idx = int(camera_ray_bundle.camera_indices[0, 0])
|
||||
image_idx = int(camera_ray_bundle.camera_indices[0, 0, 0])
|
||||
return image_idx, camera_ray_bundle, batch
|
||||
raise ValueError("No more eval images")
|
||||
@@ -156,7 +156,6 @@ class EvalDataloader(DataLoader):
|
||||
image_idx: Camera image index
|
||||
"""
|
||||
ray_bundle = self.cameras.generate_rays(camera_indices=image_idx)
|
||||
ray_bundle.camera_indices = torch.Tensor([image_idx])[..., None].int()
|
||||
batch = self.input_dataset[image_idx]
|
||||
batch = get_dict_to_torch(batch, device=self.device, exclude=["image"])
|
||||
return ray_bundle, batch
|
||||
|
||||
Reference in new issue
Block a user