From 10b080d90c5cd6d1bb83bc0777132ce2cedb4b5e Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Tue, 10 Sep 2019 11:52:27 +0200 Subject: [PATCH] updates --- utils/utils.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/utils/utils.py b/utils/utils.py index 08f3ffd1..0202b8f5 100755 --- a/utils/utils.py +++ b/utils/utils.py @@ -613,8 +613,7 @@ def select_best_evolve(path='evolve*.txt'): # from utils.utils import *; select # Find best evolved mutation for file in sorted(glob.glob(path)): x = np.loadtxt(file, dtype=np.float32, ndmin=2) - fitness = x[:, 2] * 0.5 + x[:, 3] * 0.5 # weighted mAP and F1 combination - print(file, x[fitness.argmax()]) + print(file, x[fitness(x).argmax()]) def coco_single_class_labels(path='../coco/labels/train2014/', label_class=43): @@ -693,7 +692,7 @@ def print_mutation(hyp, results, bucket=''): def fitness(x): # Returns fitness (for use with results.txt or evolve.txt) - return 0.50 * x[:, 2] + 0.50 * x[:, 3] # fitness = 0.5 * mAP + 0.5 * F1 + return x[:, 2] * 0.5 + x[:, 3] * 0.5 # weighted mAP and F1 combination # Plotting functions ---------------------------------------------------------------------------------------------------