私のアルゴリズムでは、resize_imagesは画像の色を何か変えてしまいます。どうして ?私のイメージでは、それは私のポストはほとんどのコードであるように私のポストは、ほとんどのコードであるようなので、私はいくつかの詳細を追加し、それは私が私のポストはほとんどがあるようないくつかのより多くのdetailsitが見え追加見え見えテンソルフローリサイズ画像の色が変わります
# Typical setup to include TensorFlow.
import tensorflow as tf
import matplotlib.pyplot as plt
# Make a queue of file names including all the JPEG images files in the relative
# image directory.
filename_queue = tf.train.string_input_producer(
tf.train.match_filenames_once("./MNIST_data/*.png"))
reader = tf.WholeFileReader()
key, value = reader.read(filename_queue)
image_f = tf.image.decode_png(value) # use png or jpg decoder based on your files.
image = tf.image.resize_images(image_f, [375, 1242])
#Generate batch
# num_preprocess_threads = 1
# min_queue_examples = 256
# batch_size=2;
# images = tf.train.shuffle_batch(
# [image],
# batch_size=batch_size,
# num_threads=num_preprocess_threads,
# capacity=min_queue_examples + 3 * batch_size,
# min_after_dequeue=min_queue_examples)
init_op = tf.initialize_all_variables()
with tf.Session() as sess:
sess.run(init_op)
# Start populating the filename queue.
coord = tf.train.Coordinator()
threads = tf.train.start_queue_runners(coord=coord)
my_image = image.eval() #here is your image Tensor :)
print(my_image.shape)
fig = plt.figure()
plt.imshow(my_image)
plt.show()
coord.request_stop()
coord.join(threads)
375行1242 colum 3チャンネルでありますコードは、私は、私はいくつかのより多くのdetailsitは私のポストは、コードの大部分があるようなので、私はいくつかの詳細tf.resize_images
の文書から引用
StackOverflowはいくつかのコーディングサービスですか?これは、あなたが2日で尋ねた6番目の質問です! – martianwars