From ddaa2976d775356fe72daedc45b768131b3c8a34 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Sat, 14 Dec 2019 15:15:20 -0800 Subject: [PATCH] updates --- utils/utils.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/utils/utils.py b/utils/utils.py index 2f7ee396..a8b6975b 100755 --- a/utils/utils.py +++ b/utils/utils.py @@ -957,13 +957,18 @@ def plot_results_overlay(start=0, stop=0): # from utils.utils import *; plot_re fig.savefig(f.replace('.txt', '.png'), dpi=200) -def plot_results(start=0, stop=0): # from utils.utils import *; plot_results() +def plot_results(start=0, stop=0, bucket='', id=()): # from utils.utils import *; plot_results() # Plot training results files 'results*.txt' 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@0.5', 'F1'] - for f in sorted(glob.glob('results*.txt') + glob.glob('../../Downloads/results*.txt')): + + if bucket: + files = ['https://storage.googleapis.com/%s/results%g.txt' % (bucket, x) for x in id] + else: + files = glob.glob('results*.txt') + glob.glob('../../Downloads/results*.txt') + for f in sorted(files): 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 x = range(start, min(stop, n) if stop else n)