In meinem Algorithmus ändert Resize_images die Farbe meines Bildes zu etwas falsch. Warum ? mein Bild ist 375 Reihe 1242 colum 3-Kanal-tensorflow Größe ändern Bild ändert sich Farbe
# 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)
es mein Beitrag sieht aus wie meistens Code ist, so habe ich einige weitere Details hinzugefügt, um es meinem Beitrag sieht aus wie meistens Code ist so hinzugefügt ich einige mehr detailsit sieht aus wie mein Beitrag ist meist Code hinzugefügt, so ich einige weitere detailsit sieht aus wie mein Beitrag ist meist Code, so dass ich einige weitere detailsit sieht hinzugefügt wie meine Post meist Code ist so hinzugefügt ich einige weitere Details
meinst du, StackOverflow ist ein Coding-Service? Dies ist die 6. Frage, die Sie in 2 Tagen gestellt haben! – martianwars