MCPcopy Create free account
hub / github.com/JasonLSC/GSCodec_Studio / construct_list_of_attributes

Function construct_list_of_attributes

examples/utils.py:295–307  ·  view source on GitHub ↗
(splats)

Source from the content-addressed store, hash-verified

293 quats = splats["quats"].detach().cpu().numpy()
294
295 def construct_list_of_attributes(splats):
296 l = ['x', 'y', 'z', 'nx', 'ny', 'nz']
297
298 for i in range(splats["sh0"].shape[1]*splats["sh0"].shape[2]):
299 l.append('f_dc_{}'.format(i))
300 for i in range(splats["shN"].shape[1]*splats["shN"].shape[2]):
301 l.append('f_rest_{}'.format(i))
302 l.append('opacity')
303 for i in range(splats["scales"].shape[1]):
304 l.append('scale_{}'.format(i))
305 for i in range(splats["quats"].shape[1]):
306 l.append('rot_{}'.format(i))
307 return l
308
309 dtype_full = [(attribute, 'f4') for attribute in construct_list_of_attributes(splats)]
310

Callers 1

save_plyFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected