def random_rotate_image(image): # rotate image for data augmentation angle = np.random.uniform(low=-20.0, high=20.0) return misc.imrotate(image, angle, 'bicubic')