# Hyperparameters for COCO training from scratch

# python train.py --batch 40 --cfg yolov5m.yaml --weights '' --data coco.yaml --img 640 --epochs 300

# See tutorials for hyperparameter evolution https://github.com/ultralytics/yolov5#tutorials


 

lr0: 0.005  # initial learning rate (SGD=1E-2, Adam=1E-3)0.0015

lrf: 0.2  # final OneCycleLR learning rate (lr0 * lrf)

momentum: 0.937  # SGD momentum/Adam beta1

weight_decay: 0.0005  # optimizer weight decay 5e-4

warmup_epochs: 3.0  # warmup epochs (fractions ok)

warmup_momentum: 0.8  # warmup initial momentum

warmup_bias_lr: 0.1  # warmup initial bias lr

box: 0.05  # box loss gain

cls: 0.5  # cls loss gain

landmark: 0.05 # landmark loss gain 0.005

cls_pw: 1.0  # cls BCELoss positive_weight

obj: 1.0  # obj loss gain (scale with pixels)

obj_pw: 1.0  # obj BCELoss positive_weight

iou_t: 0.20  # IoU training threshold

anchor_t: 4.0  # anchor-multiple threshold

# anchors: 3  # anchors per output layer (0 to ignore)

fl_gamma: 0.0  # focal loss gamma (efficientDet default gamma=1.5)

hsv_h: 0.015  # image HSV-Hue augmentation (fraction)

hsv_s: 0.7  # image HSV-Saturation augmentation (fraction)

hsv_v: 0.4  # image HSV-Value augmentation (fraction)

degrees: 0.0  # image rotation (+/- deg)

translate: 0.1  # image translation (+/- fraction) 平移

scale: 0.4  # image scale (+/- gain)

shear: 0  # image shear (+/- deg)

perspective: 0  # image perspective (+/- fraction), range 0-0.001

flipud: 0.0  # image flip up-down (probability)

fliplr: 0.0  # image flip left-right (probability)

mosaic: 0.0  # image mosaic (probability)

mixup: 0.243  # image mixup (probability)

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐