MCPcopy Create free account
hub / github.com/NVIDIA/MinkowskiEngine / test_pcd

Method test_pcd

tests/python/tensor_field.py:98–107  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

96 )
97
98 def test_pcd(self):
99 coords, colors, pcd = load_file("1.ply")
100 voxel_size = 0.02
101 colors = torch.from_numpy(colors)
102 bcoords = batched_coordinates([coords / voxel_size])
103 tfield = TensorField(colors, bcoords)
104
105 self.assertTrue(len(tfield) == len(colors))
106 stensor = tfield.sparse()
107 print(stensor)
108
109 def test_network(self):
110 coords, colors, pcd = load_file("1.ply")

Callers

nothing calls this directly

Calls 4

sparseMethod · 0.95
load_fileFunction · 0.90
batched_coordinatesFunction · 0.90
TensorFieldClass · 0.90

Tested by

no test coverage detected