augment模式:
水平翻转,horizontal_flips:
翻转图像:cv2.flip
翻转bbox:
for bbox in img_data_aug['bboxes']:
x1 = bbox['x1]
x2 = bbox['x2']
bbox['x2'] = cols - x1
bbox['x1'] = cols - x2
垂直翻转,vertical_flips;
旋转90°、180°、270°
augment之后的图片尺寸必须和原图相同:
img_data_aug['width'] = img.shape[1]
img_data_aug['height'] = img.shape[0]