Point#

class Point(*args, **kwargs)[source]#

Bases: Dict

Point-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_size describes 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_coord or coord plus grid_size, and writes serialized_code, serialized_order, and serialized_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 either grid_coord or coord plus grid_size. Writes sparse_shape and sparse_conv_feat.

pad: padding sparse for sparse shape.