[][src]Struct darknet::Detections

pub struct Detections { /* fields omitted */ }

Methods

impl Detections[src]

pub fn new(
    detections: Vec<detection>,
    names: &Arc<Vec<String>>,
    thresh: f32,
    mask_size: usize
) -> Detections
[src]

pub fn get_boxes(&self) -> Vec<BBox>[src]

Returns vector of bounding boxes

pub fn get_labels(&self) -> Vec<String>[src]

Returns detected object labels

pub fn get_raw_vec(&self) -> Vec<detection>[src]

Returns vector of raw detection type

pub fn draw_on_image(&self, image: &mut Image)[src]

Draws detection boxes with labels on image

pub fn crop_from(&self, img: &Image) -> Vec<(String, Image)>[src]

Crops all detected objects from image
returns Vec<label, image>

pub fn count(&self) -> usize[src]

Returns detections count

Trait Implementations

impl Debug for Detections[src]

impl Drop for Detections[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> SetParameter for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.