updates
This commit is contained in:
parent
3505b57421
commit
c8a67adecc
4
train.py
4
train.py
|
@ -470,7 +470,7 @@ if __name__ == '__main__':
|
||||||
|
|
||||||
# Mutate
|
# Mutate
|
||||||
np.random.seed(int(time.time()))
|
np.random.seed(int(time.time()))
|
||||||
s = np.random.random() * 0.15 # sigma
|
s = np.random.random() * 0.2 # sigma
|
||||||
g = [1, 1, 1, 1, 1, 1, 1, 0, .1, 1, 1, 1, 1, 1, 1, 1, 1, 1] # gains
|
g = [1, 1, 1, 1, 1, 1, 1, 0, .1, 1, 1, 1, 1, 1, 1, 1, 1, 1] # gains
|
||||||
for i, k in enumerate(hyp.keys()):
|
for i, k in enumerate(hyp.keys()):
|
||||||
x = (np.random.randn() * s * g[i] + 1) ** 2.0 # plt.hist(x.ravel(), 300)
|
x = (np.random.randn() * s * g[i] + 1) ** 2.0 # plt.hist(x.ravel(), 300)
|
||||||
|
@ -478,7 +478,7 @@ if __name__ == '__main__':
|
||||||
|
|
||||||
# Clip to limits
|
# Clip to limits
|
||||||
keys = ['lr0', 'iou_t', 'momentum', 'weight_decay', 'hsv_s', 'hsv_v', 'translate', 'scale', 'fl_gamma']
|
keys = ['lr0', 'iou_t', 'momentum', 'weight_decay', 'hsv_s', 'hsv_v', 'translate', 'scale', 'fl_gamma']
|
||||||
limits = [(1e-5, 1e-2), (0.00, 0.70), (0.60, 0.98), (0, 0.001), (0, .9), (0, .9), (0, .9), (0, .9), (0, 3)]
|
limits = [(1e-5, 1e-2), (0.00, 0.70), (0.60, 0.99), (0, 0.001), (0, .9), (0, .9), (0, .9), (0, .9), (0, 3)]
|
||||||
for k, v in zip(keys, limits):
|
for k, v in zip(keys, limits):
|
||||||
hyp[k] = np.clip(hyp[k], v[0], v[1])
|
hyp[k] = np.clip(hyp[k], v[0], v[1])
|
||||||
|
|
||||||
|
|
|
@ -865,7 +865,7 @@ def apply_classifier(x, model, img, im0):
|
||||||
|
|
||||||
def fitness(x):
|
def fitness(x):
|
||||||
# Returns fitness (for use with results.txt or evolve.txt)
|
# Returns fitness (for use with results.txt or evolve.txt)
|
||||||
w = [0.1, 0.1, 0.6, 0.2] # weights for [P, R, mAP, F1]@0.5 or [P, R, mAP@0.5:0.95, mAP@0.5]
|
w = [0.0, 0.0, 0.8, 0.2] # weights for [P, R, mAP, F1]@0.5 or [P, R, mAP@0.5:0.95, mAP@0.5]
|
||||||
return (x[:, :4] * w).sum(1)
|
return (x[:, :4] * w).sum(1)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue