pub struct LocalEmbedder { /* private fields */ }Expand description
Local ArcFace Face Embedder using ONNX Runtime.
Implementations§
Source§impl LocalEmbedder
impl LocalEmbedder
Sourcepub fn new_with_threads<P: AsRef<Path>>(
runtime: &OnnxRuntime,
model_path: P,
intra_threads: usize,
) -> Result<Self>
pub fn new_with_threads<P: AsRef<Path>>( runtime: &OnnxRuntime, model_path: P, intra_threads: usize, ) -> Result<Self>
Load the ArcFace model with a specific thread count per session.
Sourcepub fn embed(&mut self, aligned_face: &RgbImage) -> Option<FaceEmbedding>
pub fn embed(&mut self, aligned_face: &RgbImage) -> Option<FaceEmbedding>
Generate embedding for an aligned face image (112x112)
Sourcepub fn embed_batch(&mut self, faces: &[RgbImage]) -> Vec<Option<FaceEmbedding>>
pub fn embed_batch(&mut self, faces: &[RgbImage]) -> Vec<Option<FaceEmbedding>>
Generate embeddings for a batch of aligned face images. Returns one Option per input; None if that input was invalid.
Auto Trait Implementations§
impl Freeze for LocalEmbedder
impl !RefUnwindSafe for LocalEmbedder
impl Send for LocalEmbedder
impl Sync for LocalEmbedder
impl Unpin for LocalEmbedder
impl UnsafeUnpin for LocalEmbedder
impl !UnwindSafe for LocalEmbedder
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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