Anchor Boxes

Until now, we have seen that each grid cell can be associated with only one object. To make a grid cell detect multiple objects, we use the concept of anchor boxes.

This is particularly useful if we want to detect partially overlapping objects, such as the ones in the image below, for which the object centers lie in the same grid cell.

The boxes in purple are anchor boxes and we associate each object with the grid cell that contains its midpoint as well as with its own anchor box.

This approach works if there are two objects that have different anchor box shapes but will not work if there are more than two overlapping objects or if the two objects have the same anchor box shape.

Last updated