mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-07 00:09:14 +08:00
Fix camera index bug
This commit is contained in:
1 parent
181438a88b
commit
391fd93247
2 files changed
+6
-4
No files matched your search
@@ -80,7 +80,7 @@ def collate_batch(batch, num_rays_per_batch, keep_full_image: bool = False):
|
||||
"""_summary_
|
||||
|
||||
Args:
|
||||
batch (_type_): _description_
|
||||
batch (_type_): _description_
|
||||
"""
|
||||
# TODO(ethan): handle sampling even when in different processes
|
||||
# we don't want the same samples for all spawned processed when
|
||||
@@ -96,6 +96,8 @@ def collate_batch(batch, num_rays_per_batch, keep_full_image: bool = False):
|
||||
mask = batch["mask"][c, y, x]
|
||||
assert pixels.shape == (num_rays_per_batch, 3), pixels.shape
|
||||
|
||||
indices[:, 0] = batch["image_idx"][c]
|
||||
|
||||
collated_batch = {
|
||||
"indices": indices,
|
||||
"pixels": pixels,
|
||||
|
||||
Reference in new issue
Block a user