IoU is the area of overlap between a predicted box and the ground truth divided by the area of their union. A prediction counts as a true positive if it matches an unmatched ground truth box above an IoU threshold. Average precision is the area under the precision recall curve for one class, and mAP averages it across classes. A threshold of 0.5 is lenient about localisation, while averaging from 0.5 to 0.95 rewards tight boxes.
Why interviewers ask this
This is a basic literacy check, and many candidates get the mechanics slightly wrong. Interviewers want the matching rule, the role of confidence ranking in building the precision recall curve, and an understanding of what each threshold rewards. Strong candidates go further and say when mAP is the wrong metric for the product, because a single averaged number can smooth over the exact failure that matters to users.
How to structure your answer
- Define IoU precisely.
- Explain matching and how the precision recall curve is built.
- Contrast lenient and strict IoU thresholds.
- Say when you would report something other than mAP.
Example answer
IoU is intersection over union: the overlap between a predicted box and a ground truth box, divided by the area they cover together. To compute average precision for a class, you rank all predictions by confidence, walk down the list, and mark each one as a true positive if it matches a ground truth box that has not already been matched, above the IoU threshold, and as a false positive otherwise. That gives you a precision recall curve, and AP is the area under it. mAP is the mean across classes. The threshold changes what you reward. At 0.5, a box roughly in the right place counts, which is fine if you only need to know something is there. Averaging across thresholds from 0.5 up to 0.95 rewards precise localisation, which matters if the box drives a measurement or a robot's grasp. In practice I rarely report mAP alone. On a safety project I reported recall at a fixed false alarm rate per hour of video, because that was what operators actually experienced, and it caught a regression that mAP had smoothed over.
Walking into this interview soon? GhostPilot listens to your live call, spots the question the moment it is asked, and puts a structured answer on your screen in real time. Try it on your next mock, or grab a $29 Session Pass, no subscription, for the real thing.
See how it worksFollow-up questions to expect
- Why does mAP not depend on a single confidence threshold?
- How would you evaluate a detector where some objects are ambiguous or unlabelled?
- What metric would you use for a counting application?
Related computer vision engineer questions
Your interviewer will ask their own version of this. Paste your actual job description into the free Question Predictor and get the 20 questions that role is most likely to ask, with what each one is really probing.
Predict my questions