[][src]Struct opencv::dnn::Model

pub struct Model { /* fields omitted */ }

This class is presented high-level API for neural networks.

Model allows to set params for preprocessing input image. Model creates net from file with trained weights and config, sets preprocessing input and runs forward pass.

Methods

impl Model[src]

pub fn as_raw_Model(&self) -> *mut c_void[src]

pub unsafe fn from_raw_ptr(ptr: *mut c_void) -> Self[src]

impl Model[src]

pub fn default() -> Result<Model>[src]

Default constructor.

pub fn new(model: &str, config: &str) -> Result<Model>[src]

Create model from deep learning network represented in one of the supported formats. An order of @p model and @p config arguments does not matter.

Parameters

  • model: Binary file contains trained weights.
  • config: Text file contains network configuration.

C++ default parameters

  • config: ""

pub fn new_1(network: &dyn NetTrait) -> Result<Model>[src]

Create model from deep learning network.

Parameters

  • network: Net object.

Trait Implementations

impl Drop for Model[src]

impl ModelTrait for Model[src]

impl NetTrait for Model[src]

impl Send for Model[src]

Auto Trait Implementations

impl RefUnwindSafe for Model

impl !Sync for Model

impl Unpin for Model

impl UnwindSafe for Model

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, 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.