Spaces:
Running
on
Zero
Running
on
Zero
Stanislaw Szymanowicz
commited on
Commit
•
7c56dda
1
Parent(s):
0eb811b
Remove culling
Browse files- utils/app_utils.py +6 -8
utils/app_utils.py
CHANGED
@@ -158,15 +158,13 @@ def export_to_obj(reconstruction, ply_out_path):
|
|
158 |
assert v.shape[0] == 1, "Expected batch size to be 0"
|
159 |
reconstruction[k] = v[0]
|
160 |
|
161 |
-
|
162 |
-
|
163 |
-
xyz = reconstruction["xyz"][non_transparent_points].detach().cpu().numpy()
|
164 |
normals = np.zeros_like(xyz)
|
165 |
-
f_dc = reconstruction["features_dc"]
|
166 |
-
f_rest = reconstruction["features_rest"]
|
167 |
-
opacities = reconstruction["opacity"]
|
168 |
-
scale = reconstruction["scaling"]
|
169 |
-
rotation = reconstruction["rotation"]
|
170 |
|
171 |
dtype_full = [(attribute, 'f4') for attribute in construct_list_of_attributes()]
|
172 |
|
|
|
158 |
assert v.shape[0] == 1, "Expected batch size to be 0"
|
159 |
reconstruction[k] = v[0]
|
160 |
|
161 |
+
xyz = reconstruction["xyz"].detach().cpu().numpy()
|
|
|
|
|
162 |
normals = np.zeros_like(xyz)
|
163 |
+
f_dc = reconstruction["features_dc"].detach().transpose(1, 2).flatten(start_dim=1).contiguous().cpu().numpy()
|
164 |
+
f_rest = reconstruction["features_rest"].detach().transpose(1, 2).flatten(start_dim=1).contiguous().cpu().numpy()
|
165 |
+
opacities = reconstruction["opacity"].detach().cpu().numpy()
|
166 |
+
scale = reconstruction["scaling"].detach().cpu().numpy()
|
167 |
+
rotation = reconstruction["rotation"].detach().cpu().numpy()
|
168 |
|
169 |
dtype_full = [(attribute, 'f4') for attribute in construct_list_of_attributes()]
|
170 |
|