You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
1.6KB

  1. # Hyperparameters for COCO training from scratch
  2. # python train.py --batch 32 --cfg yolov5m6.yaml --weights '' --data coco.yaml --img 1280 --epochs 300
  3. # See tutorials for hyperparameter evolution https://github.com/ultralytics/yolov5#tutorials
  4. lr0: 0.01 # initial learning rate (SGD=1E-2, Adam=1E-3)
  5. lrf: 0.2 # final OneCycleLR learning rate (lr0 * lrf)
  6. momentum: 0.937 # SGD momentum/Adam beta1
  7. weight_decay: 0.0005 # optimizer weight decay 5e-4
  8. warmup_epochs: 3.0 # warmup epochs (fractions ok)
  9. warmup_momentum: 0.8 # warmup initial momentum
  10. warmup_bias_lr: 0.1 # warmup initial bias lr
  11. box: 0.05 # box loss gain
  12. cls: 0.3 # cls loss gain
  13. cls_pw: 1.0 # cls BCELoss positive_weight
  14. obj: 0.7 # obj loss gain (scale with pixels)
  15. obj_pw: 1.0 # obj BCELoss positive_weight
  16. iou_t: 0.20 # IoU training threshold
  17. anchor_t: 4.0 # anchor-multiple threshold
  18. # anchors: 3 # anchors per output layer (0 to ignore)
  19. fl_gamma: 0.0 # focal loss gamma (efficientDet default gamma=1.5)
  20. hsv_h: 0.015 # image HSV-Hue augmentation (fraction)
  21. hsv_s: 0.7 # image HSV-Saturation augmentation (fraction)
  22. hsv_v: 0.4 # image HSV-Value augmentation (fraction)
  23. degrees: 0.0 # image rotation (+/- deg)
  24. translate: 0.1 # image translation (+/- fraction)
  25. scale: 0.9 # image scale (+/- gain)
  26. shear: 0.0 # image shear (+/- deg)
  27. perspective: 0.0 # image perspective (+/- fraction), range 0-0.001
  28. flipud: 0.0 # image flip up-down (probability)
  29. fliplr: 0.5 # image flip left-right (probability)
  30. mosaic: 1.0 # image mosaic (probability)
  31. mixup: 0.0 # image mixup (probability)
  32. copy_paste: 0.0 # segment copy-paste (probability)