Point#
- class Point(*args, **kwargs)[source]#
Bases:
DictPoint-cloud batch container used across pimm backbones.
A Point (point cloud) in pimm is a dictionary that contains various properties of a batched point cloud. The property with the following names have a specific definition as follows:
“coord”: original coordinate of point cloud;
“grid_coord”: grid coordinate for specific grid size (related to GridSampling);
Point also supports the following optional attributes:
“offset”: if not exist, initialized as batch size is 1;
“batch”: if not exist, initialized as batch size is 1;
“feat”: feature of point cloud, default input of model;
“grid_size”: Grid size of point cloud (related to GridSampling);
Related to serialization:
“serialized_depth”: depth of serialization,
2 ** depth * grid_sizedescribes the maximum of point cloud range;“serialized_code”: a list of serialization codes;
“serialized_order”: a list of serialization order determined by code;
“serialized_inverse”: a list of inverse mapping determined by code;
Related to sparsify (SpConv):
“sparse_shape”: Sparse shape for Sparse Conv Tensor;
“sparse_conv_feat”: SparseConvTensor init with information provide by Point;
- serialization(order='z', depth=None, shuffle_orders=False)[source]#
Serialize points into one or more space-filling curve orderings.
Relies on
grid_coordorcoordplusgrid_size, and writesserialized_code,serialized_order, andserialized_inverse.
- sparsify(pad=96)[source]#
Build an spconv sparse tensor from this point batch.
Point cloud is sparse, here we use “sparsify” to specifically refer to preparing “spconv.SparseConvTensor” for SpConv.
Relies on
feat,batch, and eithergrid_coordorcoordplusgrid_size. Writessparse_shapeandsparse_conv_feat.pad: padding sparse for sparse shape.