HDMapBEVDefaults¶

class standard_e2e.dataset_utils.modality_defaults.HDMapBEVDefaults(shape)[source]¶

Bases: ModalityDefaults

Substitute a missing HD_MAP_BEV modality with a zero tensor of the given (C, H, W) shape. Use from_adapter() so the empty shape stays in sync with the BEV adapter’s output.

Parameters:

shape (tuple[int, int, int])

property allowed_modalities: list[Modality]¶

Return a list of allowed modalities for this defaults handler.

classmethod from_adapter(adapter)[source]¶

Build defaults whose empty shape matches adapter.output_shape.

Return type:

HDMapBEVDefaults

Parameters:

adapter (HDMapBEVAdapter)

normalize(raw_value, modality)¶

Normalize a raw modality payload using the subclass implementation.

Parameters:
  • raw_value (Any) – Raw modality payload (may be None).

  • modality (Modality) – Modality to normalize; must be present in allowed_modalities.

Returns:

The normalized payload produced by _normalize.

Return type:

Any

Raises:

ValueError – If modality is not a Modality enum member or is not allowed for this defaults handler.