I'm trying to augment my image dataset with Keras RandomRotation. Here's the code:
data_augmentation = tf.keras.Sequential([
keras.layers.experimental.preprocessing.RandomRotation(
0.5,
fill_mode='reflect',
interpolation='bilinear')
])
im = data_augmentation(valid_images[0:1])[0]
plt.imshow(im)
plt.show()
Unfortunately, the image produced contains black lines. I do like the reflect fill mode, so I want to keep that. Could you suggest what I can get rid of the black lines and produce smoother image? Could the same be done with Numpy? I tried setting interpolation='nearest', but that didn't help.