信息來源:http://lamda.nju.edu.cn/weixs/project/CNNTricks/CNNTricks.html
用途:由於深度學習的發展,爲了加強深度學習的性能以及滿足深度學習的大數據量要求,所以需要對數據進行增強。
數據增強常用方法:
1)horizontally flipping(圖像水平鏡像)
2)random crops(剪切图像)
3)color jittering(色彩抖动 )
4)可以同時結合以上的某幾種方法對數據同時進行處理。例如:同時對圖像進行 rotation(旋转图像)和random scaling(圖像尺度变换)
5)可以嘗試增加HSV圖像的S值(saturation,飽和度) 和V值 (value,明度) (色调(H),饱和度(S),明度(V),通過對所有像素值乘以n次方,n的取值爲[0.25,4] ;乘以一個值,這個值的範圍在[0.7,1.4];加上一個直在[-0.1,0.1];也可以給H(Hue,色调)加上一個值,其值大小取值範圍在 [-0.1, 0.1]
6)Krizhevsky et al. [1] 提出fancy PCA ,Fancy PCA 通過更改RGB圖像的圖像強度
使用方法6)的步驟:
a)對訓練圖像的RGB像素值執行PCA算子
b) 通過以下方法增加RGB圖像的像素值(i.e., I_{xy}=[I_{xy}^R,I_{xy}^G,I_{xy}^B]^T): [bf{p}_1,bf{p}_2,bf{p}_3][alpha_1 lambda_1,alpha_2 lambda_2,alpha_3 lambda_3]^T,這裏, bf{p}_i and lambda_i 是第i個特徵向量和相應的特徵值 ,alpha_i 是一個隨機變量(a random variable drawn from a Gaussian with mean zero and standard deviation 0.1.)
注意: each alpha_i is drawn only once for all the pixels of a particular training image until that image is used for training again。That is to say, when the model meets the same training image again, it will randomly produce another alpha_i for data augmentation。
圖像增強也可參考:http://www.bubuko.com/infodetail-1854956.html
[1] A. Krizhevsky, I. Sutskever, and G. E. Hinton. ImageNet Classification with Deep Convolutional Neural Networks. In NIPS, 2012