1 EfmSnippetView
data_handling.EfmSnippetView(
efm,
scene_id,
snippet_id,
mesh=None,
crop_bounds=None,
mesh_verts=None,
mesh_faces=None,
mesh_cache_key=None,
mesh_specs=None,
)Typed wrapper over an EFM-formatted sample plus optional mesh.
1.1 Attributes
| Name | Description |
|---|---|
| efm | Backing EFM sample dictionary (zero-copy). |
| scene_id | ASE scene identifier (e.g., 81283). |
| snippet_id | Snippet/shard identifier (e.g., shards-0000). |
| mesh | Optional GT mesh paired with this sample. |
| crop_bounds | Optional (min, max) world-space AABB used for mesh cropping / occupancy. |
| mesh_verts | Optional cached mesh vertices tensor (float32, device-agnostic). |
| mesh_faces | Optional cached mesh faces tensor (int64). |
| mesh_cache_key | Stable key (spec hash) for shared mesh caches across components. |
| mesh_specs | Optional mesh processing specification used to derive attached mesh tensors. |
| camera_rgb | RGB stream (fisheye624, 240x240 in ASE preprocessing). |
| camera_slam_left | Left SLAM mono stream (fisheye624, ~320x240). |
| camera_slam_right | Right SLAM mono stream (fisheye624, ~320x240). |
| trajectory | Rig trajectory (world←rig) aligned to snippet frames. |
| semidense | Semi-dense SLAM points (padded to fixed length). |
| obbs | Snippet-level OBBs (if present). |
| gt | Ground-truth dict gt_data (EFM OBBs per timestamp/camera). |
| has_mesh | Return whether a ground-truth mesh is attached to the snippet. |
1.2 Methods
| Name | Description |
|---|---|
| from_cache_efm | Construct a snippet view from an offline-cache EFM dict. |
| get_camera | Return the requested camera stream view from the backing EFM dict. |
| get_occupancy_extend | Return [xmin, xmax, ymin, ymax, zmin, zmax] AABB in world frame. |
| to | Shallow device move for heavy tensors. |
| prune_efm | Return a view with the EFM dict pruned to the requested keys. |
1.2.1 from_cache_efm
data_handling.EfmSnippetView.from_cache_efm(
efm,
*,
mesh=None,
crop_bounds=None,
mesh_verts=None,
mesh_faces=None,
mesh_cache_key=None,
mesh_specs=None,
)Construct a snippet view from an offline-cache EFM dict.
1.2.1.1 Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| efm | dict[str, Any] | Raw cache sample dict that includes "__key__". |
required |
| mesh | Trimesh | None | Optional GT mesh to attach. | None |
| crop_bounds | tuple[torch.Tensor, torch.Tensor] | None | Optional world-space AABB override. | None |
| mesh_verts | torch.Tensor | None | Optional cached mesh vertices. | None |
| mesh_faces | torch.Tensor | None | Optional cached mesh faces. | None |
| mesh_cache_key | str | None | Optional mesh cache key for shared caches. | None |
| mesh_specs | MeshProcessSpec | None | Optional mesh processing spec. | None |
1.2.1.2 Returns
| Name | Type | Description |
|---|---|---|
| 'EfmSnippetView' | Parsed EfmSnippetView instance. |
1.2.2 get_camera
data_handling.EfmSnippetView.get_camera(prefix)Return the requested camera stream view from the backing EFM dict.
1.2.3 get_occupancy_extend
data_handling.EfmSnippetView.get_occupancy_extend()Return [xmin, xmax, ymin, ymax, zmin, zmax] AABB in world frame.
1.2.4 to
data_handling.EfmSnippetView.to(device, *, dtype=None)Shallow device move for heavy tensors.
1.2.5 prune_efm
data_handling.EfmSnippetView.prune_efm(keep_keys, *, keep_prefixes=())Return a view with the EFM dict pruned to the requested keys.
1.2.5.1 Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| keep_keys | set[str] | None | Exact EFM keys to retain. None returns self unchanged. |
required |
| keep_prefixes | tuple[str, …] | Optional prefixes; keys starting with any prefix are retained. | () |