pub struct PerceptionArtifacts {
pub detections: DetectionSet,
pub tracks: Vec<Track>,
pub tracks_authoritative: bool,
pub signals: Vec<DerivedSignal>,
pub scene_features: Vec<SceneFeature>,
pub stage_artifacts: TypedMetadata,
}Expand description
Accumulated outputs of all stages that have run so far for this frame.
Built up incrementally by the pipeline executor. Stage N+1 sees the
accumulated result of stages 0..N through StageContext::artifacts.
§Merge semantics
| Field | Behavior |
|---|---|
detections | Replace — latest Some(DetectionSet) wins |
tracks | Replace — latest Some(Vec<Track>) wins |
signals | Append — all signals accumulate |
scene_features | Append — all scene features accumulate |
stage_artifacts | Merge — last-writer-wins per TypeId |
§Extension seam: stage_artifacts
The stage_artifacts field is the primary
inter-stage communication channel for data that does not fit the
built-in fields. Any Clone + Send + Sync + 'static value can be
stored by type.
A pre-processing stage can assemble a sliding window of frames
(e.g., Arc<[FrameEnvelope]>) and store it as a typed artifact for a
downstream temporal or clip-based model to consume, without any changes
to the core pipeline execution model.
Fields§
§detections: DetectionSetCurrent detection set (replaced by each stage that returns detections).
tracks: Vec<Track>Current track set (replaced by each stage that returns tracks).
When tracks_authoritative is true,
this is the complete set of active tracks for the frame. Tracks
previously known to the temporal store but absent here are considered
normally ended (TrackEnded).
Whether any stage produced authoritative track output this frame.
Set to true when at least one stage returns Some(tracks) in its
StageOutput. When false, no stage claimed
ownership of the track set, and the executor must not infer
track endings from the (default-empty) tracks field.
signals: Vec<DerivedSignal>Accumulated signals from all stages.
scene_features: Vec<SceneFeature>Scene-level features accumulated from all stages.
stage_artifacts: TypedMetadataTyped artifacts from stages — keyed by TypeId, last-writer-wins.
This is the extension seam for arbitrary inter-stage data: feature
maps, prepared input tensors, multi-frame windows, calibration
metadata, or any domain-specific payload. Downstream stages access
stored values via StageContext::artifacts.stage_artifacts.get::<T>().
Implementations§
Source§impl PerceptionArtifacts
impl PerceptionArtifacts
Sourcepub fn merge(&mut self, output: StageOutput)
pub fn merge(&mut self, output: StageOutput)
Merge a StageOutput into the accumulator.
Applies the merge semantics documented above.
Trait Implementations§
Source§impl Clone for PerceptionArtifacts
impl Clone for PerceptionArtifacts
Source§fn clone(&self) -> PerceptionArtifacts
fn clone(&self) -> PerceptionArtifacts
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more