我正在尝试使用我自己的 tiff 图片和 tensorflow 管道来训练神经网络。问题来了:tensorflow只有4种图片可以解码(decode_jpeg, decode_bmp, decode_gif, decode_png),没有办法解码tiff图片。那么,我如何解码我的 tiff 图片以使用 tensorflow pipline 输入我自己的数据?或者我如何解码我的 tiff 图片以使用批处理?
最佳答案
试试这个:tfio.experimental.image.decode_tiff .
tfio.experimental.image.decode_tiff(
contents, index=0, name=None
)
contents: A Tensor of type string. 0-D. The TIFF-encoded image.
index: A Tensor of type int64. 0-D. The 0-based index of the frame inside TIFF-encoded image.
name: A name for the operation (optional).
关于batch-file - 如何使用管道解码我的 tiff 图片以输入 tensorflow?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44971085/