yolov5中的超参数配置文件hyp.scratch.yaml中各参数的大致用途

yolov5-6.0版本中,超参数配置文件有三个,目录在..\yolov5-6.1\data\hyps中,一共有

hyp.scratch-high.yaml
hyp.scratch-low.yaml
hyp.scratch-med.yaml

这三个超参数配置文件,经过比较,发现里面参数个数和内容完全相同,区别在于各参数具体数值存在大小差异;

根据原来的注释并结合参数名称,大致将各参数进行分类,如下所示:

# 优化器相关
lr0: 0.01  # initial learning rate (SGD=1E-2, Adam=1E-3)
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 相关
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
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
fl_gamma: 0.0  # focal loss gamma (efficientDet default gamma=1.5)

# anchor
anchor_t: 4.0  # anchor-multiple threshold
# anchors: 3  # anchors per output layer (0 to ignore)

# 数据增强相关 - 色彩转换
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.5  # image scale (+/- gain)
shear: 0.0  # image shear (+/- deg)
perspective: 0.0  # image perspective (+/- fraction), range 0-0.001

# 数据增强相关 - 翻转
flipud: 0.0  # image flip up-down (probability)
fliplr: 0.5  # image flip left-right (probability)

# 数据增强相关 - mosaic/mixup
mosaic: 1.0  # image mosaic (probability)
mixup: 0.0  # image mixup (probability)

本文章来源:

  1. CSDN博客:https://blog.csdn.net/irving512/article/details/116238499