Preparing your design workspace

Loading the problem and your latest saved attempt…

Design Near-Duplicate Image Detection

Detect exact and transformed copies in a large image corpus with versioned models, indexes, and quality evaluation.

Problem statement

For this exercise, assume each newly uploaded image must be checked against an existing corpus for exact or near-duplicate copies, including resizing, cropping, recompression, color changes, and small overlays.

The system returns a ranked candidate list with scores plus a Duplicate, Review, or Unique decision under a versioned threshold policy. Borderline pairs may receive human labels that feed later training.

A decision must record the query image version, model version, index generation, threshold policy, and matched corpus image IDs. Copyright ownership, moderation, general semantic image search, video, user accounts, and takedown workflows are outside scope.

What to build

  1. Create versioned representations and searchable index entries for accepted corpus image versions.
  2. Return ranked candidates and a versioned Duplicate, Review, or Unique decision for a query image.
  3. Capture provenance-rich pair labels and release reproducible embedding and threshold versions.

At scale

  • Assume a corpus of one billion image versions and 500 new images per second at peak.
  • Return a decision within two seconds at p95 and maintain 99.9% monthly availability.
  • Target at least 99% recall for labeled duplicate pairs at a review workload capped at 2% of queries.
  • Index and model rollouts must keep every query pinned to one compatible model-index generation and support rollback within 30 minutes.