Stanislaw Szymanowicz commited on
Commit
7c56dda
1 Parent(s): 0eb811b

Remove culling

Browse files
Files changed (1) hide show
  1. 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
- non_transparent_points = torch.where(reconstruction["opacity"] > 0.005)[0]
162
-
163
- xyz = reconstruction["xyz"][non_transparent_points].detach().cpu().numpy()
164
  normals = np.zeros_like(xyz)
165
- f_dc = reconstruction["features_dc"][non_transparent_points].detach().transpose(1, 2).flatten(start_dim=1).contiguous().cpu().numpy()
166
- f_rest = reconstruction["features_rest"][non_transparent_points].detach().transpose(1, 2).flatten(start_dim=1).contiguous().cpu().numpy()
167
- opacities = reconstruction["opacity"][non_transparent_points].detach().cpu().numpy()
168
- scale = reconstruction["scaling"][non_transparent_points].detach().cpu().numpy()
169
- rotation = reconstruction["rotation"][non_transparent_points].detach().cpu().numpy()
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