TransformedFrameData¶
- class standard_e2e.data_structures.TransformedFrameData(**data)[source]¶
Bases:
BaseModelRepresents a single frame data with associated metadata, transformed by Adapters. A finalized, training-ready structure, loaded by Dataset: Raw frame data -> StandardFrameData -> TransformedFrameData.
- Parameters:
- global_position¶
World-frame position data; defaults to a zeroed position if not provided.
- Type:
Trajectory | None
- filename¶
Auto-generated file name of the frame npz; computed as
{dataset_name}/{split}/{segment_id}_{frame_id}.npzwhen missing.- Type:
str | None
- modality_defaults¶
Optional default handlers used to normalize modality data.
- Type:
dict[Modality, ModalityDefaults] | None
- Private Attributes:
- _modality_data (dict[Modality, Any]): Raw modality-specific payloads,
stored privately for compatibility with legacy code.
Use get_modality_data() to access.
- get_modality_data(modality, set_default=True)[source]¶
Retrieve payload for a modality, optionally normalizing via its default handler.
- to_npz(path)[source]¶
Serialize the frame (including modality data) to a compressed
.npzfile.- Parameters:
path (str)
- from_npz(path, required_modalities=None)[source]¶
Loads a frame from
.npz, optionally ensuring required modalities exist (inserting None) and applying defaults.- Parameters:
- Return type:
- classmethod from_npz(path, required_modalities=None)[source]¶
Load the frame data from a .npz file.
- Return type:
- Parameters:
- get_modality_data(modality, set_default=True)[source]¶
Retrieve modality-specific data from the stored modality map.
- Parameters:
- Returns:
The raw or normalized modality data, or None if the modality key is not present.
- Return type:
- get_present_modality_keys()[source]¶
Return the list of modality keys currently present in the frame data.
- global_position: Trajectory | None¶
- modality_defaults: dict[Modality, ModalityDefaults] | None¶