【DLCV】CV数据集加强 Data Augmentation

Backto DLCV

data augmentation to boost the performance \text{data augmentation to boost the performance}

CV模型通常都需要大量的图像数据集来训练,但是现实中可用的dataset 通常是很有限的。高质量的大规模数据集,通常由公司组织大量人力物力来标注,作为公司的核心资产,不会轻易 open source。使用 CV 技术解决一个新的领域问题(比如遥感图像检测森林火灾),甚至需要从 0 开始自己准备数据集。而数据集过小,极容易发生过拟合。
如何充分利用 有限的数据集,训练出最优的模型,达到满意的效果,是一门靠经验去积累的手艺。

data augmentation 就是验证可行且效果优异的可靠路径之一。具体方法罗列如下

空间变换

  • horizontally flipping: 左右水平翻转,(上下垂直翻转不多用)
  • random crops:随机裁剪
  • Random Scale:尺度变换
  • Scale Jittering:(VGG及ResNet模型使用)或者尺度和长宽比增强变换
  • Shift:平移变换
  • Rotation/Reflection:旋转/仿射变换

色彩空间变换

color jittering

对颜色的数据增强:图像亮度、饱和度、对比度变化等。

you can try to raise saturation and value (S and V components of the HSV color space) of all pixels to a power between 0.25 and 4 (same for all pixels within a patch), multiply these values by a factor between 0.7 and 1.4, and add to them a value between -0.1 and 0.1. Also, you could add a value between [-0.1, 0.1] to the hue (H component of HSV) of all pixels in the image/patch.

(fancy) PCA Jittering

首先按照RGB三个颜色通道计算均值和标准差,再在整个训练集上计算协方差矩阵,进行特征分解,得到特征向量和特征值,用来做PCA Jittering

Noise:高斯噪声、模糊处理

可以认为在训练集中加入噪声,就是给模型打疫苗,这样模型训练出来后就会对噪声免疫,泛化性能更好。用高质量的纯净的样本训练出来的模型,遇到噪声很容易挂掉。


Ref

猜你喜欢

转载自blog.csdn.net/baishuo8/article/details/88813153