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

Method test_pcd

tests/cpp/convolution_cpu.py:20–35  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

18 print(key)
19
20 def test_pcd(self):
21 coords, colors, pcd = load_file("1.ply")
22 kernel_size = torch.IntTensor([3, 3, 3])
23 for batch_size in [1, 5, 10, 20, 40]:
24 for voxel_size in [0.05, 0.035, 0.02]:
25 min_time = 100000
26 dcoords = torch.from_numpy(np.floor(coords / voxel_size)).int()
27 bcoords = batched_coordinates([dcoords for i in range(batch_size)])
28 for i in range(10):
29 kernel_map, num, t = MinkowskiEngineTest._C.kernel_map_test(
30 bcoords, bcoords, kernel_size
31 )
32 min_time = min(t, min_time)
33
34 num_kernels = np.sum([len(a) for a in kernel_map[0]])
35 print(f"{batch_size}\t{voxel_size}\t{num}\t{num_kernels}\t{min_time}")

Callers

nothing calls this directly

Calls 2

load_fileFunction · 0.90
batched_coordinatesFunction · 0.90

Tested by

no test coverage detected