Tensorflow机器学习:没有TIFF图像解码器? [英] Tensorflow Machine Learning: No Decoder for TIFF Images?

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

问题描述

我注意到Tensorflow Python包提供了读取文件后对jpegpnggif图像进行解码的标准过程.例如png:

I have noticed the Tensorflow Python package 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 中看到

Correct, there's 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.

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

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