利用tensorflow跑目标检测代码时遇见标题所述错误,解决方法: image_data = tf.gfile.FastGFile(filename, 'r').read() 改为: image_data = tf.gfile.FastGFile(filename, 'rb').read()