本文参考rafaelpadilla/Object-Detection-Metrics
IoU(Intersection over Union,交并比)
- 先计算intersection的w和h,其中,w = w1 + w2 - (endx - startx),h同理(如图);
- 若w或h小于0,即说明intersection = 0,那么返回IoU为0;
- IoU = 交/并 = w*h/(w1*h1 + w2*h2 - w*h)
def IOU(Reframe,GTframe
本文参考rafaelpadilla/Object-Detection-Metrics
def IOU(Reframe,GTframe