tensorflow: how to rotate an image for data augmentation?

后端 未结 7 2042
遇见更好的自我
遇见更好的自我 2020-12-09 05:27

In tensorflow, I would like to rotate an image from a random angle, for data augmentation. But I don\'t find this transformation in the tf.image module.

7条回答
  •  半阙折子戏
    2020-12-09 05:38

    This can be done in tensorflow now:

    tf.contrib.image.rotate(images, degrees * math.pi / 180, interpolation='BILINEAR')
    

提交回复
热议问题