總結下v3中的主要改進
- 引入logistic regression 來預測objectness
- 如果某個box沒有所對應的groundtruth,那麼只預測其objectness
- 捨棄了softmax,使用了binary cross-entropy來預測類別
- 在3個層輸出預測 stride分別爲32 16 8, 以coco數據集爲例,預測的tensor大小爲:N x N x (3 x (4 +1 +80)),其中4爲座標,1爲objectness,80爲class
- 前面兩個經2x上採樣與最後的輸出層合併
- 9個bndbox來自於3個層的bndbox的kmeans聚類
配置文件中超參數部分截取如下:
[net]
# Testing
# batch=1
# subdivisions=1
# Training
batch=64
subdivisions=16
width=608
height=608
channels=3
momentum=0.9
decay=0.0005
angle=0
saturation = 1.5
exposure = 1.5
hue=.1
learning_rate=0.001
burn_in=1000
max_batches = 500200
policy=steps
steps=400000,450000
scales=.1,.1
- batch 在一次前向傳遞中用來計算梯度更新權重的(圖像+標籤)數目,即一批送進去的圖像總數
- subvisions 將batch數目的圖像分成 subvisons 數量,例如batch=64,subvisons=16,那麼就是在一次前向計算中共輸入64張圖,每次有16張圖像被並行處理送入,那麼在訓練時輸出界面,兩個 batch 之間應該會有4組輸出 ,即64=16*4
- width,height,channels 圖像寬高及通道數
- momentum 參考Momentum and Learning Rate Adaptation 用來調整當前梯度,防止陷入局部最低點的參數,若當前梯度爲u(t),則 u(t) = momentum * u(t-1) + (1-momentum) * u(t)
- decay 參考 What is the weight decay loss? 和Weight Decay in Neural Neural Networks Weight Update and Convergence 用來懲罰大權重的參數,決定正則參數在反向傳播中的影響力,防止權重參數過大
- angle 用於數據擴充的角度
- saturation, exposure, hue 飽和度,曝光度和色調值 Data Augment中所使用的範圍
- learning_rate 設定的學習率
- burn_in 參考此處, 指的是learning_rate * (iterations/burn_in)^4, e.g. 在第一次迭代時,LR=0.001 * 1/1000^4 = 10^-3 * 10^(-3*4) = 10^-15
- steps,scales 其中steps指的是在這個checkpoints時,應用scales進行learning_rate的倍增, 決定了在訓練過程中學習率隨着迭代次數的增長如何改變