Expand description
std/vision/v1 — perception outputs (§24.3).
| Type | Layout |
|---|---|
Detections | {boxes: List<FixedSizeList<Float32, 4>>, scores: List<Float32>, labels: List<UInt32>} |
Keypoints | {points: List<FixedSizeList<Float32, 2>>, scores: List<Float32>, labels: List<UInt32>} |
Mask | {width: UInt32, height: UInt32, data: List<UInt16>} |
The three List columns of Detections and Keypoints are
index-aligned: entry i of scores is the confidence of entry i of
boxes. Nothing in the columnar layout enforces that — three lists of
different lengths are a well-formed Struct — so both types check it on
encode and on decode, which is the difference between “the payload is
malformed” and “the labels are silently off by one”.
§Examples
use astrs_node_api::message::{AstrsMessage, BoundingBox, Detections};
let detections = Detections::new(
vec![BoundingBox::new(0.0, 0.0, 10.0, 20.0)],
vec![0.93],
vec![7],
)?;
let batch = detections.to_record_batch()?;
assert_eq!(Detections::from_record_batch(&batch)?.len(), 1);Structs§
- Bounding
Box - One axis-aligned detection box, in image pixel coordinates.
- Detections
- Detection boxes with per-box confidence and label —
std/vision/v1/Detections. - Keypoint
- One landmark, in image pixel coordinates.
- Keypoints
- Landmark sets with per-point confidence —
std/vision/v1/Keypoints. - Mask
- A per-pixel label plane —
std/vision/v1/Mask, row-major.
Functions§
- detection_
boxes - The
boxescolumn of aDetectionspayload, without decoding the rest. - mask_
labels - The raw
datacolumn of aMaskpayload, without copying the dimensions.