fix: filter near-uniform pHashes, lower threshold to 3

Near-uniform images (sand close-ups, solid-color shots, blank frames)
have almost no gradient transitions so their dHash has very few set bits.
These match many unrelated photos because "low contrast ≈ low contrast."

- Skip photos whose pHash has <8 or >56 set bits out of 64 before
  comparing — they can't be reliably compared by dHash
- Lower default threshold 5 → 3 (≤3 differing bits = genuinely near-
  identical, e.g. same photo saved at different compression levels)
- Report "N compared" in scan result so skipped photos are visible

Run "Scan library" to replace existing pairs with clean results.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
nmemmertandClaude Sonnet 4.6 committed 2026-08-19 16:29:25 -04:00
1 parent e58e6de125
commit 7236028156
3 files changed
+24 -5

No files matched your search

+1 -1
View File
@@ -7,7 +7,7 @@ const SETTING_DEFAULTS = {
thumb_quality: '80',
preview_size: '1600',
preview_quality: '85',
dedupe_threshold: '5',
dedupe_threshold: '3',
// iCloud Photos sync
icloud_enabled: '0',
icloud_apple_id: '',