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

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.

主站蜘蛛池模板: 枝江市| 六盘水市| 宿松县| 三都| 霍林郭勒市| 宁国市| 望城县| 永济市| 海安县| 永新县| 金沙县| 吉安市| 治多县| 固镇县| 土默特右旗| 远安县| 方城县| 康保县| 改则县| 博白县| 张家川| 富锦市| 盐边县| 桃源县| 巴东县| 光山县| 盘锦市| 罗田县| 会同县| 泌阳县| 迁西县| 正宁县| 正镶白旗| 林西县| 兴仁县| 万盛区| 阿坝县| 滦南县| 海南省| 武宁县| 新干县|