没有用于 TIFF 图像的 Tensorflow 解码器? [英] No Tensorflow decoder for TIFF images?

查看:30
本文介绍了没有用于 TIFF 图像的 Tensorflow 解码器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我注意到 Tensorflow 提供了在读取文件后解码 jpegpnggif 图像的标准程序.例如对于 png:

I have noticed that Tensorflow provides standard procedures for decoding jpeg, png and gif images after reading files. For instance for png:

import tensorflow as tf
filename_queue = tf.train.string_input_producer(['/Image.png']) #  list of files to read
reader = tf.WholeFileReader()    
key, value = reader.read(filename_queue)
decoded_image = tf.image.decode_png(value) # use png or jpg decoder based on your files.

但是,tiff 格式解码器似乎丢失了.

However, the tiff format decoder seems to be missing.

那么 tiff 文件有哪些解决方案?当然,我可以将输入图像转换为 png,但这似乎不是一个非常聪明的解决方案.

So what solutions exist for tiff files? Surely, I could convert my input images to png, but this doesn't seem to be a very smart solution.

推荐答案

目前没有用于 TIFF 图像的解码器.查看 tensorflow/core/kernels 你会看到>

There's currently no decoder for TIFF images. Look in tensorflow/core/kernels and you see

decode_csv_op.cc
decode_gif_op.cc
decode_jpeg_op.cc
decode_png_op.cc
decode_raw_op.cc

没有decode_tiff_op.cc.这可能是社区贡献的一个很好的目标.

No decode_tiff_op.cc. This could be a good target for community contribution.

这篇关于没有用于 TIFF 图像的 Tensorflow 解码器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆