pub struct CnnEmbedder { /* private fields */ }Expand description
CNN Embedder for feature extraction
Implementations§
Source§impl CnnEmbedder
impl CnnEmbedder
Sourcepub fn new(config: EmbeddingConfig) -> CnnResult<Self>
pub fn new(config: EmbeddingConfig) -> CnnResult<Self>
Create a new CNN embedder with the given configuration
Sourcepub fn new_v3_small() -> CnnResult<Self>
pub fn new_v3_small() -> CnnResult<Self>
Create a MobileNet-V3 Small embedder
Sourcepub fn new_v3_large() -> CnnResult<Self>
pub fn new_v3_large() -> CnnResult<Self>
Create a MobileNet-V3 Large embedder
Sourcepub fn extract(
&self,
image_data: &[u8],
width: u32,
height: u32,
) -> CnnResult<Vec<f32>>
pub fn extract( &self, image_data: &[u8], width: u32, height: u32, ) -> CnnResult<Vec<f32>>
Extract embedding from image data (RGBA format)
Sourcepub fn embedding_dim(&self) -> usize
pub fn embedding_dim(&self) -> usize
Get the embedding dimension
Sourcepub fn input_size(&self) -> u32
pub fn input_size(&self) -> u32
Get the input size
Trait Implementations§
Source§impl Clone for CnnEmbedder
impl Clone for CnnEmbedder
Source§fn clone(&self) -> CnnEmbedder
fn clone(&self) -> CnnEmbedder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CnnEmbedder
impl Debug for CnnEmbedder
Auto Trait Implementations§
impl Freeze for CnnEmbedder
impl RefUnwindSafe for CnnEmbedder
impl Send for CnnEmbedder
impl Sync for CnnEmbedder
impl Unpin for CnnEmbedder
impl UnsafeUnpin for CnnEmbedder
impl UnwindSafe for CnnEmbedder
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