mirror of
https://github.com/graphdeco-inria/gaussian-splatting
synced 2024-11-25 21:28:17 +00:00
added __repr__ to Camera()
This commit is contained in:
parent
27ef163bdf
commit
f934e701b2
@ -56,6 +56,16 @@ class Camera(nn.Module):
|
||||
self.full_proj_transform = (self.world_view_transform.unsqueeze(0).bmm(self.projection_matrix.unsqueeze(0))).squeeze(0)
|
||||
self.camera_center = self.world_view_transform.inverse()[3, :3]
|
||||
|
||||
def __repr__(self):
|
||||
format_string = self.__class__.__name__ + '()\n'
|
||||
for k, v in self.__dict__.items():
|
||||
if torch.is_tensor(v) and v.numel() > 16:
|
||||
format_string +=f" {k}:\t{tuple(v.shape)}\n"
|
||||
else:
|
||||
format_string += f"{k}:\t{v}\n"
|
||||
return format_string
|
||||
|
||||
|
||||
class MiniCam:
|
||||
def __init__(self, width, height, fovy, fovx, znear, zfar, world_view_transform, full_proj_transform):
|
||||
self.image_width = width
|
||||
|
@ -60,7 +60,7 @@ class GaussianModel:
|
||||
|
||||
|
||||
def __repr__(self):
|
||||
format_string = self.__class__.__name__ + '()'
|
||||
format_string = self.__class__.__name__ + '()\n'
|
||||
for k, v in self.__dict__.items():
|
||||
if torch.is_tensor(v):
|
||||
format_string +=f" {k}:\t{tuple(v.shape)}\n"
|
||||
|
Loading…
Reference in New Issue
Block a user