Skip to main content

DedupConfig

Struct DedupConfig 

Source
pub struct DedupConfig {
Show 18 fields pub database_path: PathBuf, pub perceptual_threshold: f64, pub ssim_threshold: f64, pub histogram_threshold: f64, pub feature_match_threshold: usize, pub audio_threshold: f64, pub metadata_threshold: f64, pub parallel: bool, pub sample_frames: usize, pub chunk_size: usize, pub thumbnail_resolution: usize, pub bloom_prescreen: bool, pub bloom_capacity: usize, pub bloom_fpr: f32, pub use_lsh: bool, pub lsh_num_tables: usize, pub lsh_bits_per_table: usize, pub lsh_seed: u64,
}
Expand description

Configuration for deduplication.

Fields§

§database_path: PathBuf

Database path

§perceptual_threshold: f64

Perceptual hash similarity threshold (0.0-1.0)

§ssim_threshold: f64

SSIM similarity threshold (0.0-1.0)

§histogram_threshold: f64

Histogram similarity threshold (0.0-1.0)

§feature_match_threshold: usize

Feature match threshold (minimum number of matches)

§audio_threshold: f64

Audio fingerprint similarity threshold (0.0-1.0)

§metadata_threshold: f64

Metadata similarity threshold (0.0-1.0)

§parallel: bool

Enable parallel processing

§sample_frames: usize

Number of frames to sample for video analysis

§chunk_size: usize

Chunk size for content-based chunking (bytes)

§thumbnail_resolution: usize

Thumbnail resolution for SSIM duplicate detection.

Specifies both width and height of the grayscale thumbnail used for SSIM comparison. Must be >= 4. Default is 8 (i.e. 8x8 = 64 pixels). Higher values give more accurate SSIM at the cost of storage and CPU.

§bloom_prescreen: bool

Enable bloom filter pre-screening before expensive perceptual comparisons.

When enabled, a bloom filter is used to quickly reject items whose content hash is already known to be unique, avoiding expensive pairwise perceptual hash comparisons.

§bloom_capacity: usize

Expected capacity for the bloom filter pre-screener.

§bloom_fpr: f32

False positive rate for the bloom filter pre-screener.

§use_lsh: bool

Use LSH acceleration for perceptual hash deduplication.

When enabled, find_perceptual_duplicates() uses a BitLshIndex instead of O(n^2) pairwise comparison. This provides sub-quadratic performance for large libraries at the cost of slightly reduced recall.

§lsh_num_tables: usize

Number of LSH hash tables (more = better recall, more memory).

§lsh_bits_per_table: usize

Bits sampled per LSH table (fewer = more candidates = better recall).

§lsh_seed: u64

Deterministic seed for LSH projections.

Trait Implementations§

Source§

impl Clone for DedupConfig

Source§

fn clone(&self) -> DedupConfig

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DedupConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for DedupConfig

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.