pub struct ParsedDetections<K: EvalKernel> {
pub detections: CocoDetections,
/* private fields */
}Expand description
Pre-parsed detection batch.
The streaming evaluator’s normal entry point is StreamingEvaluator::update
(raw JSON bytes); this struct names the parsed-but-not-yet-evaluated
shape for callers that want to amortize the parse cost or supply
detections from a non-JSON source. Generic over EvalKernel so the
parsed form is type-tied to the evaluator’s kernel choice — feeding a
ParsedDetections<BboxIou> into a StreamingEvaluator<OksSimilarity>
is a compile-time error.
Fields§
§detections: CocoDetectionsParsed detections.
Implementations§
Source§impl<K: EvalKernel> ParsedDetections<K>
impl<K: EvalKernel> ParsedDetections<K>
Sourcepub fn from_detections(detections: CocoDetections) -> Self
pub fn from_detections(detections: CocoDetections) -> Self
Wrap a pre-built CocoDetections for use with a streaming
evaluator of kernel K.
Sourcepub fn from_json_bytes(bytes: &[u8]) -> Result<Self, EvalError>
pub fn from_json_bytes(bytes: &[u8]) -> Result<Self, EvalError>
Parse detections from the loadRes-shaped JSON byte slice.
§Errors
Propagates EvalError::Json / EvalError::NonFinite from
the underlying CocoDetections::from_json_bytes.
Trait Implementations§
Source§impl<K: Clone + EvalKernel> Clone for ParsedDetections<K>
impl<K: Clone + EvalKernel> Clone for ParsedDetections<K>
Source§fn clone(&self) -> ParsedDetections<K>
fn clone(&self) -> ParsedDetections<K>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<K> Freeze for ParsedDetections<K>
impl<K> RefUnwindSafe for ParsedDetections<K>where
K: RefUnwindSafe,
impl<K> Send for ParsedDetections<K>
impl<K> Sync for ParsedDetections<K>
impl<K> Unpin for ParsedDetections<K>where
K: Unpin,
impl<K> UnsafeUnpin for ParsedDetections<K>
impl<K> UnwindSafe for ParsedDetections<K>where
K: UnwindSafe,
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Returns the layout of the type.
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Returns whether the given value has been niched. Read more
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
Writes data to
out indicating that a T is niched.