突然在代码中撇到了Faster R-CNN中的IoU计算函数,计算两个bounding box之间的IoU值。IoU计算很简单但是很常用,因为看过多次代码都没有注意过,因此记录一下。
该函数比较简单,转载自Faster R-CNN代码,作者Pedro Felzenszwalb, Ross Girshick。
function o = boxoverlap(a, b)
% Compute the symmetric intersection over union overlap between a set of
% bounding boxes in a and a single bounding box in b.
%
% a a matrix where each row specifies a bounding box
% b a matrix where each row specifi