From a1b50aaa43cfd27b5687ede41aff71a0e2cb6991 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Wed, 11 Sep 2019 21:24:22 +0200 Subject: [PATCH] updates --- detect.py | 1 - train.py | 2 +- utils/utils.py | 3 +++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/detect.py b/detect.py index 475a2321..b112bba7 100644 --- a/detect.py +++ b/detect.py @@ -1,5 +1,4 @@ import argparse -import time from sys import platform from models import * # set ONNX_EXPORT in models.py diff --git a/train.py b/train.py index 37e4ab13..24165fd9 100644 --- a/train.py +++ b/train.py @@ -430,7 +430,7 @@ if __name__ == '__main__': # Mutate init_seeds(seed=int(time.time())) - s = [.15, .15, .15, .15, .15, .15, .15, .00, .02, .20, .15, .0, .0, .0, .0, .0, .0] # sigmas + s = [.15, .15, .15, .15, .15, .15, .15, .00, .02, .20, .20, .20, .20, .20, .20, .20, .20] # sigmas for i, k in enumerate(hyp.keys()): x = (np.random.randn(1) * s[i] + 1) ** 2.0 # plt.hist(x.ravel(), 300) hyp[k] *= float(x) # vary by sigmas diff --git a/utils/utils.py b/utils/utils.py index 0202b8f5..4987fedb 100755 --- a/utils/utils.py +++ b/utils/utils.py @@ -88,6 +88,9 @@ def coco_class_weights(): # frequency of each class in coco train2014 1877, 17630, 4337, 4624, 1075, 3468, 135, 1380] weights = 1 / torch.Tensor(n) weights /= weights.sum() + # with open('data/coco.names', 'r') as f: + # for k, v in zip(f.read().splitlines(), n): + # print('%20s: %g' % (k, v)) return weights