batch-file - 如何使用管道解码我的 tiff 图片以输入 tensorflow?

标签 batch-file input tensorflow decode tiff

我正在尝试使用我自己的 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/

相关文章:

batch-file - 将变量设置为命令的值

html - 如何使用背景图像向此输入重新添加背景颜色?

input - 如何纠正 webkit 浏览器和 Firefox 之间输入元素的行高不一致?

c++ - while 循环不提示用户输入 (c++)

python - Tensorflow 中的反向传播——准确性不会随着隐藏层大小的增加而提高

optimization - 神经网络的高变异性损失

batch-file - 如何使用批处理脚本替换文件中的两行文本

java - 从 python 运行 bat 文件会返回错误,而直接从 cmd 运行

c++ - 将 .bat 转换为 .exe 而不依赖于 cmd.exe

python - 如何检查 keras 是否使用 gpu 版本的 tensorflow?