Confidence Scores and Thresholds
Use confidence thresholds to filter predictions, balance false alarms and missed objects, and distinguish confidence from IoU.
Confidence Scores and Thresholds explained visually
Use confidence thresholds to filter predictions, balance false alarms and missed objects, and distinguish confidence from IoU.
What you will learn
Locate objects, represent boxes, filter predictions, evaluate detections, and compare detector designs.
Interpret model confidence scores
You lower one setting, and suddenly your detector finds the person it missed before. But now it also puts a box around a shadow. What changed?
You changed the confidence threshold.
Object detectors usually attach a score to each proposed detection. The exact meaning depends on the model. It may combine information about whether an object is present and which class it belongs to.
Filter predictions without retraining
We use a confidence threshold to decide which predictions to keep. If the threshold is zero point five, predictions below that value are removed from the displayed or evaluated results.
Suppose three predictions have scores of zero point nine, zero point six, and zero point three. With a threshold of zero point five, we keep the first two. With a threshold of zero point eight, only the first remains.
The model has not learned anything new. We have changed how we filter its existing predictions.
Measure false alarms and missed objects
A lower threshold can reveal difficult objects that receive weaker scores. It can also keep more false alarms. A higher threshold can remove false alarms, but it may also remove real objects.
This is why the best setting depends on the task and must be checked on representative data. Missing a small defect and asking a person to review an extra image may have different consequences.
Distinguish calibration, confidence, and IoU
There is another common misunderstanding. A score of zero point nine does not automatically mean that exactly ninety percent of predictions with that score are correct. That interpretation requires checking how well the scores are calibrated.
Confidence is also different from intersection over union. Confidence comes from the model. Intersection over union compares a predicted location with a reference location when that reference is available.
When you adjust a detector, ask two separate questions. Which predictions should I keep? And how well do their locations match the objects?
Next, we’ll handle another problem: several high-scoring boxes pointing to the same object.
Quick check: test your understanding
Which scores remain above a 0.50 threshold: 0.90, 0.60, 0.30?
0.90 and 0.60.
Does changing the confidence threshold retrain the model?
No. It filters existing predictions.
Does confidence 0.90 automatically mean 90% correctness?
No. That interpretation needs evidence about score calibration.
Accessible referenceLesson 66 transcript316 words · Matches the published narration and captionsOpen transcript
You lower one setting, and suddenly your detector finds the person it missed before. But now it also puts a box around a shadow. What changed?
You changed the confidence threshold.
Object detectors usually attach a score to each proposed detection. The exact meaning depends on the model. It may combine information about whether an object is present and which class it belongs to.
We use a confidence threshold to decide which predictions to keep. If the threshold is zero point five, predictions below that value are removed from the displayed or evaluated results.
Suppose three predictions have scores of zero point nine, zero point six, and zero point three. With a threshold of zero point five, we keep the first two. With a threshold of zero point eight, only the first remains.
The model has not learned anything new. We have changed how we filter its existing predictions.
A lower threshold can reveal difficult objects that receive weaker scores. It can also keep more false alarms. A higher threshold can remove false alarms, but it may also remove real objects.
This is why the best setting depends on the task and must be checked on representative data. Missing a small defect and asking a person to review an extra image may have different consequences.
There is another common misunderstanding. A score of zero point nine does not automatically mean that exactly ninety percent of predictions with that score are correct. That interpretation requires checking how well the scores are calibrated.
Confidence is also different from intersection over union. Confidence comes from the model. Intersection over union compares a predicted location with a reference location when that reference is available.
When you adjust a detector, ask two separate questions. Which predictions should I keep? And how well do their locations match the objects?
Next, we’ll handle another problem: several high-scoring boxes pointing to the same object.