1. 程式人生 > 實用技巧 >YOLOv4中cfg資料夾下yolov4-custom.cfg的解釋

YOLOv4中cfg資料夾下yolov4-custom.cfg的解釋

[net]
# Testing
#batch=1
#subdivisions=1
# Training
batch=64              //一批訓練樣本的樣本數量,測試時batch和subdivisions以上面部分為準
subdivisions=16
width=608             //width,height固定圖片尺寸
height=608
channels=3
momentum=0.949        //動量引數
decay=0.0005          //權重衰減正則項
angle=0               //資料增強引數,通過旋轉角度來生成更多訓練樣本
saturation = 1.5      //資料增強引數,通過調整飽和度來生成更多訓練樣本
exposure = 1.5        //資料增強引數,通過調整曝光量來生成更多訓練樣本
hue=.1                //資料增強引數,通過調整色調來生成更多訓練樣本

learning_rate=0.001   //學習李
burn_in=1000          //迭代次數閾值,大於該閾值和小於該閾值有不同的方式
max_batches = 500500  //最大訓練次數
policy=steps
steps=400000,450000   //steps和scale是設定學習率的變化,迭代400000次和450000次後學習率分別衰減十倍
scales=.1,.1

#cutmix=1
mosaic=1              //馬賽克資料增強

#:104x104 54:52x52 85:26x26 104:13x13 for 416
```c
...
[convolutional]
batch_normalize=1     //
filters=32            //卷積核個數,輸出通道數
size=3                //卷積核尺寸
stride=1              //卷積核步長
pad=1                 //是否補零
activation=mish       //網路層啟用函式

  跳躍連線

[shortcut]
from=-3              //前面第3層,跳躍連線
activation=linear    //層啟用i函式

  三個yolo層

[yolo]
mask = 0,1,2            //做3個索引
anchors = 12, 16, 19, 36, 40, 28, 36, 75, 76, 55, 72, 146, 142, 110, 192, 243, 459, 401
classes=80              //目標類別數
num=9                   //每個cell預測的框的個數
jitter=.3               //資料增強手段,隨機調整長寬高比例
ignore_thresh = .7      //低於這個值的IoU忽略
truth_thresh = 1
scale_x_y = 1.2
iou_thresh=0.213
cls_normalizer=1.0
iou_normalizer=0.07
iou_loss=ciou
nms_kind=greedynms
beta_nms=0.6
max_delta=5


[route]
layers = -4               //只有一個值時輸出該值索引的圖層特徵圖
                          //兩個值時返回值索引的層的拼接特徵圖