pub struct FaceDetector { /* private fields */ }Expand description
SCRFD Face Detector
Implementations§
Source§impl FaceDetector
impl FaceDetector
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 SCRFD model with a specific thread count per session.
Sourcepub fn with_confidence_threshold(self, threshold: f32) -> Self
pub fn with_confidence_threshold(self, threshold: f32) -> Self
Set confidence threshold for detection
Sourcepub fn detect(&mut self, image: &DynamicImage) -> Vec<DetectedFace>
pub fn detect(&mut self, image: &DynamicImage) -> Vec<DetectedFace>
Detect faces in an image
Sourcepub fn detect_adaptive(&mut self, image: &DynamicImage) -> Vec<DetectedFace>
pub fn detect_adaptive(&mut self, image: &DynamicImage) -> Vec<DetectedFace>
Detect faces with adaptive multi-scale fallback for high-res images.
Pass 1: normal full-frame detection. Pass 2 (fallback): overlapping high-res tiles if pass 1 found no faces and image is large, to recover small/profile faces lost by global resizing.
Auto Trait Implementations§
impl Freeze for FaceDetector
impl !RefUnwindSafe for FaceDetector
impl Send for FaceDetector
impl Sync for FaceDetector
impl Unpin for FaceDetector
impl UnsafeUnpin for FaceDetector
impl !UnwindSafe for FaceDetector
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