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.
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
How to Approach This
- Start by mapping the business objective to a concrete ML objective and metric.
- Cover the full pipeline: data collection, feature engineering, model selection, training, serving.
- Discuss online vs offline evaluation. Plan an A/B test to validate real-world impact.
- Address the serving latency budget and whether batch or real-time inference is needed.
- 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 ProblemsSample 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...