4
0
mirror of https://github.com/nerfstudio-project/nerfstudio.git synced 2026-11-11 18:44:21 +08:00

Remove unecessary assert in pixel sampler on image dimensions (#1861)

remove uneccessary assert on image dimension
This commit is contained in:
Matias Turkulainen 2023-05-03 19:28:11 +03:00 committed by GitHub
parent cc80a331aa
commit ea35897668
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -101,7 +101,7 @@ class PixelSampler: # pylint: disable=too-few-public-methods
key: value[c, y, x] for key, value in batch.items() if key != "image_idx" and value is not None
}
assert collated_batch["image"].shape == (num_rays_per_batch, 3), collated_batch["image"].shape
assert collated_batch["image"].shape[0] == num_rays_per_batch
# Needed to correct the random indices to their actual camera idx locations.
indices[:, 0] = batch["image_idx"][c]
@ -172,7 +172,7 @@ class PixelSampler: # pylint: disable=too-few-public-methods
collated_batch["image"] = torch.cat(all_images, dim=0)
assert collated_batch["image"].shape == (num_rays_per_batch, 3), collated_batch["image"].shape
assert collated_batch["image"].shape[0] == num_rays_per_batch
# Needed to correct the random indices to their actual camera idx locations.
indices[:, 0] = batch["image_idx"][c]