Encord Computer Vision Glossary
Anchor boxes, also known as prior boxes, are predefined bounding boxes used in object detection algorithms to help identify objects in an image. They are typically chosen based on the sizes and aspect ratios of the objects that the algorithm is trying to detect. For example, if the algorithm is trying to detect cars, anchor boxes might be chosen with a wide, rectangular aspect ratio to match the shape of a car.
When the object detection algorithm processes an image, it will apply a set of anchor boxes to different locations within the image. For each anchor box, the algorithm will use a convolutional neural network (CNN) to classify whether the box contains an object or not and if it does, which class of object it belongs to. The algorithm will also use CNN to predict the bounding box coordinates of the object.
The object detection algorithm will employ a method known as non-maximum suppression (NMS) to filter out overlapping or redundant bounding boxes after processing all of the anchor boxes in an image. When using NMS, the bounding boxes are compared based on their confidence scores (or probabilities), and the highest scoring bounding box is kept. Lower confidence bounding boxes that overlap will be eliminated.
What is non-maximum suppression used for?
The need for NMS arises from the fact that object detection algorithms frequently produce several bounding boxes for a single object, especially when the object is partially hidden or masked by other objects. The technique may display a single, more precise bounding box for each object in the image by using NMS to get rid of these unnecessary bounding boxes.
In conclusion, NMS and anchor boxes are crucial tools used in object detection algorithms to recognize and categorize things in a picture. With the use of NMS, which helps to eliminate overlapping or redundant bounding boxes and present a more accurate representation of the objects in the image, anchor boxes give the algorithm a preset set of bounding boxes to work with.
Discuss this blog on Slack
Join the Encord Developers community to discuss the latest in computer vision, machine learning, and data-centric AIJoin the community