lingvo.tasks.car.base_decoder module

Base models for point-cloud based detection.

class lingvo.tasks.car.base_decoder.BaseDecoder(*args, **kwargs)[source]

Bases: lingvo.core.base_layer.BaseLayer

A decoder to use for decoding a detector model.

classmethod Params()[source]

Returns the layer params.

_SampleLaserForVisualization(points_xyz, points_padding)[source]

Samples laser points based on configured laser_sampling_rate.

Parameters
  • points_xyz – [batch, num_points, 3] float Tensor.

  • points_padding – [batch, num_points] float Tensor.

Returns

  • points_xyz: 0.0 or points_xyz float Tensor passthrough.

  • points_padding: 0.0 or points_padding float Tensor passthrough.

  • points_sampled: scalar bool Tensor if points were sampled. If false, points_xyz and points_padding are scalar 0s to reduce the amount of data transferred.

Return type

NestedMap

SaveTensors(tensor_map)[source]

Returns a serialized representation of the contents of tensor_map.

Parameters

tensor_map – A NestedMap of string keys to numpy arrays.

Returns

A serialized record_pb2.Record() of the contents of ‘tensor_map’.