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

Function load_file

tests/python/strided_conv.py:63–71  ·  view source on GitHub ↗
(file_name, voxel_size)

Source from the content-addressed store, hash-verified

61
62
63def load_file(file_name, voxel_size):
64 pcd = o3d.io.read_point_cloud(file_name)
65 coords = torch.from_numpy(np.array(pcd.points))
66 feats = torch.from_numpy(np.array(pcd.colors)).float()
67
68 quantized_coords = torch.floor(coords / voxel_size).int()
69 inds, inverse_inds = quantize(quantized_coords)
70
71 return quantized_coords[inds], feats[inds], pcd
72
73
74def generate_input_sparse_tensor(file_name, voxel_size=0.05, batch_size=1):

Callers 1

Calls 2

floatMethod · 0.80
quantizeFunction · 0.70

Tested by

no test coverage detected