By performing augmentation, it can prevent your neural network from learning irrelevant patterns, essentially boosting overall performances.

Where do we augment data in our ML pipeline?

  1. 导入数据时,适用于相对较小的数据集,此举可增大数据集的大小。
  2. 在每一个 mini-batch 前,适用于较大的数据集,不用花精力去对整个数据集进行尺寸扩充,只需要对会被喂给模型的数据进行变化。
  1. Flip:包括上下翻转和镜面翻转
  2. Rotation:可能导致尺寸发生变化
  3. Scale:一定会导致尺寸变化,但放大时一般会剪去多余的部分
  4. Crop:剪取后一般会调整回原来的大小
  5. Translation:只包括 x 和 y 轴上面的移动
  6. Gaussian Noise:Gaussian Noise which has zero mean, essentially has data points in all frequencies, effectively distorting the high frequency features. 添加噪音可以增强学习能力

Advanced Augmentation Techniques

  1. Conditional GANs: computationally intensive
  2. Neural Style Transfer: It grabs the texture/ambiance/appearance of one image (aka, the “style”) and mixes it with the content of another. Using this powerful technique, we produce an effect similar to that of our conditional GAN, but the output tends to look more artistic rather than realistic.
  3. Deep Photo Style Transfer: impressive results

Brief note on interpolation

  1. Constant: This may not work for natural images, but can work for images taken in a monochromatic background
  2. Edge: The edge values of the image are extended after the boundary. This method can work for mild translations
  3. Reflect: The image pixel values are reflected along the image boundary. This method is useful for continuous or natural backgrounds containing trees, mountains etc.
  4. Symmetric: This method is similar to reflect, except for the fact that, at the boundary of reflection, a copy of the edge pixels are made. Normally, reflect and symmetric can be used interchangeably, but differences will be visible while dealing with very small images or patterns.
  5. Wrap: The image is just repeated beyond its boundary

The right way to use these techniques

Not increase irrelevant data

除了保险公司,一般不会有人需要头朝下的汽车照片。