From d67b1cb1adde6a267a78c1770b70ae5487bed06a Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Thu, 7 Nov 2019 20:01:47 -0800 Subject: [PATCH] updates --- test.py | 2 +- utils/utils.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test.py b/test.py index 100929a8..ebe60902 100644 --- a/test.py +++ b/test.py @@ -56,7 +56,7 @@ def test(cfg, seen = 0 model.eval() coco91class = coco80_to_coco91_class() - s = ('%20s' + '%10s' * 6) % ('Class', 'Images', 'Targets', 'P', 'R', 'mAP', 'F1') + s = ('%20s' + '%10s' * 6) % ('Class', 'Images', 'Targets', 'P', 'R', 'mAP@0.5', 'F1') p, r, f1, mp, mr, map, mf1 = 0., 0., 0., 0., 0., 0., 0. loss = torch.zeros(3) jdict, stats, ap, ap_class = [], [], [], [] diff --git a/utils/utils.py b/utils/utils.py index f21e2285..2e3b3ac7 100755 --- a/utils/utils.py +++ b/utils/utils.py @@ -881,7 +881,7 @@ def plot_results(start=0, stop=0): # from utils.utils import *; plot_results() fig, ax = plt.subplots(2, 5, figsize=(14, 7)) ax = ax.ravel() s = ['GIoU', 'Objectness', 'Classification', 'Precision', 'Recall', - 'val GIoU', 'val Objectness', 'val Classification', 'mAP', 'F1'] + 'val GIoU', 'val Objectness', 'val Classification', 'mAP@0.5', 'F1'] for f in sorted(glob.glob('results*.txt') + glob.glob('../../Downloads/results*.txt')): results = np.loadtxt(f, usecols=[2, 3, 4, 8, 9, 12, 13, 14, 10, 11], ndmin=2).T n = results.shape[1] # number of rows @@ -902,7 +902,7 @@ def plot_results(start=0, stop=0): # from utils.utils import *; plot_results() def plot_results_overlay(start=0, stop=0): # from utils.utils import *; plot_results_overlay() # Plot training results files 'results*.txt', overlaying train and val losses - s = ['train', 'train', 'train', 'Precision', 'mAP', 'val', 'val', 'val', 'Recall', 'F1'] # legends + s = ['train', 'train', 'train', 'Precision', 'mAP@0.5', 'val', 'val', 'val', 'Recall', 'F1'] # legends t = ['GIoU', 'Objectness', 'Classification', 'P-R', 'mAP-F1'] # titles for f in sorted(glob.glob('results*.txt') + glob.glob('../../Downloads/results*.txt')): results = np.loadtxt(f, usecols=[2, 3, 4, 8, 9, 12, 13, 14, 10, 11], ndmin=2).T