pub struct Detection {
pub id: DetectionId,
pub class_id: u32,
pub confidence: f32,
pub bbox: BBox,
pub embedding: Option<Vec<f32>>,
pub metadata: TypedMetadata,
}Expand description
A single object detection within one frame.
Detections are produced by detection stages and stored in DetectionSet.
They carry spatial, classification, and optional re-identification data.
Use Detection::builder() for ergonomic construction with optional fields.
Fields§
§id: DetectionIdUnique ID within this frame’s detection set.
class_id: u32Numeric class identifier (model-defined).
confidence: f32Detection confidence score, typically in [0, 1].
bbox: BBoxAxis-aligned bounding box in normalized [0, 1] coordinates.
embedding: Option<Vec<f32>>Optional re-identification or feature embedding vector.
metadata: TypedMetadataExtensible metadata (domain-specific fields, additional scores, etc.).
Implementations§
Source§impl Detection
impl Detection
Sourcepub fn builder(
id: DetectionId,
class_id: u32,
confidence: f32,
bbox: BBox,
) -> DetectionBuilder
pub fn builder( id: DetectionId, class_id: u32, confidence: f32, bbox: BBox, ) -> DetectionBuilder
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Detection
impl !RefUnwindSafe for Detection
impl Send for Detection
impl Sync for Detection
impl Unpin for Detection
impl UnsafeUnpin for Detection
impl !UnwindSafe for Detection
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more