all projects

photo-dedupe

Finds the same photo in Apple Photos and Google Photos, even after recompression.

Demo coming soon. The repository has the real thing in the meantime.

Role
Solo. Scanners, cross-check, report and review UI.
Outcome
A dry-run pipeline that indexes both libraries, matches near-identical images by Hamming distance and writes a report. It never deletes anything.
Stack
Python, perceptual hashing, osxphotos

Two photo libraries drift apart: the same picture ends up in Apple Photos and in a Google Photos export, recompressed or lightly edited, so byte-for-byte comparison misses it.

  • Perceptual hashing: every image gets a pHash; two photos match when their hashes are within a configurable Hamming distance (0 is exact, 10 is loose).
  • Two scanners, one index format: the Apple scanner reads the Photos database through osxphotos; the Google scanner walks a Takeout export. Both write the same JSON records.
  • Cross-check and keeper rules: pairs are scored, and a rule (higher resolution, or earlier timestamp) picks which copy to keep.
  • Dry run by design: the tool produces an index, a report and a review UI. What to delete stays a human decision.