mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-01 21:39:06 +08:00
fix_mask (#1819)
fix_nerfacto_mask Co-authored-by: machenmusik <machenmusik@users.noreply.github.com>
This commit is contained in:
1 parent
0eb0ceb3c0
commit
d875f5f5b5
1 file changed
+1
@@ -96,6 +96,7 @@ class PixelSampler: # pylint: disable=too-few-public-methods
|
|||||||
indices = self.sample_method(num_rays_per_batch, num_images, image_height, image_width, device=device)
|
indices = self.sample_method(num_rays_per_batch, num_images, image_height, image_width, device=device)
|
||||||
|
|
||||||
c, y, x = (i.flatten() for i in torch.split(indices, 1, dim=-1))
|
c, y, x = (i.flatten() for i in torch.split(indices, 1, dim=-1))
|
||||||
|
c, y, x = c.cpu(), y.cpu(), x.cpu()
|
||||||
collated_batch = {
|
collated_batch = {
|
||||||
key: value[c, y, x] for key, value in batch.items() if key != "image_idx" and value is not None
|
key: value[c, y, x] for key, value in batch.items() if key != "image_idx" and value is not None
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user