Explain IoU and Mean Average Precision for Google Lens Object Detection

Last updated: November 29, 2026

Quick Overview

Google Lens detects and localizes products in camera frames. Explain how IoU and mean average precision are computed for an object detector, walk through matching predictions to ground truth, and discuss what mAP hides for this product.

Google
Machine Learning
Machine Learning Engineer
Google
November 29, 2026
Machine Learning Engineer
Technical Screen
Machine Learning
Medium

0

0

0 solved


Google Lens detects and localizes products in camera frames. Explain how IoU and mean average precision are computed for an object detector, walk through matching predictions to ground truth, and discuss what mAP hides for this product.

Detection metrics come up for Lens, Photos, and Pixel camera features. The interviewer checks that you can define the matching procedure precisely, not just name mAP, and reason about which detection errors users actually notice.

What the Interviewer Expects
  • Defines IoU and explains the role of the IoU threshold
  • Describes greedy matching of predictions to ground truth in descending score order
  • Builds a per-class PR curve and computes AP, then averages over classes
  • Explains COCO-style averaging over IoU thresholds
  • Identifies product-relevant gaps such as small objects and the top-1 detection
Key Topics to Cover
intersection over union
mean average precision
object detection
precision-recall curve
matching
How to Approach This
  1. Understand the bias-variance trade-off. High training accuracy but low test accuracy signals overfitting.
  2. Choose evaluation metrics carefully based on the problem. Accuracy alone is often insufficient.
  3. Feature engineering is often more impactful than model selection.
  4. Know when to use tree-based models (tabular data) vs neural networks (unstructured data).
  5. Handle class imbalance with SMOTE, class weights, or appropriate loss functions.
Possible Follow-up Questions
  • Why does a duplicate detection of the same object count as a false positive?
  • When would you use mAP at IoU 0.5 instead of averaged over 0.5 to 0.95?
  • How would you evaluate the latency and accuracy trade-off on device?
Sharpen Your Skills on Codemia

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

Explore ML Interview Prep
Sample Answer
Clarify

Ask how many classes, whether boxes or masks, what IoU tolerance the product needs (a tap target needs only rough localization), and whether the user experience depends on all detections or mainly the...

Approach

IoU between a predicted box and a ground truth box is area of intersection divided by area of union. A prediction is a true positive if it matches an unmatched ground truth of the same class with IoU ...


Submit Your Answer
Markdown supported