pub struct FaceProcessor;Expand description
Face processing pipeline
Call process_photos to run the full detect -> embed -> cluster pipeline.
Implementations§
Source§impl FaceProcessor
impl FaceProcessor
Sourcepub fn run_clustering(
face_repo: &FaceRepo<'_>,
clustering_threshold: f32,
resolver_weights: ResolverWeights,
) -> Result<usize, String>
pub fn run_clustering( face_repo: &FaceRepo<'_>, clustering_threshold: f32, resolver_weights: ResolverWeights, ) -> Result<usize, String>
Run incremental clustering in two stages:
- Gallery k-NN retrieval + confidence bands: HIGH -> auto-assign to top cluster AMBIGUOUS -> queue for user review LOW -> leave for Stage 2
- Complete-link agglomerative clustering on still-unresolved faces
Public so integration tests (and re-cluster-only flows that skip
detection) can call it without going through the full
process_photos pipeline.
Source§impl FaceProcessor
impl FaceProcessor
Sourcepub fn process_photos(
drive_path: &Path,
model_dir: &Path,
detector_confidence: f32,
clustering_threshold: f32,
resolver_weights: ResolverWeights,
progress_tx: Option<Sender<FaceProcessingProgress>>,
cancel_flag: Option<Arc<AtomicBool>>,
) -> Result<FaceProcessingResult, String>
pub fn process_photos( drive_path: &Path, model_dir: &Path, detector_confidence: f32, clustering_threshold: f32, resolver_weights: ResolverWeights, progress_tx: Option<Sender<FaceProcessingProgress>>, cancel_flag: Option<Arc<AtomicBool>>, ) -> Result<FaceProcessingResult, String>
Run the full face processing pipeline on unprocessed photos.
Uses rayon for parallel detection/embedding with thread-local ONNX sessions, then batches DB writes for efficiency.
Auto Trait Implementations§
impl Freeze for FaceProcessor
impl RefUnwindSafe for FaceProcessor
impl Send for FaceProcessor
impl Sync for FaceProcessor
impl Unpin for FaceProcessor
impl UnsafeUnpin for FaceProcessor
impl UnwindSafe for FaceProcessor
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