TensorFlow2.0-Examples icon indicating copy to clipboard operation
TensorFlow2.0-Examples copied to clipboard

关于TRAIN.DATA_AUG

Open dvlee1024 opened this issue 6 years ago • 6 comments

没看懂这部分代码,生成的图片没用上吗?

     if self.data_aug:
            image, bboxes = self.random_horizontal_flip(np.copy(image), np.copy(bboxes))
            image, bboxes = self.random_crop(np.copy(image), np.copy(bboxes))
            image, bboxes = self.random_translate(np.copy(image), np.copy(bboxes))

dvlee1024 avatar Jul 22 '19 07:07 dvlee1024

我没明白你要表达的意思。。

YunYang1994 avatar Jul 22 '19 10:07 YunYang1994

我没明白你要表达的意思。。

random_crop、random_translate、random_horizontal_flip 生成的image保存到哪里的?

一般的Image Augmentation 不是应该把一张原图通过缩放、平移等操作生成很多张图片投入到训练集当中吗

dvlee1024 avatar Jul 22 '19 11:07 dvlee1024

不是直接返回了吗?

YunYang1994 avatar Jul 22 '19 12:07 YunYang1994

不是直接返回了吗?

那现在逻辑是直接用augmentation的图片来训练,不用原图了吗? 我之前都是1张原图生成n张augmentation的图,然后全部放在数据集里喂给模型训练。

您这个DATA_AUG的开关,我不太懂。请指教!

dvlee1024 avatar Jul 22 '19 13:07 dvlee1024

一张图片有概率性地做数据增强,不是所有图片都会做

YunYang1994 avatar Jul 23 '19 02:07 YunYang1994

Thx,明白你意思了,每次处理同一张图的时候,概率性数据增强。

跟我之前的用法不同,我之前是直接在训练数据集里面添加增强的数据

dvlee1024 avatar Jul 23 '19 03:07 dvlee1024