From 40a5680671e2decfc264892c22fd9c50b388ef1d Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Wed, 8 May 2019 13:31:49 +0200 Subject: [PATCH] updates --- train.py | 28 ++++++++++++++-------------- utils/gcp.sh | 10 +++++----- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/train.py b/train.py index 7f71783f..ab6cdd64 100644 --- a/train.py +++ b/train.py @@ -360,17 +360,17 @@ if __name__ == '__main__': else: hyp = old_hyp.copy() # reset hyp to - # Plot results - import numpy as np - import matplotlib.pyplot as plt - a = np.loadtxt('evolve_1000val.txt') - x = a[:, 2] * a[:, 3] # metric = mAP * F1 - weights = (x - x.min()) ** 2 - fig = plt.figure(figsize=(14, 7)) - for i in range(len(hyp)): - y = a[:, i + 5] - mu = (y * weights).sum() / weights.sum() - plt.subplot(2, 5, i+1) - plt.plot(x.max(), mu, 'o') - plt.plot(x, y, '.') - print(list(hyp.keys())[i],'%.4g' % mu) + # # Plot results + # import numpy as np + # import matplotlib.pyplot as plt + # a = np.loadtxt('evolve_1000val.txt') + # x = a[:, 2] * a[:, 3] # metric = mAP * F1 + # weights = (x - x.min()) ** 2 + # fig = plt.figure(figsize=(14, 7)) + # for i in range(len(hyp)): + # y = a[:, i + 5] + # mu = (y * weights).sum() / weights.sum() + # plt.subplot(2, 5, i+1) + # plt.plot(x.max(), mu, 'o') + # plt.plot(x, y, '.') + # print(list(hyp.keys())[i],'%.4g' % mu) diff --git a/utils/gcp.sh b/utils/gcp.sh index ad90d3aa..82780a4d 100755 --- a/utils/gcp.sh +++ b/utils/gcp.sh @@ -45,10 +45,10 @@ wget https://storage.googleapis.com/ultralytics/yolov3/best_v1_0.pt -O weights/b # Reproduce tutorials rm results*.txt # WARNING: removes existing results -python3 train.py --nosave --data data/coco_1img.data && mv results.txt results3_1img.txt -python3 train.py --nosave --data data/coco_10img.data && mv results.txt results3_10img.txt -python3 train.py --nosave --data data/coco_100img.data && mv results.txt results4_100img.txt -python3 train.py --nosave --data data/coco_100img.data --transfer && mv results.txt results3_100imgTL.txt +python3 train.py --nosave --data data/coco_1img.data && mv results.txt results0r_1img.txt +python3 train.py --nosave --data data/coco_10img.data && mv results.txt results0r_10img.txt +python3 train.py --nosave --data data/coco_100img.data && mv results.txt results0r_100img.txt +#python3 train.py --nosave --data data/coco_100img.data --transfer && mv results.txt results3_100imgTL.txt python3 -c "from utils import utils; utils.plot_results()" gsutil cp results*.txt gs://ultralytics gsutil cp results.png gs://ultralytics @@ -75,7 +75,7 @@ git clone https://github.com/ultralytics/yolov3 # master # git clone -b test --depth 1 https://github.com/ultralytics/yolov3 yolov3_test # branch cp -r cocoapi/PythonAPI/pycocotools yolov3 cp -r weights yolov3 && cd yolov3 -python3 train.py --evolve --data data/coco_100img.data --num-workers 2 --epochs 30 +python3 train.py --evolve --data data/coco_1k5k.data --epochs 30 --img-size 320 gsutil cp evolve.txt gs://ultralytics sudo shutdown