Photo near-duplicate detection

DesignMedium40 minGoogle and Apple style

Your task

Design the near-duplicate detection + clustering system for a consumer photo-backup product that has 100B photos and wants to (a) avoid re-storing the same photo a user uploads twice from different devices, and (b) group visually near-identical shots (burst frames, the same scene re-shared/recompressed) so the UI can show one representative and the user can free space. Exact-hash dedup misses re-encoded/resized copies; you need perceptual matching at planet scale without an O(n^2) all-pairs comparison.

It covers

  • Perceptual hash
  • Near duplicate clustering
  • Photo backup