转自:https://blog.csdn.net/u010397980/article/details/85058630
图为预测boundingbox的公式。
预测边框时cx, cy为相对于左上角的位置,每个小格的长度为1,图中此时cx=1,cy=1。
tx和ty分别经过sigmoid输出0-1之间的偏移量,与cx, cy相加后得到bounding box中心点的位置。
pw, ph是手动设置的anchor宽和高,tw, th分别与pw, ph作用后得到bounding box的宽和高。
这样就能得到预测boudingbox的x,y,w,h了,我们的目的是让预测的x,y,w,h和真实的groundtruth接近,于是我们就可以写loss了。