class*args, **kwargs)

Object detection model. Based on the PointPillars architecture

  • name (string) – Name of model. Default to “PointPillars”.

  • voxel_size – voxel edge lengths with format [x, y, z].

  • point_cloud_range – The valid range of point coordinates as [x_min, y_min, z_min, x_max, y_max, z_max].

  • voxelize – Config of PointPillarsVoxelization module.

  • voxelize_encoder – Config of PillarFeatureNet module.

  • scatter – Config of PointPillarsScatter module.

  • backbone – Config of backbone module (SECOND).

  • neck – Config of neck module (SECONDFPN).

  • head – Config of anchor head module.

__init__(name='PointPillars', point_cloud_range=[0, - 40.0, - 3, 70.0, 40.0, 1], classes=['car'], voxelize={}, voxel_encoder={}, scatter={}, backbone={}, neck={}, head={}, loss={}, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

augment_data(data, attr)
call(inputs, training=True)

Forward pass.

  • inputs – tuple/list of inputs (points, bboxes, labels, calib)

  • training – toggle training run

extract_feats(points, training=False)

Extract features from points.

get_batch_gen(dataset, steps_per_epoch=None, batch_size=1)

Returns an optimizer object for the model.


cfg_pipeline – A Config object with the configuration of the pipeline.


Returns a new optimizer object.

inference_end(results, inputs)

This function is called after the inference.

This function can be implemented to apply post-processing on the network outputs.


results – The model outputs as returned by the call() function. Post-processing is applied on this object.


Returns True if the inference is complete and otherwise False. Returning False can be used to implement inference for large point clouds which require multiple passes.

load_gt_database(pickle_path, min_points_dict, sample_dict)
loss(results, inputs, training=True)

Computes loss.

  • results – results of forward pass (scores, bboxes, dirs)

  • inputs – tuple/list of gt inputs (points, bboxes, labels, calib)

preprocess(data, attr)

Data preprocessing function.

This function is called before training to preprocess the data from a dataset.

  • data – A sample from the dataset.

  • attr – The corresponding attributes.


Returns the preprocessed data

transform(data, attr)

Transform function for the point cloud and features.


args – A list of tf Tensors.


Apply hard voxelization to points.