pub struct GridMultiObjectDetector {
pub grid_w: u32,
pub grid_h: u32,
pub min_score: f32,
pub nms_iou: f32,
/* private fields */
}Expand description
Configurable multi-object grid detector.
Fields§
§grid_w: u32§grid_h: u32§min_score: f32§nms_iou: f32Implementations§
Source§impl GridMultiObjectDetector
impl GridMultiObjectDetector
Sourcepub fn model_hash(&self) -> u64
pub fn model_hash(&self) -> u64
model hash.
Sourcepub fn propose_cells(
&self,
image: ImageView<'_>,
frame_index: u32,
out: &mut [Detection],
) -> Result<usize, VisionError>
pub fn propose_cells( &self, image: ImageView<'_>, frame_index: u32, out: &mut [Detection], ) -> Result<usize, VisionError>
Emit raw cell proposals (no NMS). Writes up to out.len() detections.
Sourcepub fn detect(
&self,
image: ImageView<'_>,
frame_index: u32,
out: &mut [Detection],
workspace: &mut [u8],
) -> Result<usize, VisionError>
pub fn detect( &self, image: ImageView<'_>, frame_index: u32, out: &mut [Detection], workspace: &mut [u8], ) -> Result<usize, VisionError>
Full pipeline: cell proposals → NMS → out.
workspace must hold ≥ MAX_DETECTIONS bytes (NMS flags) + room for proposal scratch
if using the in-place path; we use stack proposal buffer of MAX_DETECTIONS.
Trait Implementations§
Source§impl Clone for GridMultiObjectDetector
impl Clone for GridMultiObjectDetector
Source§impl Debug for GridMultiObjectDetector
impl Debug for GridMultiObjectDetector
Source§impl Default for GridMultiObjectDetector
impl Default for GridMultiObjectDetector
Source§impl VisualModel for GridMultiObjectDetector
impl VisualModel for GridMultiObjectDetector
Source§fn capabilities(&self) -> VisualCapabilities
fn capabilities(&self) -> VisualCapabilities
Visual capabilities.
Source§fn infer(
&mut self,
image: ImageView<'_>,
detections_out: &mut [Detection],
embedding_out: &mut [f32],
workspace: &mut [u8],
) -> Result<VisualOutputCounts, VisionError>
fn infer( &mut self, image: ImageView<'_>, detections_out: &mut [Detection], embedding_out: &mut [f32], workspace: &mut [u8], ) -> Result<VisualOutputCounts, VisionError>
Runs inference.
Auto Trait Implementations§
impl Freeze for GridMultiObjectDetector
impl RefUnwindSafe for GridMultiObjectDetector
impl Send for GridMultiObjectDetector
impl Sync for GridMultiObjectDetector
impl Unpin for GridMultiObjectDetector
impl UnsafeUnpin for GridMultiObjectDetector
impl UnwindSafe for GridMultiObjectDetector
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.