pub struct FaceClusterer { /* private fields */ }Expand description
Agglomerative clusterer with complete linkage.
Implementations§
Source§impl FaceClusterer
impl FaceClusterer
pub fn with_max_distance(self, max_distance: f32) -> Self
Sourcepub fn cluster(
&self,
faces: &[ClusterInput],
negatives: Option<&HashSet<(i64, i64)>>,
) -> HashMap<i64, i32>
pub fn cluster( &self, faces: &[ClusterInput], negatives: Option<&HashSet<(i64, i64)>>, ) -> HashMap<i64, i32>
Cluster faces and return map of face_id -> cluster_label (-1 = singleton/noise).
negatives is an optional set of (face_id, not_cluster_id) pairs from
the face_negatives table. When present, two faces whose current clusters
are blocked by a negative constraint will not be merged.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FaceClusterer
impl RefUnwindSafe for FaceClusterer
impl Send for FaceClusterer
impl Sync for FaceClusterer
impl Unpin for FaceClusterer
impl UnsafeUnpin for FaceClusterer
impl UnwindSafe for FaceClusterer
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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().