LidarBEVAdapter¶
- class standard_e2e.caching.adapters.LidarBEVAdapter(min_x=-32.0, max_x=32.0, min_y=-32.0, max_y=32.0, pixels_per_meter=4.0, max_height=100.0, split_height=0.2, use_ground_plane=False, count_cap=5)[source]¶
Bases:
AbstractAdapterTop-down 2-D histogram of lidar points in vehicle frame.
Implements the Transfuser / CARLA-Garage BEV recipe: drop points above
max_height, optionally split into ground / obstacle channels atsplit_height, then 2-D bin into a regular grid over[min_x, max_x] x [min_y, max_y]atpixels_per_meter. Each channel is the per-cell point count, clipped atcount_capand divided into[0, 1].Output (
Modality.LIDAR_BEV):np.float32array of shape(C, H, W)whereC = 2ifuse_ground_planeelse1. Axis order matchesnp.histogramdd((x, y), ...)soHis the number of x-bins andWthe number of y-bins; with the ground plane channel order is(below, above).- Parameters:
min_x (
float) – BEV x extent in meters (vehicle x is forward).max_x (
float) – BEV x extent in meters (vehicle x is forward).min_y (
float) – BEV y extent in meters (vehicle y is left).max_y (
float) – BEV y extent in meters (vehicle y is left).pixels_per_meter (
float) – grid resolution; cast tointinternally (matches Transfuser).max_height (
float) – drop points withz >= max_height.split_height (
float) – ground / obstacle threshold (z <=-> ground).use_ground_plane (
bool) – include the ground channel.count_cap (
int) – per-cell saturation; histogram clipped at this value before being divided into[0, 1].
- property consumes_attrs: set[StandardFrameDataField]¶
StandardFrameDatafields this adapter reads.Used by source-dataset processors to skip building modalities that no adapter consumes (lazy-load). For example, an
HDMapBEVAdapterreturns{StandardFrameDataField.HD_MAP}; a processor whose adapter chain registers no HD-map adapter can then skip the (often expensive)_build_hd_mapstep entirely.Returning an empty set means “this adapter does not gate any modality build” — appropriate for adapters that read optional
aux_datakeys (e.g. preference trajectories) which the processor populates unconditionally and cheaply.
- property metadata: dict[str, Any]¶
Per-frame metadata this adapter contributes to
aux_data.Override in subclasses to surface adapter-side configuration that a downstream consumer needs to interpret the modality output (e.g. the ordered channel list of a BEV rasterizer). The default is an empty dict; the source dataset processor merges these into each frame’s
aux_dataso the .npz remains self-describing.
- transform(standard_frame_data)¶
Validate input frame and dispatch to subclass implementation.
- Return type:
- Parameters:
standard_frame_data (StandardFrameData)