Spaces:
Paused
Paused
Update freesplatter/models/renderer/gaussian_utils.py
Browse files
freesplatter/models/renderer/gaussian_utils.py
CHANGED
|
@@ -70,6 +70,13 @@ def build_scaling_rotation(s, r):
|
|
| 70 |
return L
|
| 71 |
|
| 72 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 73 |
class Camera(nn.Module):
|
| 74 |
def __init__(self, C2W, fxfycxcy, h, w):
|
| 75 |
"""
|
|
@@ -129,11 +136,6 @@ class Camera(nn.Module):
|
|
| 129 |
|
| 130 |
class GaussianModel:
|
| 131 |
def setup_functions(self, scaling_activation_type='sigmoid', scale_min_act=0.001, scale_max_act=0.3, scale_multi_act=0.1):
|
| 132 |
-
def build_covariance_from_scaling_rotation(scaling, scaling_modifier, rotation):
|
| 133 |
-
L = build_scaling_rotation(scaling_modifier * scaling, rotation)
|
| 134 |
-
actual_covariance = L @ L.transpose(1, 2)
|
| 135 |
-
symm = strip_symmetric(actual_covariance)
|
| 136 |
-
return symm
|
| 137 |
|
| 138 |
if scaling_activation_type == 'exp':
|
| 139 |
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 |
class Camera(nn.Module):
|
| 81 |
def __init__(self, C2W, fxfycxcy, h, w):
|
| 82 |
"""
|
|
|
|
| 136 |
|
| 137 |
class GaussianModel:
|
| 138 |
def setup_functions(self, scaling_activation_type='sigmoid', scale_min_act=0.001, scale_max_act=0.3, scale_multi_act=0.1):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 139 |
|
| 140 |
if scaling_activation_type == 'exp':
|
| 141 |
self.scaling_activation = torch.exp
|