updates
This commit is contained in:
parent
d0c46a2ca4
commit
8615b3a7c3
|
@ -43,7 +43,7 @@ Python 3.7 or later with the following `pip3 install -U -r requirements.txt` pac
|
||||||
|
|
||||||
# Jupyter Notebook
|
# Jupyter Notebook
|
||||||
|
|
||||||
Use our Jupyter [notebook](https://github.com/ultralytics/yolov3/blob/master/examples.ipynb) to quickly get started with training, inference and testing examples.
|
Our Jupyter [notebook](https://github.com/ultralytics/yolov3/blob/master/examples.ipynb) has excellent training, inference and testing examples to get you started quickly.
|
||||||
|
|
||||||
# Training
|
# Training
|
||||||
|
|
||||||
|
|
59
train.py
59
train.py
|
@ -25,7 +25,7 @@ except: # not installed: install help: https://github.com/NVIDIA/apex/issues/25
|
||||||
# 0.187 0.237 0.144 0.186 14.6 1.607 4.202 0.09439 39.27 3.726 31.26 2.634 0.273 0.001542 -5.036 0.8364 0.0008393 e
|
# 0.187 0.237 0.144 0.186 14.6 1.607 4.202 0.09439 39.27 3.726 31.26 2.634 0.273 0.001542 -5.036 0.8364 0.0008393 e
|
||||||
# 0.250 0.217 0.136 0.195 3.3 1.2 2 0.604 15.7 3.67 20 1.36 0.194 0.00128 -4 0.95 0.000201 0.8 0.388 1.2 0.119 0.0589 0.401 f
|
# 0.250 0.217 0.136 0.195 3.3 1.2 2 0.604 15.7 3.67 20 1.36 0.194 0.00128 -4 0.95 0.000201 0.8 0.388 1.2 0.119 0.0589 0.401 f
|
||||||
# 0.269 0.225 0.149 0.218 6.71 1.13 5.25 0.246 22.4 3.64 17.8 1.31 0.256 0.00146 -4 0.936 0.00042 0.123 0.18 1.81 0.0987 0.0788 0.441 g
|
# 0.269 0.225 0.149 0.218 6.71 1.13 5.25 0.246 22.4 3.64 17.8 1.31 0.256 0.00146 -4 0.936 0.00042 0.123 0.18 1.81 0.0987 0.0788 0.441 g
|
||||||
|
# 0.179 0.274 0.165 0.187 7.95 1.22 7.62 0.224 17 5.71 17.7 3.28 0.295 0.00136 -4 0.875 0.000319 0.131 0.208 2.14 0.14 0.0773 0.228 h
|
||||||
|
|
||||||
# 320 --epochs 2
|
# 320 --epochs 2
|
||||||
# 0.242 0.296 0.196 0.231 5.67 0.8541 4.286 0.1539 21.61 1.957 22.9 2.894 0.3689 0.001844 -4 0.913 0.000467 # ha 0.417 mAP @ epoch 100
|
# 0.242 0.296 0.196 0.231 5.67 0.8541 4.286 0.1539 21.61 1.957 22.9 2.894 0.3689 0.001844 -4 0.913 0.000467 # ha 0.417 mAP @ epoch 100
|
||||||
|
@ -34,25 +34,46 @@ except: # not installed: install help: https://github.com/NVIDIA/apex/issues/25
|
||||||
# 0.161 0.327 0.190 0.193 7.82 1.153 4.062 0.1845 24.28 3.05 20.93 2.842 0.2759 0.001357 -4 0.916 0.000572 # hd 0.438 mAP @ epoch 100
|
# 0.161 0.327 0.190 0.193 7.82 1.153 4.062 0.1845 24.28 3.05 20.93 2.842 0.2759 0.001357 -4 0.916 0.000572 # hd 0.438 mAP @ epoch 100
|
||||||
|
|
||||||
|
|
||||||
# Training hyperparameters g
|
# # Training hyperparameters g
|
||||||
hyp = {'giou': 1.13, # giou loss gain
|
# hyp = {'giou': 1.13, # giou loss gain
|
||||||
'xy': 5.25, # xy loss gain
|
# 'xy': 5.25, # xy loss gain
|
||||||
'wh': 0.246, # wh loss gain
|
# 'wh': 0.246, # wh loss gain
|
||||||
'cls': 22.4, # cls loss gain
|
# 'cls': 22.4, # cls loss gain
|
||||||
'cls_pw': 3.64, # cls BCELoss positive_weight
|
# 'cls_pw': 3.64, # cls BCELoss positive_weight
|
||||||
'obj': 17.8, # obj loss gain
|
# 'obj': 17.8, # obj loss gain
|
||||||
'obj_pw': 1.31, # obj BCELoss positive_weight
|
# 'obj_pw': 1.31, # obj BCELoss positive_weight
|
||||||
'iou_t': 0.256, # iou training threshold
|
# 'iou_t': 0.256, # iou training threshold
|
||||||
'lr0': 0.00146, # initial learning rate
|
# 'lr0': 0.00146, # initial learning rate
|
||||||
|
# 'lrf': -4., # final LambdaLR learning rate = lr0 * (10 ** lrf)
|
||||||
|
# 'momentum': 0.936, # SGD momentum
|
||||||
|
# 'weight_decay': 0.00042, # optimizer weight decay
|
||||||
|
# 'hsv_s': 0.123, # image HSV-Saturation augmentation (fraction)
|
||||||
|
# 'hsv_v': 0.18, # image HSV-Value augmentation (fraction)
|
||||||
|
# 'degrees': 1.81, # image rotation (+/- deg)
|
||||||
|
# 'translate': 0.0987, # image translation (+/- fraction)
|
||||||
|
# 'scale': 0.0788, # image scale (+/- gain)
|
||||||
|
# 'shear': 0.441} # image shear (+/- deg)
|
||||||
|
|
||||||
|
|
||||||
|
# Training hyperparameters h
|
||||||
|
hyp = {'giou': 1.22, # giou loss gain
|
||||||
|
'xy': 7.62, # xy loss gain
|
||||||
|
'wh': 0.224, # wh loss gain
|
||||||
|
'cls': 17.0, # cls loss gain
|
||||||
|
'cls_pw': 5.71, # cls BCELoss positive_weight
|
||||||
|
'obj': 17.7, # obj loss gain
|
||||||
|
'obj_pw': 3.28, # obj BCELoss positive_weight
|
||||||
|
'iou_t': 0.295, # iou training threshold
|
||||||
|
'lr0': 0.00136, # initial learning rate
|
||||||
'lrf': -4., # final LambdaLR learning rate = lr0 * (10 ** lrf)
|
'lrf': -4., # final LambdaLR learning rate = lr0 * (10 ** lrf)
|
||||||
'momentum': 0.936, # SGD momentum
|
'momentum': 0.875, # SGD momentum
|
||||||
'weight_decay': 0.00042, # optimizer weight decay
|
'weight_decay': 0.00032, # optimizer weight decay
|
||||||
'hsv_s': 0.123, # image HSV-Saturation augmentation (fraction)
|
'hsv_s': 0.131, # image HSV-Saturation augmentation (fraction)
|
||||||
'hsv_v': 0.18, # image HSV-Value augmentation (fraction)
|
'hsv_v': 0.208, # image HSV-Value augmentation (fraction)
|
||||||
'degrees': 1.81, # image rotation (+/- deg)
|
'degrees': 2.14, # image rotation (+/- deg)
|
||||||
'translate': 0.0987, # image translation (+/- fraction)
|
'translate': 0.14, # image translation (+/- fraction)
|
||||||
'scale': 0.0788, # image scale (+/- gain)
|
'scale': 0.0773, # image scale (+/- gain)
|
||||||
'shear': 0.441} # image shear (+/- deg)
|
'shear': 0.228} # image shear (+/- deg)
|
||||||
|
|
||||||
|
|
||||||
def train(cfg,
|
def train(cfg,
|
||||||
|
|
|
@ -606,7 +606,7 @@ def print_mutation(hyp, results, bucket=''):
|
||||||
|
|
||||||
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)
|
||||||
return 0.5 * x[:, 2] + 0.5 * x[:, 3] # fitness = 0.5 * mAP + 0.5 * F1
|
return 0.90 * x[:, 2] + 0.10 * x[:, 3] # fitness = 0.9 * mAP + 0.1 * F1
|
||||||
|
|
||||||
|
|
||||||
# Plotting functions ---------------------------------------------------------------------------------------------------
|
# Plotting functions ---------------------------------------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue