yolo v3 recall模型下IOU值出现inf%解决方法

一、出现原因: 指针读取越界,导致框的坐标值出现了极大值或极小值。 二、修改方法: examples/detect.c中validate_detector

一、出现原因:

指针读取越界,导致框的坐标值出现了极大值或极小值。

二、修改方法:

examples/detect.c中validate_detector_recall函数中:

for(k = 0; k < l.w*l.h*l.n; ++k){float iou = box_iou(dets[k].bbox, t);if(dets[k].objectness > thresh && iou > best_iou){best_iou = iou;}}

修改为:

for(k = 0; k < nboxes; ++k){float iou = box_iou(dets[k].bbox, t);if(dets[k].objectness > thresh && iou > best_iou){best_iou = iou;}}

问题解决。