官术网_书友最值得收藏!

Additional image generation through affine transformation

The keras image generator would work for our task using the following class:

datagen = ImageDataGenerator(
horizontal_flip = True,
vertical_flip = True,
width_shift_range = 0.1,
height_shift_range = 0.1,
channel_shift_range=0,
zoom_range = 0.2,
rotation_range = 20)

As you can see from the defined generator, we have enabled horizontal and vertical flipping, which is nothing but a reflection of the images along the horizontal and vertical axes, respectively. Similarly, we have defined the image translations along the width and the height to be within 10% of the pixel locations along those directions. The range of rotation is confined to an angle of 20 degrees, whereas the scale factor is defined to be within 0.8 to 1.2 of the original image.

主站蜘蛛池模板: 克东县| 陇南市| 贵阳市| 海晏县| 横峰县| 新郑市| 普兰店市| 辛集市| 左权县| 双鸭山市| 冕宁县| 上思县| 吉木乃县| 荔浦县| 河北省| 上蔡县| 班玛县| 翼城县| 安福县| 龙泉市| 尤溪县| 阿拉尔市| 天等县| 安图县| 怀集县| 乐山市| 沽源县| 永春县| 改则县| 平和县| 东安县| 绥中县| 航空| 灌云县| 巧家县| 林甸县| 西畴县| 甘肃省| 汉沽区| 浪卡子县| 宿松县|