Spaces:
Running
on
Zero
Running
on
Zero
set sh degree as 0
Browse files- scene/gaussian_model.py +7 -7
scene/gaussian_model.py
CHANGED
@@ -332,13 +332,13 @@ class GaussianModel:
|
|
332 |
features_dc[:, 2, 0] = np.asarray(plydata.elements[0]["f_dc_2"])
|
333 |
|
334 |
# extra_f_names = [p.name for p in plydata.elements[0].properties if p.name.startswith("f_rest_")]
|
335 |
-
extra_f_names = sorted(extra_f_names, key = lambda x: int(x.split('_')[-1]))
|
336 |
-
assert len(extra_f_names)==3*(self.max_sh_degree + 1) ** 2 - 3
|
337 |
-
features_extra = np.zeros((xyz.shape[0], len(extra_f_names)))
|
338 |
-
for idx, attr_name in enumerate(extra_f_names):
|
339 |
-
|
340 |
-
# Reshape (P,F*SH_coeffs) to (P, F, SH_coeffs except DC)
|
341 |
-
features_extra = features_extra.reshape((features_extra.shape[0], 3, (self.max_sh_degree + 1) ** 2 - 1))
|
342 |
|
343 |
scale_names = [p.name for p in plydata.elements[0].properties if p.name.startswith("scale_")]
|
344 |
scale_names = sorted(scale_names, key = lambda x: int(x.split('_')[-1]))
|
|
|
332 |
features_dc[:, 2, 0] = np.asarray(plydata.elements[0]["f_dc_2"])
|
333 |
|
334 |
# extra_f_names = [p.name for p in plydata.elements[0].properties if p.name.startswith("f_rest_")]
|
335 |
+
# extra_f_names = sorted(extra_f_names, key = lambda x: int(x.split('_')[-1]))
|
336 |
+
# assert len(extra_f_names)==3*(self.max_sh_degree + 1) ** 2 - 3
|
337 |
+
# features_extra = np.zeros((xyz.shape[0], len(extra_f_names)))
|
338 |
+
# for idx, attr_name in enumerate(extra_f_names):
|
339 |
+
# features_extra[:, idx] = np.asarray(plydata.elements[0][attr_name])
|
340 |
+
# # Reshape (P,F*SH_coeffs) to (P, F, SH_coeffs except DC)
|
341 |
+
# features_extra = features_extra.reshape((features_extra.shape[0], 3, (self.max_sh_degree + 1) ** 2 - 1))
|
342 |
|
343 |
scale_names = [p.name for p in plydata.elements[0].properties if p.name.startswith("scale_")]
|
344 |
scale_names = sorted(scale_names, key = lambda x: int(x.split('_')[-1]))
|