1 targets
targets
Sanitized target instructions shared across ARIA-NBV owners.
1.1 Package guide
aria_nbv.targets owns actor-safe target instructions. It converts observed detector OBBs into stable descriptors without carrying ground-truth rows, matching diagnostics, labels, gains, or rollout storage details.
1.2 Public API
from aria_nbv.targets import observed_target_descriptors
observed = observed_target_descriptors(vin_offline_sample)
valid = tuple(item.descriptor for item in observed if item.descriptor is not None)TargetDescriptor contains semantic identity, object pose, full metric extents, and the object pose relative to the snippet reference rig. ObservedTargetDescriptor additionally retains actor-visible source identity, confidence, and a provenance hash.
1.3 Ownership Boundary
targets.selectionreads detected OBBs only and preserves their source-row ordering.targets.protocoldefines the target-input protocol and label-evidence admission vocabulary used by stores and QH readers.oracle.target_selectionperforms privileged GT matching and task sampling.- Oracle labels, crop geometry, invalidity, and rollout persistence never enter
TargetDescriptor.
The detailed field and frame contracts live in the public docstrings and generated API reference.
1.4 Verification
cd aria_nbv
uv run ruff check aria_nbv/targets
uv run pytest tests/targets tests/oracle/test_target_selection.py1.5 Classes
| Name | Description |
|---|---|
| ObservedTargetDescriptor | One actor-visible detected OBB and its stable descriptor identity. |
| TargetDescriptor | Sanitized target instruction for target-conditioned candidate generation. |
1.5.1 ObservedTargetDescriptor
targets.ObservedTargetDescriptor(
sample_key,
source,
source_row,
target_id,
descriptor,
confidence,
inst_id,
obb_data=None,
)One actor-visible detected OBB and its stable descriptor identity.
No ground-truth row, match score, or privileged label is present. The descriptor_hash is intended for manifest/evidence provenance only.
1.5.1.1 Attributes
| Name | Description |
|---|---|
| sample_key | Immutable source sample identity. |
| source | Actor-visible OBB source label. |
| source_row | Row index in the detected OBB table before padding removal. |
| target_id | Stable identity for this detected source row. |
| descriptor | Sanitized actor instruction, or None for retained invalid geometry. |
| confidence | Detector confidence retained for audit. |
| inst_id | Detector instance identifier. |
| obb_data | Flattened actor OBB payload retained for privileged evaluation only. |
| descriptor_hash | Return the canonical hash of actor-visible identity fields. |
1.5.2 TargetDescriptor
targets.TargetDescriptor(
sem_id,
class_name,
pose_world_object,
extents_m,
relative_pose_reference_object,
)Sanitized target instruction for target-conditioned candidate generation.
The descriptor is a semantic task instruction. It may be GT-derived when an oracle specifies the task, but it does not carry GT source rows, matching diagnostics, crop state, labels, gains, invalidity, headroom, or persisted Zarr details.
1.5.2.1 Attributes
| Name | Description |
|---|---|
| sem_id | Semantic class identifier for the target. |
| class_name | Human-readable semantic class name. |
| pose_world_object | Flattened 12-value object-to-world pose. |
| extents_m | Full object side lengths in metres. |
| relative_pose_reference_object | Flattened 12-value object pose in the snippet reference frame. |
| center_world | Target center in world coordinates, metres. |
| target_id | Return a stable actor-safe diagnostic id derived from descriptor fields. |
1.5.2.2 Methods
| Name | Description |
|---|---|
| center_world_tensor | Return center_world as a 3-vector tensor. |
1.5.2.2.1 center_world_tensor
targets.TargetDescriptor.center_world_tensor(dtype=torch.float32)Return center_world as a 3-vector tensor.
1.6 Functions
| Name | Description |
|---|---|
| observed_target_descriptors | Convert detected OBB rows into deterministic actor-visible descriptors. |
1.6.1 observed_target_descriptors
targets.observed_target_descriptors(sample)Convert detected OBB rows into deterministic actor-visible descriptors.
Padded rows are omitted and source-row order is preserved. The function reads only actor-visible geometry, the neutral reference-frame pose, and sample identity; it never accesses the oracle payload or GT OBBs.