1 data_handling.vin_store.inventory

data_handling.vin_store.inventory

Reusable visual-inventory diagnostics for immutable VIN offline samples.

The collector in this module validates the app-facing VinOfflineSample object built by VinOfflineDataset and records which optional visual payloads are available for downstream diagnostics. Required model and oracle fields raise actionable errors in strict mode, while missing optional rich visual blocks are surfaced as warnings.

1.1 Classes

Name Description
OfflineVisualInventory Summary of required and optional visual payloads for one offline sample.
OfflineVisualInventoryError Raised when an offline sample is missing required visual-inventory fields.

1.1.1 OfflineVisualInventory

data_handling.vin_store.inventory.OfflineVisualInventory(
    sample_key,
    sample_index,
    split,
    scene_id,
    snippet_id,
    candidate_count,
    candidate_width,
    candidate_valid_mask,
    accuracy_delta,
    completeness_delta,
    has_candidates,
    has_candidate_mask,
    has_candidate_invalid_reasons,
    has_depths,
    has_candidate_pcs,
    has_semidense_points,
    has_candidate_points,
    has_gt_mesh,
    has_gt_obbs,
    has_detected_obbs,
    has_trajectory,
    has_rgb_keyframes,
    has_depth_keyframes,
    has_backbone_voxel_extent,
    has_backbone_points,
    errors=(),
    warnings=(),
    metadata=dict(),
)

Summary of required and optional visual payloads for one offline sample.

1.1.1.1 Attributes

Name Description
sample_key Stable dataset sample key.
sample_index Global zero-based sample index.
split Dataset split membership.
scene_id ASE scene identifier.
snippet_id ASE snippet identifier.
candidate_count Number of valid prefix candidates.
candidate_width Stored candidate tensor width, derived from oracle.rri.
candidate_valid_mask Boolean prefix mask over candidate_width candidates.
accuracy_delta Per-candidate pm_acc_before - pm_acc_after tensor.
completeness_delta Per-candidate pm_comp_before - pm_comp_after tensor.
has_candidates Whether the optional candidate-sampling payload is present.
has_candidate_mask Whether the candidate payload exposes mask_valid.
has_candidate_invalid_reasons Whether candidate rule masks/invalid reasons are present.
has_depths Whether cached candidate depth maps are present.
has_candidate_pcs Whether cached candidate point clouds are present.
has_semidense_points Whether candidate point-cloud diagnostics include semidense points.
has_candidate_points Whether candidate point-cloud diagnostics include candidate points.
has_gt_mesh Whether a live EFM snippet exposes a GT mesh.
has_gt_obbs Whether a live EFM snippet exposes GT/snippet OBBs.
has_detected_obbs Whether compact detected OBBs are available.
has_trajectory Whether trajectory metadata is available.
has_rgb_keyframes Whether a live EFM RGB camera stream is available for keyframe logging.
has_depth_keyframes Whether a live EFM RGB depth stream is available for keyframe logging.
has_backbone_voxel_extent Whether cached backbone diagnostics include a voxel extent.
has_backbone_points Whether cached backbone diagnostics include world-space voxel points.
errors Required-field validation errors collected when strict=False.
warnings Optional-field warnings and non-fatal diagnostic notes.
metadata Shape and count metadata useful for display panels.
ok Return whether all required checks passed.

1.1.2 OfflineVisualInventoryError

data_handling.vin_store.inventory.OfflineVisualInventoryError(errors)

Raised when an offline sample is missing required visual-inventory fields.

1.2 Functions

Name Description
collect_offline_visual_inventory Collect visual diagnostics for a VinOfflineSample.

1.2.1 collect_offline_visual_inventory

data_handling.vin_store.inventory.collect_offline_visual_inventory(
    sample,
    *,
    strict=True,
)

Collect visual diagnostics for a VinOfflineSample.

1.2.1.1 Parameters

Name Type Description Default
sample VinOfflineSample Offline sample returned by VinOfflineDataset with return_format="sample". required
strict bool If True, raise OfflineVisualInventoryError when a required field is absent or invalid. Optional visual payloads are always represented as warnings instead of failures. True

1.2.1.2 Returns

Name Type Description
OfflineVisualInventory Inventory summary with required metadata, derived masks/deltas, optional
OfflineVisualInventory payload booleans, warnings, and shape metadata.
Back to top