diff --git a/test.py b/test.py index e23081db..5d14c4e7 100644 --- a/test.py +++ b/test.py @@ -197,7 +197,7 @@ def test(cfg, cocoEval.evaluate() cocoEval.accumulate() cocoEval.summarize() - map = cocoEval.stats[1] # update mAP to pycocotools mAP + mf1, map = cocoEval.stats[:2] # update to pycocotools results (mAP@0.5:0.95, mAP@0.5) # Return results maps = np.zeros(nc) + map diff --git a/utils/utils.py b/utils/utils.py index 67953488..793bf6ce 100755 --- a/utils/utils.py +++ b/utils/utils.py @@ -810,7 +810,7 @@ def apply_classifier(x, model, img, im0): def fitness(x): # Returns fitness (for use with results.txt or evolve.txt) - return x[:, 2] * 0.8 + x[:, 3] * 0.2 # weighted mAP and F1 combination + return x[:, 2] * 0.5 + x[:, 3] * 0.5 # weighted combination of x=[p, r, mAP@0.5, F1 or mAP@0.5:0.95] # Plotting functions ---------------------------------------------------------------------------------------------------