在计算得到anchor之后, 需要将anchor与ground truth(gt)的bbox给绑定起来, 也就是Matching。
paper里说matching分为两步,逐层进行:
第一步:
We begin by matching each ground truth box to the default box with the best jaccard overlap. This is the matching approach used by the original MultiBox [7] and it ensures that each ground truth box has exactly one matched default box.
大意是为每个gt bbox找到一个最佳的anchor,保证每个gt bbox都有刚好有一个anchor来预测它。
代码: https://github.com/weiliu89/caffe/blob/ssd/src/caffe/util/bbox_util.cpp#L584
第二步:
Unlike MultiBox, we then match default boxes to any ground truth with jaccard overlap higher than a threshold (0.5). Adding these matches simplifies the learning problem: it allows the network to predict high confidences for multiple overlapping default boxes rather than req