bluestyle97 commited on
Commit
974f55b
·
verified ·
1 Parent(s): d9755c0

Update freesplatter/models/renderer_2dgs/gaussian_utils.py

Browse files
freesplatter/models/renderer_2dgs/gaussian_utils.py CHANGED
@@ -70,6 +70,13 @@ def build_scaling_rotation(s, r):
70
  return L
71
 
72
 
 
 
 
 
 
 
 
73
  def depths_to_points(view, depthmap):
74
  c2w = (view.world_view_transform.T).inverse()
75
  W, H = view.w, view.h
@@ -161,11 +168,6 @@ class Camera(nn.Module):
161
 
162
  class GaussianModel:
163
  def setup_functions(self, scaling_activation_type='sigmoid', scale_min_act=0.001, scale_max_act=0.3, scale_multi_act=0.1):
164
- def build_covariance_from_scaling_rotation(scaling, scaling_modifier, rotation):
165
- L = build_scaling_rotation(scaling_modifier * scaling, rotation)
166
- actual_covariance = L @ L.transpose(1, 2)
167
- symm = strip_symmetric(actual_covariance)
168
- return symm
169
 
170
  if scaling_activation_type == 'exp':
171
  self.scaling_activation = torch.exp
 
70
  return L
71
 
72
 
73
+ def build_covariance_from_scaling_rotation(scaling, scaling_modifier, rotation):
74
+ L = build_scaling_rotation(scaling_modifier * scaling, rotation)
75
+ actual_covariance = L @ L.transpose(1, 2)
76
+ symm = strip_symmetric(actual_covariance)
77
+ return symm
78
+
79
+
80
  def depths_to_points(view, depthmap):
81
  c2w = (view.world_view_transform.T).inverse()
82
  W, H = view.w, view.h
 
168
 
169
  class GaussianModel:
170
  def setup_functions(self, scaling_activation_type='sigmoid', scale_min_act=0.001, scale_max_act=0.3, scale_multi_act=0.1):
 
 
 
 
 
171
 
172
  if scaling_activation_type == 'exp':
173
  self.scaling_activation = torch.exp