# 数据扩增方法及可用工具代码

The second form of data augmentation consists of altering the intensities of the RGB channels in
training images. Specifically, we perform PCA on the set of RGB pixel values throughout the
ImageNet training set. To each training image, we add multiples of the found principal components,with magnitudes proportional to the corresponding eigenvalues times a random variable drawn from
a Gaussian with mean zero and standard deviation 0.1. Therefore to each RGB image pixel Ixy =
[Ixy R , Ixy G , Ixy B ]T we add the following quantity:
[p1, p2, p3][α1λ1, α2λ2, α3λ3]T
where pi and λi are ith eigenvector and eigenvalue of the 3 × 3 covariance matrix of RGB pixel
values, respectively, and αi is the aforementioned random variable. Each αi is drawn only once
for all the pixels of a particular training image until that image is used for training again, at which point it is re-drawn.