Resolve Duplicate Boxes
One parking sign produces several overlapping boxes.
Read the full lesson and open its transcript below. A narrated video will be added after production.
What you will learn
One parking sign produces several overlapping boxes.
A practical question
The detector draws three overlapping boxes around the same parking sign. If we count every box, one sign becomes three. Nonmaximum suppression commonly keeps a strong candidate and removes overlapping lower-scoring candidates under a chosen overlap rule.
The useful idea
But consider two signs mounted close together. An aggressive overlap threshold may erase one genuine sign. Confidence order, class handling, and box overlap all affect the result. Suppression cleans predictions; it doesn't repair a missing detector signal.
Work through the example
Put one image with a single sign beside one with two nearby signs. Change the overlap threshold and watch which boxes survive. Decide using annotated examples, not the most pleasing screenshot. Three boxes around one sign can inflate a count, but two closely mounted signs should remain two objects. Put both cases side by side as you adjust duplicate suppression. Check which boxes are removed and whether the remaining box still covers the original sign. A threshold selected from one convenient screenshot may fail on another camera. Keep the raw candidate boxes so you can distinguish a detection failure from a suppression error. Now check the idea on a concrete example: Compare duplicate suppression on one sign and two nearby signs. A possible trap is worth naming: Aggressive suppression can remove a real neighboring object. This supports a careful conclusion: Nonmaximum suppression keeps a stronger candidate while removing sufficiently overlapping duplicates. Put the two mounted signs close enough for their boxes to overlap. If duplicate suppression removes one, the count is wrong even though each raw box was good. Preserve raw detections when tuning the rule so the cause of the error is visible. A reviewer should be able to tell whether the missing sign was never detected or was removed only during cleanup.
Limits and next step
Record the suppression setting with the detector output. Next, we'll evaluate detections across confidence thresholds using precision and recall.
Worked example
Compare duplicate suppression on one sign and two nearby signs.
Quick check: test your understanding
Try it yourself: Consider this case: Compare duplicate suppression on one sign and two nearby signs. Explain how you would check the result. In your answer, address this limitation: Aggressive suppression can remove a real neighboring object.
Check the reasoning
Nonmaximum suppression keeps a stronger candidate while removing sufficiently overlapping duplicates. Aggressive suppression can remove a real neighboring object.
What is the main idea behind resolve duplicate boxes?
Nonmaximum suppression keeps a stronger candidate while removing sufficiently overlapping duplicates.
How is it used in the example?
Compare duplicate suppression on one sign and two nearby signs.
What limitation should be checked?
Aggressive suppression can remove a real neighboring object.
Further reading
Programming Computer Vision with Python — Jan Erik Solem.
Original ToolsInVision teaching examples. Editorial approach · Suggest a correction
Accessible referenceLesson 54 transcript307 words · Narration ready for the upcoming videoOpen transcript
The detector draws three overlapping boxes around the same parking sign. If we count every box, one sign becomes three. Nonmaximum suppression commonly keeps a strong candidate and removes overlapping lower-scoring candidates under a chosen overlap rule.
But consider two signs mounted close together. An aggressive overlap threshold may erase one genuine sign. Confidence order, class handling, and box overlap all affect the result. Suppression cleans predictions; it doesn't repair a missing detector signal.
Put one image with a single sign beside one with two nearby signs. Change the overlap threshold and watch which boxes survive. Decide using annotated examples, not the most pleasing screenshot. Three boxes around one sign can inflate a count, but two closely mounted signs should remain two objects. Put both cases side by side as you adjust duplicate suppression. Check which boxes are removed and whether the remaining box still covers the original sign. A threshold selected from one convenient screenshot may fail on another camera. Keep the raw candidate boxes so you can distinguish a detection failure from a suppression error. Now check the idea on a concrete example: Compare duplicate suppression on one sign and two nearby signs. A possible trap is worth naming: Aggressive suppression can remove a real neighboring object. This supports a careful conclusion: Nonmaximum suppression keeps a stronger candidate while removing sufficiently overlapping duplicates. Put the two mounted signs close enough for their boxes to overlap. If duplicate suppression removes one, the count is wrong even though each raw box was good. Preserve raw detections when tuning the rule so the cause of the error is visible. A reviewer should be able to tell whether the missing sign was never detected or was removed only during cleanup.
Record the suppression setting with the detector output. Next, we'll evaluate detections across confidence thresholds using precision and recall.