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