mirror of
https://github.com/pjreddie/darknet.git
synced 2023-08-10 21:13:14 +03:00
Fixed detector recall
This commit is contained in:
@ -471,7 +471,7 @@ void validate_detector_recall(char *datacfg, char *cfgfile, char *weightfile)
|
||||
++total;
|
||||
box t = { truth[j].x, truth[j].y, truth[j].w, truth[j].h };
|
||||
float best_iou = 0;
|
||||
for (k = 0; k < l.w*l.h*l.n; ++k) {
|
||||
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;
|
||||
@ -828,7 +828,7 @@ int anchors_comparator(const void *pa, const void *pb)
|
||||
{
|
||||
anchors_t a = *(anchors_t *)pa;
|
||||
anchors_t b = *(anchors_t *)pb;
|
||||
float diff = b.w - a.w;
|
||||
float diff = b.w*b.h - a.w*a.h;
|
||||
if (diff < 0) return 1;
|
||||
else if (diff > 0) return -1;
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user