mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-01 21:39:06 +08:00
Camera Refactor (#301)
* Start camera refactor * Training runs, but transforms incorrect * Cameras render correctly in viewer. * Fix eval * cleanup * cleanup
This commit is contained in:
1 parent
6bdb26c3a4
commit
04d0165a24
15 files changed
+334
-614
No files matched your search
@@ -26,7 +26,6 @@ import torch
|
||||
from torch import nn
|
||||
from torch.nn import Parameter
|
||||
|
||||
from nerfactory.cameras.cameras import Camera
|
||||
from nerfactory.cameras.rays import RayBundle
|
||||
from nerfactory.configs import base as cfg
|
||||
from nerfactory.dataloaders.structs import SceneBounds
|
||||
@@ -198,11 +197,6 @@ class Model(nn.Module):
|
||||
outputs[output_name] = torch.cat(outputs_list).view(image_height, image_width, -1) # type: ignore
|
||||
return outputs
|
||||
|
||||
def get_outputs_for_camera(self, camera: Camera):
|
||||
"""Get the model outputs for a Camera."""
|
||||
camera_ray_bundle = camera.get_camera_ray_bundle(device=self.device)
|
||||
return self.get_outputs_for_camera_ray_bundle(camera_ray_bundle)
|
||||
|
||||
@abstractmethod
|
||||
def log_test_image_outputs(self, image_idx, step, batch, outputs) -> float:
|
||||
"""Writes the test image outputs.
|
||||
|
||||
Reference in new issue
Block a user