The interview problem
Design retrieval for copied subregions of images despite resizing, cropping and compression.
Original practice, not a reported company interview. Scenarios and numbers are illustrative. Interview date: not applicable. Sources retrieved October 1, 2026.
1. Scope and worked approach
Assume licensed collection management rather than identity surveillance. Generate global candidates cheaply, then compare local patch descriptors with geometric verification. A full-image embedding alone can miss a small copied region. Train or tune on synthetic transformations plus human-verified real examples, splitting by original image family. Store matched region coordinates and transformation evidence. Evaluate recall by crop area and false matches on repetitive textures.
2. Trace the design or derivation
Generate candidates → match local features → verify geometry → return matched crops
Build negative evaluation pairs containing common watermarks, borders and repeated textures. These are harder than random unrelated images and reveal whether geometric checks add value. Candidate retrieval recall and verification precision need separate accounting; a perfect verifier cannot recover an image that never entered its shortlist.
3. Calculate the example
A copied 200×200 region inside a 1,000×1,000 image occupies 4% of its area. Averaging the whole image may dilute this signal; a patch-based second stage spends more computation on candidate regions.
4. Failure cases and trade-offs
Repeated logos and stock backgrounds are genuine visual matches but may not indicate improper reuse. Geometric verification rejects some embedding coincidences while missing heavy edits. Return evidence and match type rather than an ownership conclusion. Bound patch counts to control worst-case latency.
5. Validation, follow-ups and self-review
Test mirrored crops, borders, collages and common textures. Follow-up: how do you handle an image assembled from several sources? Self-review: explain the candidate/verification split and keep similarity separate from rights attribution.
Sources and related practice
Technical reference: www.cs.ubc.ca — Local feature matching and geometric verification.
Source publication/update: 2004. Retrieved October 1, 2026. The workflow, calculations and review exercises are original; this reference is not evidence that a company asked this question.
Continue with Deduplicate image datasets before model training; Match catalog products across merchants.
Continue your preparation
Choose a connected learning path or browse more ML system design questions. Read our editorial method and attribution policy.