FilterByIou

函数功能

根据 IOU 值过滤目标。

函数原型

1
void FilterByIou(std::vector<DetectBox> dets, std::vector<DetectBox>& sortBoxes, float iouThresh, IOUMethod method = UNION);
1
void FilterByIou(std::vector<ObjectInfo> dets, std::vector<ObjectInfo>& sortBoxes, float iouThresh, IOUMethod method = UNION);

参数说明

参数名

输入/输出

说明

dets

输入

待过滤 DetectBox(中心点) / ObjectInfo(边角点)。

sortBoxes

输出

排序过的数组。

iouThresh

输入

过滤阀值。

method

输入

IOU计算方式:

  • MAX 重叠区域除以两者中面积大的。
  • MIN 重叠区域除以两者中面积小的。
  • UNION 重叠区域除以两者面积并集。
  • DIOU 重叠区域除以两者面积并集减去距离的交并比。