【发布时间】:2019-04-08 08:15:48
【问题描述】:
我正在尝试使用 keras ImageDataGenerator 进行数据扩充。 我正在从包含一列中图像路径和另一列中标签的数据框中提取图像。现在,我只是想水平翻转图像。但是当我绘制图像时,图像看起来像是亮度被推到了最大值。我想知道这里发生了什么...有什么想法吗?
datagen = ImageDataGenerator(horizontal_flip=True)
# Configure batch size and retrieve one batch of images
for X_batch, y_batch in datagen.flow_from_dataframe(dataframe=data,
x_col="File name",
y_col="Driving direction",
directory = "Self-Driving-Car/Training Data/",
target_size = (480, 640),
class_mode = "other"):
# Show 9 images
for i in range(0, 9):
plt.subplot(330 + 1 + i)
plt.imshow(X_batch[i])
plt.show()
break
【问题讨论】:
标签: python keras data-augmentation