Design Near-Duplicate Photo Grouping for Google Photos

Last updated: November 29, 2026

Quick Overview

Design the system that detects near-duplicate and burst photos in a user's Google Photos library and suggests the best shot to keep.

Google
ML System Design
Machine Learning Engineer
Google
November 29, 2026
Machine Learning Engineer
System Design Round
ML System Design
Medium

0

0

0 solved


Design the system that detects near-duplicate and burst photos in a user's Google Photos library and suggests the best shot to keep.

Google Photos stores trillions of images, and features like grouping similar shots save storage and clutter. Interviewers want an embedding plus similarity search design, per-user scoping, a quality ranking model, and attention to cost and privacy.

What the Interviewer Expects
  • Define near-duplicate vs similar, with a measurable target
  • Use image embeddings plus metadata (time, location) to limit comparisons
  • Explain clustering per user and threshold tuning
  • Design a best-shot quality model
  • Address compute cost for backfill and incremental uploads
Key Topics to Cover
Image embeddings
Approximate nearest neighbors
Clustering
Image quality assessment
Batch vs incremental processing
How to Approach This
  1. Start by mapping the business objective to a concrete ML objective and metric.
  2. Cover the full pipeline: data collection, feature engineering, model selection, training, serving.
  3. Discuss online vs offline evaluation. Plan an A/B test to validate real-world impact.
  4. Address the serving latency budget and whether batch or real-time inference is needed.
  5. Think about the data flywheel: how user feedback improves the model over time.
Possible Follow-up Questions
  • How do you handle edited copies vs originals?
  • How would you tune thresholds without looking at user photos?
  • How would you keep the backfill job affordable?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice ML System Design Problems
Sample Answer
Requirements

Group photos of the same scene taken close together (bursts, small pose changes, resized or lightly edited copies). Suggest a best shot per group. Run on new uploads within minutes and backfill existi...

High-Level Design

On upload: compute a compact embedding (say 128-d) from a vision model, plus a perceptual hash, and store with EXIF time, GPS, camera. Candidate generation: compare only against the user's photos with...


Submit Your Answer
Markdown supported