Dr_*_*zuś 6 python tiff machine-learning tensorflow
我注意到该Tensorflow Python软件包提供了解码的标准程序jpeg,png以及gif读取文件后的图像.例如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.
Run Code Online (Sandbox Code Playgroud)
但是,tiff格式解码器似乎缺失了.
那么tiff文件存在哪些解决方案?当然,我可以将输入图像转换为png,但这似乎不是一个非常聪明的解决方案.
正确,TIFF图像没有解码器.查看tensorflow/core/kernels,你看
decode_csv_op.cc
decode_gif_op.cc
decode_jpeg_op.cc
decode_png_op.cc
decode_raw_op.cc
Run Code Online (Sandbox Code Playgroud)
不decode_tiff_op.cc.这可能是社区贡献的良好目标.
| 归档时间: |
|
| 查看次数: |
3284 次 |
| 最近记录: |