updates
This commit is contained in:
parent
a8f0a3fede
commit
40a5680671
28
train.py
28
train.py
|
@ -360,17 +360,17 @@ if __name__ == '__main__':
|
||||||
else:
|
else:
|
||||||
hyp = old_hyp.copy() # reset hyp to
|
hyp = old_hyp.copy() # reset hyp to
|
||||||
|
|
||||||
# Plot results
|
# # Plot results
|
||||||
import numpy as np
|
# import numpy as np
|
||||||
import matplotlib.pyplot as plt
|
# import matplotlib.pyplot as plt
|
||||||
a = np.loadtxt('evolve_1000val.txt')
|
# a = np.loadtxt('evolve_1000val.txt')
|
||||||
x = a[:, 2] * a[:, 3] # metric = mAP * F1
|
# x = a[:, 2] * a[:, 3] # metric = mAP * F1
|
||||||
weights = (x - x.min()) ** 2
|
# weights = (x - x.min()) ** 2
|
||||||
fig = plt.figure(figsize=(14, 7))
|
# fig = plt.figure(figsize=(14, 7))
|
||||||
for i in range(len(hyp)):
|
# for i in range(len(hyp)):
|
||||||
y = a[:, i + 5]
|
# y = a[:, i + 5]
|
||||||
mu = (y * weights).sum() / weights.sum()
|
# mu = (y * weights).sum() / weights.sum()
|
||||||
plt.subplot(2, 5, i+1)
|
# plt.subplot(2, 5, i+1)
|
||||||
plt.plot(x.max(), mu, 'o')
|
# plt.plot(x.max(), mu, 'o')
|
||||||
plt.plot(x, y, '.')
|
# plt.plot(x, y, '.')
|
||||||
print(list(hyp.keys())[i],'%.4g' % mu)
|
# print(list(hyp.keys())[i],'%.4g' % mu)
|
||||||
|
|
10
utils/gcp.sh
10
utils/gcp.sh
|
@ -45,10 +45,10 @@ wget https://storage.googleapis.com/ultralytics/yolov3/best_v1_0.pt -O weights/b
|
||||||
|
|
||||||
# Reproduce tutorials
|
# Reproduce tutorials
|
||||||
rm results*.txt # WARNING: removes existing results
|
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_1img.data && mv results.txt results0r_1img.txt
|
||||||
python3 train.py --nosave --data data/coco_10img.data && mv results.txt results3_10img.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 results4_100img.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 train.py --nosave --data data/coco_100img.data --transfer && mv results.txt results3_100imgTL.txt
|
||||||
python3 -c "from utils import utils; utils.plot_results()"
|
python3 -c "from utils import utils; utils.plot_results()"
|
||||||
gsutil cp results*.txt gs://ultralytics
|
gsutil cp results*.txt gs://ultralytics
|
||||||
gsutil cp results.png 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
|
# git clone -b test --depth 1 https://github.com/ultralytics/yolov3 yolov3_test # branch
|
||||||
cp -r cocoapi/PythonAPI/pycocotools yolov3
|
cp -r cocoapi/PythonAPI/pycocotools yolov3
|
||||||
cp -r weights yolov3 && cd 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
|
gsutil cp evolve.txt gs://ultralytics
|
||||||
sudo shutdown
|
sudo shutdown
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue