mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-11 02:24:38 +08:00
adjust scale factor logic
This commit is contained in:
parent
9e992b9550
commit
0bb199d9e9
@ -432,9 +432,13 @@ class VanillaDataManager(DataManager): # pylint: disable=abstract-method
|
||||
# image_batch["image"].shape == (1, H, W, 3)
|
||||
# this will sample the entire image
|
||||
# we downsample the image so it fits in memory
|
||||
image_batch["image"] = torch.nn.functional.interpolate(
|
||||
image_batch["image"].permute(0, 3, 1, 2), scale_factor=scale_factor, mode="bilinear", align_corners=False
|
||||
).permute(0, 2, 3, 1)
|
||||
if scale_factor != 1.0:
|
||||
image_batch["image"] = torch.nn.functional.interpolate(
|
||||
image_batch["image"].permute(0, 3, 1, 2),
|
||||
scale_factor=scale_factor,
|
||||
mode="bilinear",
|
||||
align_corners=False,
|
||||
).permute(0, 2, 3, 1)
|
||||
|
||||
batch = self.eval_pixel_sampler.sample(image_batch, sample_all_pixels=True)
|
||||
ray_indices = batch["indices"]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user