From 62e5549cef53bd11890808615e0bfae59cfd4491 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Charette?= Date: Wed, 21 Sep 2022 04:03:47 -0700 Subject: [PATCH] Make sure best.weights is the most recent weights for a given mAP% (#8670) * issue #8308: memory leaks in map * update the window title with some training stats * make sure _best.weights is the most recent weights with that mAP% --- src/detector.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/detector.c b/src/detector.c index 0b947b69..61864967 100644 --- a/src/detector.c +++ b/src/detector.c @@ -364,7 +364,7 @@ void train_detector(char *datacfg, char *cfgfile, char *weightfile, int *gpus, i iter_map = iteration; mean_average_precision = validate_detector_map(datacfg, cfgfile, weightfile, thresh, iou_thresh, 0, net.letter_box, &net_map);// &net_combined); printf("\n mean_average_precision (mAP@%0.2f) = %f \n", iou_thresh, mean_average_precision); - if (mean_average_precision > best_map) { + if (mean_average_precision >= best_map) { best_map = mean_average_precision; printf("New best mAP!\n"); char buff[256];